AMX 投影幕升降程序
PROGRAM_NAME='Screen Control'<br>(***********************************************************)<br>
(* System Type : NetLinx *)<br>
(***********************************************************)<br>
(* REV HISTORY: *)<br>
(***********************************************************)<br>
<br>
(***********************************************************)<br>
(* DEVICE NUMBER DEFINITIONS GO BELOW *)<br>
(***********************************************************)<br>
DEFINE_DEVICE<br>
<br>
RELAY=5001:4:0<br>
<br>
TP=128:1:0<br>
<br>
AV-AMP=5001:5:0<br>
<br>
(***********************************************************)<br>
(* CONSTANT DEFINITIONS GO BELOW *)<br>
(***********************************************************)<br>
DEFINE_CONSTANT<br>
<br>
SCREEN_UP_FB=101<br>
SCREEN_STOP_FB=102<br>
SCREEN_DOWN_FB=103<br>
<br>
(***********************************************************)<br>
(* DATA TYPE DEFINITIONS GO BELOW *)<br>
(***********************************************************)<br>
DEFINE_TYPE<br>
<br>
(***********************************************************)<br>
(* VARIABLE DEFINITIONS GO BELOW *)<br>
(***********************************************************)<br>
DEFINE_VARIABLE<br>
<br>
(***********************************************************)<br>
(* LATCHING DEFINITIONS GO BELOW *)<br>
(***********************************************************)<br>
DEFINE_LATCHING<br>
<br>
(***********************************************************)<br>
(* MUTUALLY EXCLUSIVE DEFINITIONS GO BELOW *)<br>
(***********************************************************)<br>
DEFINE_MUTUALLY_EXCLUSIVE<br>
<br>
(,,)<br>
(,) <br>
(* or (..) *)<br>
<br>
(***********************************************************)<br>
(* SUBROUTINE/FUNCTION DEFINITIONS GO BELOW *)<br>
(***********************************************************)<br>
(* EXAMPLE: DEFINE_FUNCTION <RETURN_TYPE> <NAME> (<PARAMETERS>) *)<br>
(* EXAMPLE: DEFINE_CALL '<NAME>' (<PARAMETERS>) *)<br>
<br>
DEFINE_CALL 'SCREEN UP'<br>
{<br>IF( OR ) <br>
{<br>
CANCEL_WAIT 'SCREEN STOP DELAY'<br>
ON<br>
OFF<br>
OFF<br>
WAIT 5<br>
{<br>
ON<br>
OFF<br>
}<br>
WAIT 100 'SCREEN STOP DELAY'<br>
{<br>
OFF<br>
OFF<br>
ON<br>
}<br>
}<br>
}<br>
<br>
DEFINE_CALL 'SCREEN STOP'<br>
{<br>ON<br>OFF<br>OFF<br>
}<br>
<br>
(***********************************************************)<br>
(* STARTUP CODE GOES BELOW *)<br>
(***********************************************************)<br>
DEFINE_START<br>
<br>
ON<br>
<br>
(* System Information Strings ******************************)<br>
(* Use this section if there is a TP in the System! *)<br>
(*<br>SEND_COMMAND TP,"'!F',250,'1'"<br>SEND_COMMAND TP,"'TEXT250-',__NAME__"<br>SEND_COMMAND TP,"'!F',251,'1'"<br>SEND_COMMAND TP,"'TEXT251-',__FILE__,', ',S_DATE,', ',S_TIME"<br>SEND_COMMAND TP,"'!F',252,'1'"<br>SEND_COMMAND TP,"'TEXT252-',__VERSION__"<br>SEND_COMMAND TP,"'!F',253,'1'"<br>(* Must fill this (Master Ver) *)<br>SEND_COMMAND TP,'TEXT253-'<br>SEND_COMMAND TP,"'!F',254,'1'"<br>(* Must fill this (Panel File) *)<br>SEND_COMMAND TP,'TEXT254-'<br>SEND_COMMAND TP,"'!F',255,'1'"<br>(* Must fill this (Dealer Info) *)<br>SEND_COMMAND TP,'TEXT255-'<br>
*)<br>
(***********************************************************)<br>
(* THE EVENTS GO BELOW *)<br>
(***********************************************************)<br>
DEFINE_EVENT<br>
<br>
BUTTON_EVENT //SCREEN UP<br>
{<br>
(* 下面一段PUSH{}内或用调用子程序 CALL ‘SCREEN UP’ *) <br>PUSH: <br>{<br>
IF( OR ) //IF (NOT)<br>
{<br>
CANCEL_WAIT 'SCREEN STOP DELAY'<br>
ON<br>
OFF<br>
OFF<br>
WAIT 5<br>
{<br>
ON<br>
OFF<br>
}<br>
WAIT 100 'SCREEN STOP DELAY'<br>
{<br>
OFF<br>
OFF<br>
ON<br>
}<br>
}<br>}<br>
}<br>
<br>
BUTTON_EVENT //SCREEN STOP<br>
{<br>
PUSH:<br>{<br>ON<br>OFF<br>OFF<br>}<br>
}<br>
<br>
BUTTON_EVENT //SCREEN DOWN<br>
{<br>
PUSH:<br>{<br>
IF( OR ) //IF (NOT)<br>
{<br>
CANCEL_WAIT 'SCREEN STOP DELAY'<br>
ON<br>
OFF<br>
OFF<br>
WAIT 5<br>
{<br>
ON<br>
ON<br>
}<br>
WAIT 100 'SCREEN STOP DELAY'<br>
{<br>
OFF<br>
OFF<br>
ON<br>
}<br>
}<br>}<br>
}<br>
<br>
DATA_EVENT<br>
{<br>ONLINE:<br>{<br>
ON<br>}<br>
}<br>
DATA_EVENT<br>
{<br>ONLINE:<br>{<br>
PULSE<br>}<br>
}<br>
<br>
(***********************************************************)<br>
(* THE ACTUAL PROGRAM GOES BELOW *)<br>
(***********************************************************)<br>
DEFINE_PROGRAM<br>
<br>
=<br>
=<br>
=<br>
<br>
(***********************************************************)<br>
(* END OF PROGRAM *)<br>
(* DO NOT PUT ANY CODE BELOW THIS COMMENT *)<br>
(***********************************************************)<br>
<br>
re:应用红外IR的程序PROGRAM...
应用红外IR的程序<br><br>
PROGRAM_NAME='IR CONTROL'<br>
(***********************************************************)<br>
(* System Type : NetLinx *)<br>
(***********************************************************)<br>
(* REV HISTORY: *)<br>
(***********************************************************)<br>
<br>
(***********************************************************)<br>
(* DEVICE NUMBER DEFINITIONS GO BELOW *)<br>
(***********************************************************)<br>
DEFINE_DEVICE<br>
<br>
matrix=5001:1:164 //autopatch matrix switcher CI804T<br>
<br>
RELAY=5001:4:164<br>
<br>
TP=128:1:0<br>
<br>
AV_AMP=5001:5:164<br>
<br>
(***********************************************************)<br>
(* CONSTANT DEFINITIONS GO BELOW *)<br>
(***********************************************************)<br>
DEFINE_CONSTANT<br>
<br>
(***********************************************************)<br>
(* DATA TYPE DEFINITIONS GO BELOW *)<br>
(***********************************************************)<br>
DEFINE_TYPE<br>
<br>
(***********************************************************)<br>
(* VARIABLE DEFINITIONS GO BELOW *)<br>
(***********************************************************)<br>
DEFINE_VARIABLE<br>
<br>
INTEGER INPUT //定义变量<br>
INTEGER OUTPUT<br>
<br>
(***********************************************************)<br>
(* LATCHING DEFINITIONS GO BELOW *)<br>
(***********************************************************)<br>
DEFINE_LATCHING<br>
<br>
(***********************************************************)<br>
(* MUTUALLY EXCLUSIVE DEFINITIONS GO BELOW *)<br>
(***********************************************************)<br>
DEFINE_MUTUALLY_EXCLUSIVE<br>
<br>
(***********************************************************)<br>
(* SUBROUTINE/FUNCTION DEFINITIONS GO BELOW *)<br>
(***********************************************************)<br>
(* EXAMPLE: DEFINE_FUNCTION <RETURN_TYPE> <NAME> (<PARAMETERS>) *)<br>
(* EXAMPLE: DEFINE_CALL '<NAME>' (<PARAMETERS>) *)<br>
<br>
(***********************************************************)<br>
(* STARTUP CODE GOES BELOW *)<br>
(***********************************************************)<br>
DEFINE_START<br>
<br>
(* System Information Strings ******************************)<br>
(* Use this section if there is a TP in the System! *)<br>
(*<br>SEND_COMMAND TP,"'!F',250,'1'"<br>SEND_COMMAND TP,"'TEXT250-',__NAME__"<br>SEND_COMMAND TP,"'!F',251,'1'"<br>SEND_COMMAND TP,"'TEXT251-',__FILE__,', ',S_DATE,', ',S_TIME"<br>SEND_COMMAND TP,"'!F',252,'1'"<br>SEND_COMMAND TP,"'TEXT252-',__VERSION__"<br>SEND_COMMAND TP,"'!F',253,'1'"<br>(* Must fill this (Master Ver) *)<br>SEND_COMMAND TP,'TEXT253-'<br>SEND_COMMAND TP,"'!F',254,'1'"<br>(* Must fill this (Panel File) *)<br>SEND_COMMAND TP,'TEXT254-'<br>SEND_COMMAND TP,"'!F',255,'1'"<br>(* Must fill this (Dealer Info) *)<br>SEND_COMMAND TP,'TEXT255-'<br>
*)<br>
(***********************************************************)<br>
(* THE EVENTS GO BELOW *)<br>
(***********************************************************)<br>
DEFINE_EVENT<br>
<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
{<br>PUSH:<br>{<br>
TO<br>
TO<br>}<br>
}<br>
<br>
BUTTON_EVENT // LD SELECT<br>
{<br>PUSH:<br>{<br>PULSE<br>PULSE<br>}<br>
}<br>
<br>
BUTTON_EVENT // TV SELECT<br>
{<br>PUSH:<br>{<br>PULSE<br>PULSE<br>}<br>
}<br>
<br>
BUTTON_EVENT // VCR1 SELECT<br>
{<br>PUSH:<br>{<br>PULSE<br>PULSE<br>}<br>
}<br>
<br>
BUTTON_EVENT // VCR2 SELECT<br>
{<br>PUSH:<br>{<br>PULSE<br>PULSE<br>}<br>
}<br>
<br>
DATA_EVENT //设置MATRIX波特率<br>
{<br>ONLINE:<br>{<br>
SEND_COMMAND MATRIX,'SET BAUD 9600,N,8,1 DISABLE'<br>
SEND_COMMAND MATRIX,'HSOFF'<br>
SEND_COMMAND MATRIX,'XOFF'<br>}<br>
}<br>
<br>
(* 设置矩阵 *)<br>
<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
{<br>PUSH:<br>{<br>
INPUT=BUTTON.INPUT.CHANNEL-30<br>}<br>
}<br>
<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
BUTTON_EVENT<br>
{<br>PUSH:<br>{<br>
OUTPUT=BUTTON.INPUT.CHANNEL-40<br>}<br>
}<br>
<br>
BUTTON_EVENT<br>
{<br>PUSH:<br>{ SEND_STRING MATRIX,"'CI',ITOA(INPUT),'O',ITOA(OUTPUT),'T'" <br>
<br>
<br>
<br>
<br>
<br>
(**发简单字符如ABCD等,用单引号,发的是16进制码用“ $XX, $XX"<br>
<br>
上面如下 "$0d,$0c,$AA,53,60,70,'ABC',$0D" *)<br>}<br>
}<br>
<br>
<br>
<br>
<br>
(***********************************************************)<br>
(* THE ACTUAL PROGRAM GOES BELOW *)<br>
(***********************************************************)<br>
DEFINE_PROGRAM<br>
<br>
=(INPUT=1)<br>
=(INPUT=2)<br>
=(INPUT=3)<br>
=(INPUT=4)<br>
=(INPUT=5)<br>
=(INPUT=6)<br>
=(INPUT=7)<br>
=(INPUT=8)<br>
<br>
=(OUTPUT=1)<br>
=(OUTPUT=2)<br>
=(OUTPUT=3)<br>
=(OUTPUT=4)<br>
=(OUTPUT=5)<br>
=(OUTPUT=6)<br>
=(OUTPUT=7)<br>
=(OUTPUT=8)<br>
<br>
(***********************************************************)<br>
(* END OF PROGRAM *)<br>
(* DO NOT PUT ANY CODE BELOW THIS COMMENT *)<br>
(***********************************************************)<br>
<br>
怎么看起来这么复杂呀
是用程序语言写出来的吗,我怎么看台电的中控就是简单的编码就行了呀re:这是用AMX的程序编写软件写的
这是用AMX的程序编写软件写的re:很复杂
很复杂 :L 看着晕 楼主就是让大家看看他的水平,其实大家都是来学习的,楼主直接把其中的主要部分弄出来就可以了 学习了!!!!!!!!!!!!!!!!!!! 学习。。。。。。。。。。 是NI-2100 主机的程序,编的有点乱。控投影幕不需要这样麻烦。
页:
[1]
2