256
INTELLIGENT ACTUATOR
Part 4 Commands
WRIT (Write)
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 WRIT
Channel
number
Column
number
CC
(Note 1)
[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.
As long as a standard SIO port (channel 1 or 2) is open, a task other than the one that
opened the port can be used to execute (send) a WRIT command. Accordingly, if a READ
command is executed in a port-opening task and then a WRIT command is executed in other
task, the response from the other side can be received without delay after the command is
sent from the X-SEL.
(Note 1) CP for channels other than 1 and 2.
Return code of the WRIT command (channels 1 and 2 only)
The return code is stored in a local variable. The variable number can be set by “Other parameter No. 24.”
The default variable number is 99.
0: WRIT completed successfully
1: WRIT timeout (the timeout value is set by a TMRW command)
2: WRIT timer cancelled (the wait status is cancelled by a TIMC command)
3 to 4: For future expansion
5: WRIT factor error (program abort error) (Cannot be recognized by SEL commands)
6: WRIT task ended (program end request, etc.) (Cannot be recognized by SEL commands)