253
INTELLIGENT ACTUATOR
Part 4 Commands
READ (Read)
Command, declaration
Extension condition
(LD, A, O, AB, OB)
Input condition
(I/O, flag)
Command,
declaration
Operand 1 Operand 2
Output
(Output, flag)
Optional Optional READ
Channel
number
Column
number
CC
[Function] Read a character string from the channel specified in operand 1 to the column specified in
operand 2.
Read will end when the character specified by a SCHA command is received.
Either a local or global column may be specified.
Immediately after this command is executed, a return code will be stored in a local variable
(factory setting: variable 99). Whether or not the command was executed successfully can be
checked using this return code. If necessary, specify an appropriate processing to be
performed when the command was terminated due to an error.
In main application version 0.41 or later, a dummy read (receive buffer cleared & receive
disabled) can be performed if “0” is specified in operand 2 (the return code will indicate
successful completion). The tool versions that support “0” input in operand 2 are listed below.
If “0” cannot be input directly from the tool, it can be specified indirectly:
PC software version 1.1.1.0 or later
Teaching pendant application version 1.06 or later
[Example] SCHA 10 Set LF (= 10) as the end character.
OPEN 1 Open channel 1.
READ
1 2 Read a character string from channel 1 to column
2 until LF is received.
TRAN 1 99 Assign a return code (variable 99) to variable 1.
CLOS 1 Close the channel.
SLCT Branch to the processing corresponding to each
return code.
(Note) Using a GOTO command to branch out of
the SLCT-EDSL syntax or to other
branching processing within the syntax is
prohibited.
WHEQ
:
(1)
:
1 0 If the content of variable 1 is “0” (successful
completion), (1) will be performed. Accordingly,
specify the processing to be performed upon
successful completion in (1).
WHEQ
:
(2)
:
1 1 If the content of variable 1 is “1” (timeout), (2) will
be performed. Accordingly, specify an appropriate
processing to be performed in (2), if necessary.
WHEQ
:
1 2 If the content of variable 1 is “2” (timer cancelled),
(3) will be performed. Accordingly, specify an
appropriate processing to be performed in (3), if
necessary.
(3)
:
OTHE
:
(4)
:
If the content of variable 1 is other than “0,” “1” or
“2,” (4) will be performed. Accordingly, specify an
error handling in (4), if necessary.
EDSL The program moves here if any of the conditions
was established and the corresponding command
was executed.