Yaskawa MotionWorks IEC Toolboxes User Manual
Page 209

Communications Toolbox: Function Blocks
MotionWorks IEC61131-3 Toolboxes: 2013-09-13
196
block will cause an error. Normally, this value is 8192 as the structure definition is in the Comm
Toolbox itself. If this must be increased for any reason, modify the Comm Toolbox DataType
definition and set the Size input accordingly.
5.
Locate the comments “Customize the code below? and “Customize the code above?
6.
Remove example commands to avoid potential errors in operation.
7.
Add your commands. Two examples are shown below:
a.
Move Relative command
a.
MR,<axisnumber>,<distance>,<speed>,<accel/decel>
b.
Calculate the CommandCode which corresponds to the ASCII characters ‘MR’. The
equation is: CHAR_TO_INT(‘M’) * 256 + CHAR_TO_INT(‘R’) = 19794.
c.
Add the CommandCode to the case statement.
d.
Use the GetParameter function block to separate command parameters. The example
below uses GetParameter with “Method#Parameter?
b.
Load Positions command
a.
LP,<Position1>,<Position2>,…,<Position50>
b.
Calculate the CommandCode which corresponds to the ASCII characters ‘LP’. The
equation is: CHAR_TO_INT(‘L’) * 256 + CHAR_TO_INT(‘P’) = 19536
c.
Add the CommandCode to the case statement.