Omron trajexia CJ1W-MCH72 Operation Manual page 229

Sysmac cj-series programmable controller
Hide thumbs Also See for trajexia CJ1W-MCH72:
Table of Contents

Advertisement

All BASIC commands
4-2-189 PRINT
218
/i
Type
I/O command
Syntax
PRINT [ #n, ] expression { , expression}
? [ #n, ] expression { , expression }
Description
The PRINT command outputs a series of characters to the communica-
tion ports. PRINT can output parameters, fixed ASCII strings, and single
ASCII characters. By using PRINT #n, any port can be selected to out-
put the information to.
Multiple items to be printed can be put on the same line separated by a
comma or a semi-colon. A comma separator in the print command
places a tab between the printed items. The semi-colon separator prints
the next item without any spaces between printed items.
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. The width of the column is
given by w and the number of decimal places is given by x. Using only
one parameter [x] takes the default width and specifies the number of
decimal places to be printed. The numbers are right aligned in the field
with any unused leading characters being filled with spaces. If the
number is too long, 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 characters.
The backslash \ command can be used to print a single ASCII charac-
ter.
Arguments
n
The specified output device. When this argument is omitted, the port
is 0 (Terminal window). See the table below.
/i
Value
0
Programming port 0 (default)
5
Trajexia Studio port 0 user channel 5
6
Trajexia Studio port 0 user channel 6
7
Trajexia Studio port 0 user channel 7
/i
expression
The expression to be printed.
Example
PRINT "CAPITALS and lower case CAN BE PRINTED"
Example
Consider VR(1) = 6 and variab = 1.5, the print output will be as follows:
PRINT 123.45, VR(1)-variab
123.4500 4.5000
Example
length:
PRINT "DISTANCE = ";mpos
DISTANCE = 123.0000
In this example, the semi-colon separator is used. This does not tab into
the next column, allowing the programmer more freedom in where the
print items are placed.
Example
PRINT VR(1)[ 4,1 ]; variab[ 6,2 ]
6.0 1.50
Description
Section 4-2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents