Remote Processing CX-10 User Manual
Page 29
RELAY AND OPTO INPUT LINES
SECTION 6
Page 6-4
Opto Buffered Inputs
Opto inputs are designated on the CX-10 board as IN1-
IN8. Common grounds are available on P2 and P4. See
Figure 6-4 above for location.
Below is a table of input designations and corresponding
modbus register number. Also given are register 1
weight values for inputs.
Input
designatio
n
Modbus
register
Register 1
bit position
Register 1
weight
value
IN1
11
1
1
IN2
12
2
2
IN3
13
3
4
IN4
14
4
8
IN5
15
5
16
IN6
16
6
32
IN7
17
7
64
IN8
18
8
128
Modbus register 1 returns the status of all 8 inputs as one
number. This may be useful in a Basic program where
bit testing is more expedient than accessing individual
registers.
For example, suppose “on” levels are required at IN1 and
IN5 to turn off relays. Basic code could be written as:
100 A = REGREAD(1)
110 IF (A .AND. 17) = 17 THEN REGWRITE 10,0
The value of 17 is computed by adding IN1 and IN5
weight values of 1 and 16. The “.AND.” operation filters
out inputs that are of no interest for this test.
Sometimes it is expedient to monitor just one line.
Suppose input IN2 monitors an alarm condition, such as
high water. You may want to close the gates in this
situation.
200 IF REGREAD(12) = 1 THEN GOSUB 2000
The routine at line 2000 gracefully closes the gates. By
“graceful”, power is removed from a motor for a time to
allow it to stop. Depending upon your location, this may
be 1 second. Then reversing relays are switched on.
Allow for a 50 milli-second delay for relays and
contactors to disengage and re-engage. Then main power
is applied.
LED Indicators
When an opto input has sufficient voltage applied to it, a
corresponding LED will illuminate. See Figure 6-5 for
input LED location.
These LED’s may be turned off/on, as a group, through
register 4826 to save some board power.