Installation
8
AXP-AI8 Eight-Channel Analog Interface Board
CREATE_LEVEL AI8,2,IN2 (* INPUT WITH A VARIABLE NAME *)
CREATE_LEVEL AI8,3,IN3 (* IN WHICH TO STORE THE INPUT *)
CREATE_LEVEL AI8,4,IN4 (* ANALOG VALUE (LEVEL) *)
CREATE_LEVEL AI8,5,IN5
CREATE_LEVEL AI8,6,IN6
CREATE_LEVEL AI8,7,IN7
CREATE_LEVEL AI8,8,IN8
(*
CREATE_LEVEL AI8,1,IN1[1] (* HERE WE ASSOCIATE EACH AI8 *)
CREATE_LEVEL AI8,2,IN2[1] (* INPUT WITH A VARIABLE NAME *)
CREATE_LEVEL AI8,3,IN3[1] (* IN WHICH TO STORE THE INPUT *)
CREATE_LEVEL AI8,4,IN4[1] (* ANALOG VALUE (LEVEL) *)
CREATE_LEVEL AI8,5,IN5[1]
CREATE_LEVEL AI8,6,IN6[1]
CREATE_LEVEL AI8,7,IN7[1]
CREATE_LEVEL AI8,8,IN8[1]
*)
(***********************************************************)
(* THE ACTUAL PROGRAM GOES BELOW *)
(***********************************************************)
DEFINE_PROGRAM
//IF(IN1[1] < 51) (* THE LEVELS FROM THE AI8 RANGE FROM *)
IF(IN1 < 51) (* THE LEVELS FROM THE AI8 RANGE FROM *)
{ (* 0 - 1023 *)
// ON[TP,BUTTON]
// ON[TP,101]
ON[TP,xBUTTON]
}
//IF(IN5[1] = 795)
IF(IN5 = 795)
{
OFF[TP,xBUTTON]
// OFF[TP,BUTTON]
//OFF[TP,101]
}
(***********************************************************)
(* END OF PROGRAM *)
(* DO NOT PUT ANY CODE BELOW THIS COMMENT *)
(***********************************************************)
For additional information, refer to the
Axcess Programming Language
instruction manual.
Each variable needs two bytes to hold the input value which is why the form [2] is
used (ex: [2] makes it a two-byte variable).