EasyManua.ls Logo

Trio Motion Coordinator MC216 - Print

Trio Motion Coordinator MC216
566 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
8-56 Trio BASIC Commands
Input / Output Commands
Trio Motion Technology
Example 3:
read_op:
VR(0)=OP
SET OUTPUTS 8..15 ON SIMULTANEOUSLY
VR(0)=VR(0) AND 65280
OP(VR(0))
Note how this example can also be written:
SET OUTPUTS 8..15 ON SIMULTANEOUSLY
OP(OP AND 65280)
PRINT
Type:
Command.
Description:
The
PRINT
command allows the Trio BASIC program to output a series of characters
to either the serial ports or to the fibre optic port (if fitted). The
PRINT
command
can output parameters, fixed ascii strings, and single ascii characters. Multiple
items to be printed can be put on the same
PRINT
line provided they are separated
by a comma or semi-colon. The comma and semi- colon are used to control the for-
mat of strings to be output.
Example 1:
PRINT "CAPITALS and lower case CAN BE PRINTED"
Suppose VR(1)=6 and variab=1.5: print output will be:
Example 2:
>>PRINT 123.45,VR(1)
123.4500 1.5000
>>
Note how the comma separator forces the next item to be printed into the next tab
column. The width of the field in which a number is printed can be set with the use
of [w,x] after the number to be printed. Where w=width of column and x=number of
decimal places.
Example 3:
PRINT VR(1)[4,1];variab[6,2]
6.0 1.50
Note that the numbers are right justified in the field with any unused leading char-
acters being filled with spaces. If the number is too big then the field will be filled
with asterisks to signify that there was not sufficient space to display the number.
The maximum field width allowable is 127.
Example 4:
length:

Table of Contents

Related product manuals