beautypg.com

Notes, Error description, Customization steps – Yaskawa MotionWorks IEC Toolboxes User Manual

Page 207

background image

Communications Toolbox: Function Blocks

MotionWorks IEC61131-3 Toolboxes: 2013-09-13

194

execute while enable is held high.

VAR_OUTPUT

B

Done

BOOL

Set high when the commanded action has been
completed successfully. If another block takes
control before the action is completed, the Done
output will not be set. This output is reset when
execute goes low.

V

CommandCount

UDINT

Number of commands that have been processed
since this function block was enabled.

B

Error

BOOL

Set high if error has occurred during the execution
of the function block. This output is cleared when
'Execute' or 'Enable' goes low.

B

ErrorID

UINT

If Error is true, this output provides the Error ID.
This output is reset when 'Execute' or 'Enable' goes
low.

Notes

This function block is a template for designing a unique command line interpreter and requires
customization. See the customization steps below.

The command streaming tools provided in the Comm Toolbox are designed to interpret commands
starting with a two character (two byte) command code followed by either delimiter separated parameters
or no parameters. The reason for this is because two ASCII bytes can easily be converted to an INT,
which is used with the CASE statement in this function block. Example commands are located in the
customization steps below.

Error Description

ErrorID

Meaning

0

No error

10160

CommandString length is invalid

10161

Invalid CommandCode

10162

Parameter being searched for is out of range

10163

Mode input not valid

10164

Invalid character position input

Customization Steps

1.

Copy this Function block from the Comm Toolbox, paste it into your project, and rename with a different

(but similar) name.