Computers for industrial control and automation systems

RB700 Digital inputs

Digital inputs

Pigeon computer RB700 has 8 digital opto-isolated inputs and 4 dry contact inputs.

Digital opto-isolated inputs

8 digital opto-isolated inputs are divided into two sections. See picture below.

opto-inputs

Fig. 1. Digital opto-isolated inputs connection

The following table shows the assignment between the opto-isolated inputs and the GPIO.

Table 1. Digital opto-isolated inputs

Inputs gpiod GPIO Sysfs
I1 gpiochip2 8 GPIO496
I2 gpiochip2 9 GPIO497
I3 gpiochip2 10 GPIO498
I4 gpiochip2 11 GPIO499
I5 gpiochip2 12 GPIO500
I6 gpiochip2 13 GPIO501
I7 gpiochip2 14 GPIO502
I8 gpiochip2 15 GPIO503

When the input voltage is in the range of 0 - 5V, the logic state of the GPIO is one (negative logic). When the input voltage is in the range of 10 - 28 V, the state of GPIO is zero.

Table 2. Digital opto-isolated inputs parameters

Parameter Value
Quantity of inputs 8
Low-level input voltage 0 ... +5 V DC
High-level input voltage +10 ... +28V DC
Isolation voltage 5 kV RMS
Input resistance >=10kOhm

Dry contact inputs

The following table shows the assignment between the dry contact inputs and the GPIO.

Table 3. Dry contact inputs

Inputs gpiod GPIO Sysfs
ID1 gpiochip0 12 GPIO12
ID2 gpiochip0 13 GPIO13
ID3 gpiochip0 16 GPIO16
ID4 gpiochip0 17 GPIO17

When the input is shorted to GND, the logic state of the GPIO is one. Otherwise, the state of GPIO is zero.

 

dry-contactl-inputs

Fig. 2. Dry contact inputs connection

Linux kernel GPIO user space interface

gpiod

Installation of the gpiod tools:

apt install gpiod 

Read input I1 state:

gpioget gpiochip2 8

Read input ID1 state:

gpioget gpiochip0 12

GPIO Sysfs Interface for Userspace

Read input I1 (GPIO496) state:

echo "496" > /sys/class/gpio/export
cat /sys/class/gpio/gpio496/value
1
echo "496" > /sys/class/gpio/unexport

Read input ID1 state:

echo "12" > /sys/class/gpio/export
cat /sys/class/gpio/gpio12/value
1
echo "12" > /sys/class/gpio/unexport

 

Links

Back to Top