Installation guide

Programming Commands 141
PRINT USING String Manipulation
ACTION: Prints strings character or formatted numbers.
PROGRAM SYNTAX: PRINT USING #1,"literal string",[exp][, or;][exp][;]
PRINT USING #1,Format$,[exp][, or;][exp][;]
PRINT USING #2,"literal string",[exp][, or;][exp][;]
PRINT USING #2,Format$,[exp][, or;][exp][;]
REMARKS: Port 1 is the Host Port and Port 2 is the Auxiliary Port.
The numeric values are formatted only using the literal string or a desig-
nated Format$ variable string. This string can contain non-format char-
acters that will be printed prior to the formatted number. The following
characters in the string will not be printed from the string:
"+" "#" "0" " ." "\" and ",". However, these character can be print-
able characters by preceding the character with a "\".
Example:
requirement to send the following ASCII string with the current state
of OUT(101) (Output #1 on board 1 is <state> which is the coolant
control)
a$="Output \#1 is #
PRINT USING #1,a$,OUT(101); “ which is the coolant control"
The resulting serial output:
Output #1 is n which is the coolant control
where: n is the state of output (101)
The comma (,) which is the delimiter for expressions, will not print spaces
like the PRINT # command. If spaces are required, between expressions,
they must be added to the literal string or format$.
Example:
ACCEL(1)=100
DECEL(1)=200
a$="Acc=0000 Dcc=0000"
PRINT USING#1,a$,ACCEL(1),DECEL(1)
The resulting serial output:
Acc= 0100 Dcc= 0200
If the numeric data is larger than the specified format than an * will
be substituted for the 0's and #'s in the output.
Example:
ABSPOS(1)=1000.54
a$="Position= +0##.##"
PRINT USING #1,a$,ABSPOS(1)
The resulting serial output:
Position= +***.**