Omron trajexia CJ1W-MCH72 Operation Manual page 236

Sysmac cj-series programmable controller
Hide thumbs Also See for trajexia CJ1W-MCH72:
Table of Contents

Advertisement

All BASIC commands
4-2-197 READ_OP
/i
Type
I/O command
Syntax
READ_OP(output_no)
READ_OP(first_output_no, last_output_no)
Description
READ_OP(output_no), returns the binary value (0 or 1) of the digital
output output_no.
READ_OP(first_output_no, last_output_no), returns the number that
is the decimal representation of the concatenation of the binary values
of the range first_output_no to final_output_no.
Note: The difference between first_output_no and last_output_no
must be less than 24.
Note: Outputs 0 to 7 do not physically exist on the CJ1W-MCH72. They
cannot be written. Their return value is always 0.
Note: READ_OP checks the state of the output logic. READ_OP can
return the value 1 even if no actual output is present.
Arguments
output_no
The number of the output.
first_output_no
The number of the first output of the output range.
last_output_no
The number of the last output of the output range.
Example
If output 11 has value 1, output 12 has value 1, output 13 has value 0,
and output 14 has value 1, READ_OP(11,14) returns 13 (1101 bin).
Example
In this example a single output is tested:
WAIT UNTIL READ_OP(12) = ON
GOSUB place
Example
Check a range of 8 outputs and call a routine if one of them has value 1:
op_bits = READ_OP(16, 23)
IF op_bits <> 0 THEN
GOSUB check_outputs
ENDIF
See also
N/A
Section 4-2
225

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents