![background image](http://html1.mh-extra.com/html/omron/r88a-mcw151-drt-e/r88a-mcw151-drt-e_operation-manual_742243185.webp)
170
Command, function and parameter description
Section 6-3
Precautions:
Changing the PP_STEP value will influence the position control loop. Modify
the control gains accordingly.
See also:
AXIS, MOVECIRC, UNITS
Example:
A motor has 20,000 steps/rev. The MC Unit will thus internally process 40,000
counts/rev. A 2,500-pulse encoder is to be connected. This will generate
10,000 edge counts/rev. A multiplication factor of 4 is therefore required to
convert the 10,000 counts/rev to match the 40,000 counts/rev of the motor.
The following line would be used for axis 0.
PP_STEP AXIS(0) = 4
6-3-142 PRINT
Type:
I/O Command
Syntax:
[
#n
, ]
expression
{ ,
expression
}
?
[
#n
, ]
expression
{ ,
expression
}
Description:
The PRINT command outputs a series of characters to the serial ports.
PRINT can output parameters, fixed ASCII strings, and single ASCII charac-
ters. By using PRINT#n, any port can be selected to output 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.
CHR(x)
The CHR(x) command is used to send individual ASCII characters using their
ASCII codes. The semi-colon on the end of the print line suppresses the car-
riage return normally sent at the end of a print line. ASCII(13) generates CR
without a linefeed so the line above would be printed on top of itself if it were
the only print statement in a program. PRINT CHR(x); is equivalent to PUT(x)
in some forms of BASIC.
HEX(x)
The HEX command is used to print the hexadecimal value of the output. Neg-
ative values will result in the 2’s complement hexadecimal value (24-bit). The
valid range is [-8388608, 16777215].
\ (back slash)
The back slash (\) command can be used to print a single ASCII character.
For example,
>> PRINT “\a”,”\\”,”\%”
a \ %
Arguments:
n
The specified output device. When this argument is omitted, the port as spec-
ified by OUTDEVICE will be used.
0
RS-232C programming port 0
1
RS-232C serial port 1
2
RS-422A/485 serial port 2