...
The communication was tested with Raspberry PI (version 3) and NPE - X500-M3-MAX-3G.
For Raspberry PI, the protocol supports reading of digital inputs (instantaneous values as well as counting signal changes with an optional time filter) and setting digital outputs to a constant value or pulse-width modulation (PWM).
...
Full name | Description | Units / size | Default value | ||||||
---|---|---|---|---|---|---|---|---|---|
| Type of device. Currently supported are::
| - | Raspberry PI | ||||||
| Name of library with communication functions for a particular device. The used values are:
| - | - | ||||||
| Delay after one reading of the values of all I/O tags. Using this parameter, it is possible to control the reading frequency more finely than using the polling parameters in the configuration of time parameters of the station. | ms | 1 |
...
Address | Description | I/O tag type | Examples |
---|---|---|---|
DI,id | The GPIO pin will be configured as a digital input. If the voltage of 3.3V is applied to it, the value of input will be 1. If 0V (ground) voltage is applied to it, the value of input will be 0. | Di, Ci, Ai | DI,25 DI_UP,24 |
DO,id | The GPIO pin will be configured as a digital output. If a value of 1 is written to it, the output will be 3.3V. If 0 is written, output voltage will be 0V (ground). | Dout, Co, Ao | DO,24 |
TRIGGER,id[,filter] TRIGGER_UP,id[,filter] TRIGGER_DOWN,id[,filter] | The GPIO pin will be configured as an counter of input events with an optional filter. The counter can register rising signal edges 0V → 3.3V (TRIGGER_UP), falling edges 3.3V → 0V (TRIGGER_DOWN) and arbitrary signal changes (TRIGGER). | Ci, Ai | TRIGGER,24 TRIGGER,25,1000 |
PWM,id | The GPIO pin will be configured as PWM (pulse width modulation) output. It is then possible to write values 0-255 controlling the width of pulse from fully off to fully on. | Dout, Co, Ao | PWM,12 |
REVISON | The revision of the hardware (the number from the "Revision" line from the /proc/cpuinfo file. For example, for RPI 3 in this file is the row "Revision : a02082" and the revision value is 10494082 (after conversion from hexadecimal system). | Ci | REVISON |
I/O tag addresses for NPE - X500
In the following table, id defines the number of input/output (e.g. DI, DO, AO). The number of inputs and outputs depends on the particular model. The notes are referring to the NPE - X500-M3-MAX-3G that was tested.
Note 1: Output points whose addresses contain _BUF use a buffered writing. This allows the values of such objects not only to be written, but also to be read, which can be useful, for example, after the start of the KOM process.
Note 2: With the tested model, the reading of the digital input took less than 1 ms, while the reading the analog input took approximately 20 ms.
...