Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual
Page 76

6Ć36
The following is a typical PRINT statement using the default port
(PORTA):
40 PRINT A%,B%, MESSAGE$,C% + D%
The output line would be 13 29 MOTOR 53, assuming the following
values for this statement:
A%=13
B%=29
C%=36
D%=17
MESSAGE$ = MOTOR"
The following are all valid PRINT statements:
5ăOPEN CHANNEL FOR OUTPUT AS FILE #6 , TYPE=(S)
10ăPRINT #6:FULL=30, STRING$
20 PRINT SPEED%,ESTOP_RELAY@,5,7,19*B%
30 PRINT THIS IS THE REFERENCE",REFERENCE%
40 PRINT ((SPEED% + GAIN%)/14),B%,C%,GAIN OVR@
50 PRINT #2,A$ +STUFF"+LEFT$(A$,4)
Note that when a boolean variable is printed, it is displayed as
TRUE" or FALSE".
When printing items in BASIC, the individual fields can be separated
in one of two ways: with a comma or a semicolon. If the fields are
separated by a comma, the items will be printed rightĆjustified in
print zones" of 15 character positions wide. The following is an
example:
10 PRINT A%,C!,B@
This prints as follows:
298ąąąąąąą12376ąąąąąąFALSE
123456789012345 123456789012345 123456789012345*
* Used in this example only to show print zones.
The only exception to this is when a string that is greater than 15
characters is printed. The print zone for that string will be the next
integral multiple of 15 greater than the string length. If the string is 1
to 15 characters, the print zone is 15. If the length is 16 to 30
characters, the print zone is 30 characters, and so on.
If the items in the print list are separated by a semicolon, the print
fields are separated by a single space unless they are string fields. If
they are string fields, there are no spaces between them:
10 PRINT ABC%;STRING_1$;STRING_2$,XYZ%;BOOL@