TS-7120 RELAYS

From Technologic Systems Manuals

The TS-7120 has six on-board relays. The first four relays have normally-open and normally-closed contacts brought out on the terminal block CN32-A. The remaining two have normally-open contacts only, also brought out on CN32-A.

The relays may be controlled via the sysfs, as shown in the example below.

# first step is to configure GPIO for the six control lines
echo 132 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio132/direction  
echo 133 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio133/direction  
echo 134 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio134/direction  
echo 135 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio135/direction  
echo 136 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio136/direction  
echo 137 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio137/direction  

# turn on relay #1
echo 1 > /sys/class/gpio/gpio132/value

#turn it off again
echo 0 > /sys/class/gpio/gpio132/value