11 - 420 11 - 420
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
Reading the ON/OFF status of the CS (CTR), DSR (DR), RS (RTS), DTR (ER)
and CD control signals
Control table format definition
Element position
Item
Description
%(0)
Processing code
Specify the processing code.
%(1)
CS (CTS) and DSR
(DR) control signals
Read the status of the CS (CTS) and DSR (DR)
control signals into the lower and higher bytes,
respectively.
%(2)
RS (RTS) and DTR
(ER) control signals
Read the status of the RS (RTS) and DTR (ER)
control signals into the lower and higher bytes,
respectively.
Processing Code 33
%(3)
CD control signal
Read the status of the CD control signal into the
lower byte.
• This processing code is used to read the ON/OFF status of the CS (CTR), DSR
(DR), RS (RTS), DTR (ER) and CD control signals of an open communication
channel.
• Specify 33 for the processing code.
• The CS (CTR) control signal cannot be read for the RS-232C interface
(CH1/CH2).
Because the DSR (DR), DTR (ER) and CD control signals are not included in
RS-422/485(CH3), they cannot be read for the interface.
• The ON/OFF status of each control signal is expressed in the following manner
using the higher and lower 8 bits:
1:ON
0:OFF
Status of
control signal
(Ignore these bits.)
It is convenient to use the RDSET instruction to read the bits since only
the least significant bit of the lower and higher bytes in the array elements
is used for the ON/OFF status of each control signal.
%(1)
Higher byte
Can be read by the instruction
RDSET(8, %(1)).
Lower byte
Can be read by the instruction
RDSET(0, %(1)).