Omron FZ4 Series User Manual page 158

Vision sensor
Table of Contents

Advertisement

Standard IO commands
When the same command name / command id of standard IO commands are used for customize IO
commands,
customize IO command has the priority and the standard IO commands are not executed.
If you execute the standard IO commands after execution of customize IO commands, please add the
line as below.
CommandExecute&=False
In this case, standard IO commands is executed just after executing customize IO command.
4
Calling the procedure defined on the other commands
It is possible to call the procedure defined on the other commands during the command execution.
Each command has "Function name", and it is used to call the procedure.
Example) When command is defined as the table below and we intend to call procedure of CMD0 from
CMD1,
Command No.
0
1
the codes for CMD1 should be like this:
Gosub *FUNC0
This case, the behavior of the command like BUSY depends on the caller (CMD1), and BUSY stays ON
until the end of the procedure.
Important
Please be careful not to make the commands calling each other (In the case above, CMD0 also calls FUNC1),
because it makes infinite loop.
Define the different procedure according to I/O module
The variable IoIdent$ stores the IO module identification name, which received the current I/O
command.
When you define the different procedure for each I/O modules, please make branch by the value of
IoIdent$.
Example) The command which receives "Serial" for serial command, and "Ethernet" for UDP normal
If IoIdent$ = "SerialNormal" Then
  Response$ = "Serial"
Elseif IoIdent$ = "UdpNormal" Then
  Response$ = "Ethernet"
Endif
156
Using Custom Command
Command name
CMD0
CMD1
Busy
False
FUNC0
True
FUNC1
Function name
FZ4 User's Manual

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fz4 series

Table of Contents