beautypg.com

IAI America XSEL-KX User Manual

Page 215

background image




199

Part 4 Commands


 WRIT (Write)

Extension condition

(LD, A, O, AB, OB)

Input condition

(I/O, flag)

Command, declaration

Output

(Output, flag)

Command,
declaration

Operand 1

Operand 2

Optional

Optional

WRIT

Channel

number

Column

number

CP

[Function]

Write the character string in the column specified in operand 2 to the channel specified in
operand 1.
The operation will end when the character specified by a SCHA command is written.
Either a local or global column can be specified.


[Example]

SCHA

10

Set LF (= 10) as the end character.

OPEN

1

Open channel 1.

WRIT

1

2

Write the character string in column 2 to channel 1
until LF is written.

CLOS

1

Close the channel.


(Note 1)

The “Forcibly enable receive immediately before send” function is available when expanded
SIOs (channel 2 and onward; optional) are used via RS232C or RS422 (this function can be
cancelled via parameter). If this function is used, the X-SEL can receive a response from the
other side without delay after a send.

(Note 2)

If expanded SIOs (channel 2 and onward; optional) are used via RS232C or RS422, once
OPEN is executed those tasks other than the open ones can also be used to execute WRIT
(send). Therefore, the X-SEL can receive a response from the other side without delay after
a send, by executing READ with an open task and then WRIT with other task.

(Note 3)

If expanded SIOs (channel 2 and onward; optional) are used via RS485, or when standard
SIOs (channel 1; also used by the teaching pendant) are used, the “Forcibly enable receive
immediately before send” function is available. However, using this function will generate a
delay time (the function can be cancelled via parameter). A minimum delay of 3 msec is
required after the X-SEL executes a send before it receives a response from the other side.

This manual is related to the following products: