Skip to main content

4-20 mA — Configuration

Configuration Parameters

In addition to the GW4 configuration parameters the add-on has the following specific parameters:

Analog Channel Parameters

KeyTypeDefaultDescription
ch1EnableBooltrueEnable measurement on 4–20 mA input channel 1 (CH1)
ch1PreReadSecNumber1Wait time in seconds after powering CH1 before reading
ch1SamplesNumber200Number of samples taken for one CH1 measurement
ch1FactorNumber1Scaling factor applied to the raw CH1 value
ch1OffsetNumber0Offset added to the scaled CH1 value
ch1AlarmHighNumber[not set]High alarm threshold for the CH1 measurement value
ch1AlarmLowNumber[not set]Low alarm threshold for the CH1 measurement value
ch2EnableBooltrueEnable measurement on 4–20 mA input channel 2 (CH2)
ch2PreReadSecNumber1Wait time in seconds after powering CH2 before reading
ch2SamplesNumber200Number of samples taken for one CH2 measurement
ch2FactorNumber1Scaling factor applied to the raw CH2 value
ch2OffsetNumber0Offset added to the scaled CH2 value
ch2AlarmHighNumber[not set]High alarm threshold for the CH2 measurement value
ch2AlarmLowNumber[not set]Low alarm threshold for the CH2 measurement value
alarmCronString[not set]Cron schedule used while an alarm is active
ch1PwrAfterBrownoutDurInteger0Seconds 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.