Optional optional tmrd timer setting prohibited cp – IAI America XSEL-KE User Manual

Page 211

Advertising
background image

196

Part 4 Commands

z TMRD (Set READ timeout value)

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

TMRD

Timer

setting

Prohibited CP

[Function]

Set the timeout to be applied to a READ command.
The timer setting specified in operand 1 will set the maximum time the program will wait for the
character string read to end when a READ command is executed.
If the end character could not be read before the timer is up during the execution of the READ
command, a timeout will occur and the program will move to the next step.
(Whether or not a timeout has occurred can be checked from the return code that will be stored in a
local variable immediately after the READ command is executed.)
If necessary, specify the processing to be performed when a timeout occurs.)
6HWWLQJWKHWLPHUWR³´ZLOODOORZWKH5($'FRPPDQGto wait infinitely, without timeout, until the end
character is read.
7KHWLPHUVHWWLQJLVLQSXWLQVHFRQGV VHWWLQJUDQJHWRVHFRQGV LQFOXGLQJXSWRWZRGHFLPDO
places.

1RWH 

705'LVVHWWR³´LQWKHGHIDXOWFondition before TMRD setting is performed.

[Example]

6&+$



6HW/)  DVWKHHQGFKDUDFWHU

705'



6HWWKH5($'WLPHRXWYDOXHWRVHFRQGV

OPEN

1

2

Open channel 1.

READ

1

99

Read the character string from channel 1 to column 2 until LF is read.

TRAN

1

Assign the return code to variable 1.

CLOS 1

Close the

channel.

SLCT

The program branches to the processing corresponding to each return
code.
(Note) Branching out of or into a SLCT ~ EDSL statement using a

GOTO command is prohibited.

,IWKHFRQWHQWRIYDULDEOHLV³´(executed successfully), [1] will
be executed. Specify in [1] the processing to be performed
when the command has been executed successfully.

WHEQ 1



If the content of variable 1 is

³´ H[HFXWHGVXFFHVVIXOO\ >@ZLOOEH

executed. Specify in [1] the processing to be performed when the
command has been executed successfully.


[1]

WHEQ

1

1

If the content of variable 1 is

³´ WLPHRXW >@ZLOOEHH[HFXWHG,I

necessary, specify in [2] the processing to be performed in this
condition.


[2]

WHEQ 1

2

,IWKHFRQWHQWRIYDULDEOHLV³´ WLPHUFDQFHOOHG >@ZLOOEHH[HFXWHG,I
necessary, specify in [3] the processing to be performed in this
condition.


[3]

OTHE

,IWKHFRQWHQWRIYDULDEOHLVQRW³´³´RU³´>@ZLOOEHH[HFXWHG,I
necessary, specify in [4] the error handling to be performed in this
condition.


[4]

EDSL

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

Read completes successful

O\ZLWKLQVHFRQGVo9DULDEOH1R 

Timeout occurs

o Variable No. 1 = 1

* The return code of READ command may not be lim

LWHGWRRU7KHYDULDEOHWRVWRUHWKH

UHWXUQFRGHFDQEHVHWLQ³2WKHUSDUDPHWHU1R´ VXSSRUWHGE\PDLQDSSOLFDWLRQYHUVLRQ
RUODWHU 5HIHUWRWKHH[SODnation of READ command for details.

Advertising
This manual is related to the following products: