7 Analog Input + 2 Power Relay Module¶
The 7AI+2PR module (datasheet) is a module that contains 7 analog inputs and 2 power relays. The 7AI can work in two different modes: Polling and event mode, while 2PR can only operate in polling mode.
Different analog inputs can be read and set individually or jointly. Also, each relay can be set to a certain value and all of them can be read.
Information about how to program this node using Node-RED can be found here. Otherwise, if you want to develop your own applications using the multilanguage API, please check here for more information.
This module has its own microcontroller, which is able to manage and control all the module I/O.
Working Mode Configuration¶
In polling mode, the parameters are being measured continously. The measurement rate will be defined in the configuration node.
2PR only can operate in Poll mode.
In event mode, the parameters are measured depending on the event configured. Four types of event can be configured:
- Time interval: A specific time interval must be defined. The module will notify when the defined time will be accomplished.
- Value Threshold: A specific analog input value must be defined. The module will notify when the analog input value is bigger than the one defined in the configuration.
- Value within range: A specific range must be defined. The module will notify when the analog input value is in the range defined in the configuration.
- Value out of range: A specific range must be defined. The module will notify when the analog input value is out of the range defined in the configuration.
This module has 4 main functionalities, which are:
- Configure module parameters. In this case, you must define the pulse width for each relay, the working mode and the input mode for each analog input.
- Get the input value for one or all analog inputs.
- Activate or deactivate one, some or all relays.
- Get the current relays status for one or all of them.