Omron trajexia CJ1W-MCH72 Operation Manual page 185

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

Advertisement

All BASIC commands
4-2-136 IN
174
Example
IF key_char=$31 THEN
GOSUB char_1
ELSEIF key_char=$32 THEN
GOSUB char_2
ELSEIF key_char=$33 THEN
GOSUB char_3
ELSE
PRINT "Character unknown"
ENDIF
See also
N/A
/i
Type
I/O function
Syntax
IN(input_number [ ,final_input_number ])
IN
Description
The IN function returns the value of digital inputs.
IN(input_number, final_input_number) will return the binary sum
of
the
final_input_number]. The two arguments must be less than 24
apart.
IN(input_number) will return the value of the particular input speci-
fied by the parameter input_number.
Arguments
input_number
The number of the input for which to return a value. The range for
this parameter is 0..255.
final_ input_number
The number of the last input for which to return a value. The range
for this parameter is 0..255.
Example
The following lines can be used to move to the position set on a thumb
wheel multiplied by a factor. The thumb wheel is connected to inputs 4,
5, 6 and 7, and gives output in BCD.
moveloop:
MOVEABS(IN(4,7)*1.5467)
WAIT IDLE
GOTO moveloop
The MOVEABS command is constructed as follows:
Step 1: IN(4,7) will get a number between 0 and 15.
Step 2: The number is multiplied by 1.5467 to get required distance.
Step 3: An absolute move is made to this position.
Example
In this example a single input is tested:
test:
WAIT UNTIL IN(4)=ON ' Conveyor is in position when ON
GOSUB place
See also
OP.
group
of
inputs
Section 4-2
in
range
[input_number,

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents