IAI America XSEL-KET User Manual

Page 224

Advertising
background image

205

Part 4 Commands

INTELLIGENT ACTUATOR



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.
A return code will be stored in a local variable (factory setting: variable 99) immediately after this command is
executed. By checking this return code, whether or not the command has been successful can be checked. If
necessary, specify the applicable processing to be performed upon aborting.
If the main application version is 0.41 or later, specifying “0: in operand 2 will execute a dummy read (clear the
receive buffer and disable receive) (return code: successful completion). The tool versions that support “0” input in
operand 2 are shown below. Even if “0” cannot be input from a tool, indirect specification is available.

 PC software version 1.1.1.0 or later

 Teaching-pendant application version 1.06 or later
(Note) Channel Nos. 31 to 34 (Ethernet options) do not support dummy lead specification (operand 2 = 0).

[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 the return code (in variable 99) to variable 1.

CLOS

1

Close the channel.

SLCT

Branch to the processing that corresponds to the return code.
(Note) Using a GOTO command to branch out of or into a

SLCT to EDSL syntax is prohibited.

WHEQ

:

(1)

:

1

0

If the content of variable 1 is 0 (successful), [1] will be
executed. Specify in [1] the processing to be performed upon
successful execution.

WHEQ

:

(2)

:

1

1

If the content of variable 1 is 1 (timeout), [2] will be executed. If
necessary, specify the applicable processing in [2].

WHEQ

:

(3)

:

1

2

If the content of variable 1 is 2 (timer cancellation), [3] will be
executed. If necessary, specify the applicable processing in [3].

OTHE

:

(4)

:

If the content of variable 1 is not 0, 1 or 2, [4] will be executed.
If necessary, specify the error handling in [4].

EDSL

If any of the conditions is satisfied and the corresponding
command is executed, the processing will move here.

:

(snip)

:

 Return code of the READ command

The return code is stored in a local variable. If the main application version is 0.21 or later, variable number can be set by
“Other parameter No. 24.” The default variable number is 99.
The variable number is fixed to 99 in main application version 0.20 and earlier.

0: READ completed successfully (Receive complete)
1: READ timeout (the timeout value is set by a TMRD command) (Continue to receive)
2: READ cancelled due to timer (the waiting status was cancelled by a TIMC command) (Continue to receive)
3: READ SCIF overrun error (Receive disabled)
4: READ SCIF receive error (framing error or parity error) (Receive disabled)
5: READ factor error (program abort error) (Receive disabled)

(Cannot be recognized by SEL commands)

6: READ task ended (program end request, etc.) (Receive disabled)

(Cannot be recognized by SEL commands)

7: READ SCIF receive error due to other factor (Receive disabled)
8: READ expanded-SIO overrun error (Receive disabled)
9: READ expanded-SIO parity error (Receive disabled)
10: READ expanded-SIO framing error (Receive disabled)
11: READ expanded-SIO buffer overflow error (Receive disabled)
12: READ expanded-SIO receive error due to other factor (Receive disabled)

Advertising
This manual is related to the following products: