4-20 mA — Configuration
Configuration Parameters
In addition to the GW4 configuration parameters the add-on has the following specific parameters:
Analog Channel Parameters
| Key | Type | Default | Description |
|---|---|---|---|
ch1Enable | Bool | true | Enable measurement on 4–20 mA input channel 1 (CH1) |
ch1PreReadSec | Number | 1 | Wait time in seconds after powering CH1 before reading |
ch1Samples | Number | 200 | Number of samples taken for one CH1 measurement |
ch1Factor | Number | 1 | Scaling factor applied to the raw CH1 value |
ch1Offset | Number | 0 | Offset added to the scaled CH1 value |
ch1AlarmHigh | Number | [not set] | High alarm threshold for the CH1 measurement value |
ch1AlarmLow | Number | [not set] | Low alarm threshold for the CH1 measurement value |
ch2Enable | Bool | true | Enable measurement on 4–20 mA input channel 2 (CH2) |
ch2PreReadSec | Number | 1 | Wait time in seconds after powering CH2 before reading |
ch2Samples | Number | 200 | Number of samples taken for one CH2 measurement |
ch2Factor | Number | 1 | Scaling factor applied to the raw CH2 value |
ch2Offset | Number | 0 | Offset added to the scaled CH2 value |
ch2AlarmHigh | Number | [not set] | High alarm threshold for the CH2 measurement value |
ch2AlarmLow | Number | [not set] | Low alarm threshold for the CH2 measurement value |
alarmCron | String | [not set] | Cron schedule used while an alarm is active |
ch1PwrAfterBrownoutDur | Integer | 0 | Seconds to keep CH1 powered after first power-on or brownout |
chXFactor and chXOffset Parameters
The measured raw value is multiplied by chXFactor and then chXOffset is added. All further calculations and alarm checks are done with this derived value.
chXAlarmLow and chXAlarmHigh Parameters
If the calculated measurement value is above chXAlarmHigh or below chXAlarmLow, an alarm is triggered. The number of triggered alarms and the time spent in the alarm state are measured and transmitted.
alarmCron
If an alarm is active, this cron is used instead of the regular cron. If empty, the regular sensor cron is used.