Analog Output- which regsiter to use in modbus?

  • Hi all,

    I am on the way in using the C library modbus to read/write to my Neuron M103.

    I have a question regarding the documentation:
    Here it writes about the calculation of the value to be set for the desired voltage.

    Now I checked the Register Docs and found two addresses:
          2  Analog Output (raw value) as Obsolete
    3000 Analog Output value as Basic

    So would I write to address 2 using the calculated value?
    Or woud I use the desired voltage (0-10) to write to address 3000?
    Or calculate and write to 3000?



  • @knebb
    Answering myself as I figured it out by try&error. Use address 2. Use values from 0 to 4096 (as documented).

    However, I measured the AO port and never came above 8V (with 4096) with default settings (did not change any of Vref, Vrefint, Voffs, Vdev). Is this measurement issue or something wrong with my code?


  • administrators

    Hi @knebb, there are two approaches and you figured out both of them:

    1. Do the calculation and write to register 2
    2. Write a value to the register 3000. The value has to be 32bit signed integer.

    I checked the documentation and I think there is a mistake with the registers 3000, 3001 and 3002. Those should be 3000, 3002 and 3004 since the 32bit values need two consecutive registers. I will check what is in the firmware and let you know!

    Best regards,

Log in to reply