How to set gain/offset for 4AD module?

Version 2.1 by Jiahao Lai on 2026/07/27 16:04

Below is gain/offset caculate formula:

1677893778296-945.png

Note: the unit of Analog input is μA/mV

For value of "constant" please check the table:

1677893932191-907.png

For example, when set channel as 4mA~20mA to 0~1000, the default offset, gain, constant is 4000, 20000, 1000.

If user want to change it as 4mA~20mA to 400~2000, the gain/offset calculation can be done by the following two formulas:

1. 400=(4000-offset)*1000/(gain-offset)

2. 2000=(20000-offset)*1000/(gain-offset)

So the offset and gain should be 0 and 10000