Re-Calculation of Voltage for AI/AO still valid?
-
Hi,
I own a Neuron M103 (the old one, not the current) which is still running with Raspbian 10/ buster.
I want to control my AO and read AIs through Modbus with my C-code.
I remember there was a calculation how to get to the value to be written to the register. Somethins with deviation, offset and so on. Mentioned here. But I was unable (or to dumb) to find any up-to-date documentation.
Checking the latest register map I see register 3000& 3001 marked as "Basic" for the value.
So I was able to set (and read later) a voltage to 5V through:
union { uint16_t word[2]; uint32_t dword; float fl; } wert; wert.fl = 5; ret = modbus_write_registers(connection, 3000, 2, &wert.word[0]);Am I right I do not need those mentioned calculations any more and I can set the value (float between 0 and 10)?
Thanks!
/KNEBB
-
Hello @knebb,
we do not provide support for Buster based systems anymore. However, on the latest firmware with BaseOS 12, the value is the actual value (the datatype is real - float32), there is no further calculation needed.