252
••••
ASCII Protocol
QUICKDESIGNER
The first part of the BASIC statement is CHR$(20). The ASCII character 20 is equivalent to a
CONTROL-T. The next section of code is the character 8, which is the panel ID number. The last
section of the code string is CHR$(13). The ASCII character 13 is equivalent to a CARRIAGE
RETURN.
Untriggering a Panel
The format for the command to untrigger a panel is:
(^U) (Panel ID number) (^M)
(^U) is the combination of the CTRL key and the U key pressed together. This key combination
produces a code equivalent to 15 hex or 21 decimal. (Panel ID number) is the ID number of the panel
to be untriggered. (^M) is a CARRIAGE RETURN which indicates the end of the ASCII string. A
CARRIAGE RETURN code is equivalent to 0D hex or 13 decimal.
Example: ^U1^M (UNtrigger panel with the ID of 1)
(Untriggering a panel will cause the display to remain blank)
The following example is a BASIC statement that will send an ASCII string to untrigger panel 8.
PRINT#1,CHR$(21);8;CHR$(13)
The first part of the BASIC statement is CHR$(21). The ASCII character 21 is equivalent to a
CONTROL-U. The next section of code is the character 8, which is the panel ID number. The last
section of the code string is CHR$(13). The ASCII character 13 is equivalent to a CARRIAGE
RETURN.
Reading Variables
Operators such as pilot lights and numeric data displays must be tied to a tag variable (the Dmxxxx
internal tags). When using the ASCII protocol, you must write the data to the variable in the target
display or read the data from the variable in the target display.
The format for the command to read an internal variable is:
(^R) (Variable ID number) (,) (Count) (^M)
(^R) is the combination of the CTRL key and the R key pressed together. This key combination
produces a code equivalent to 12 hex or 18 decimal. (Variable ID number) is the ID number of the first
variable to be read. (,) is a required delimiter. (Count) is the number of consecutive variables you want
to read. (^M) is a CARRIAGE RETURN which indicates the end of the ASCII string. A CARRIAGE
RETURN code is equivalent to 0D hex or 13 decimal.
The format for reading 4 variables, beginning with variable ID 1 is:
^R1,4 ^M
The target display will return a string of characters in the following format:
(^R) (value 1) (,) (value 2) (,) ... (value N) (^M)
If you try to read a variable ID that does not exist, a zero length string will be returned. In the above
example, the command string requested 4 variables, starting with variable ID number 1. The target
display will return a string of characters similar to the one below. In the example below, variable ID 3
does not exist, so the value appears as a zero length string.
(^R) (12) (,) (43) (,) ( ) (,) (24) (^M)