Previously, 2^n was used (where n is resolution of the module).
The EL4002 will be used as an example.
The EL4002 is an analog output module which supports 0 to 10V output.
When 2^n is used as the range of this module, 0V will be the output
as a result of module.write(10) due to integer overflow.
The module does support 10V output. When 2^n-1 is used, the module
does indeed output 10V as a result of module.write(10).
Previously, 2^n was used (where n is resolution of the module). The EL4002 will be used as an example. The EL4002 is an analog output module which supports 0 to 10V output. When 2^n is used as the range of this module, 0V will be the output as a result of module.write(10) due to integer overflow. The module does support 10V output. When 2^n-1 is used, the module does indeed output 10V as a result of module.write(10).
Signed-off-by: Johan Robben jrobben@octinion.com