• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Analog Output- which regsiter to use in modbus?

    UniPi Neuron Series
    2
    3
    560
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      knebb last edited by knebb

      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?

      Thanks!

      /KNEBB

      K 1 Reply Last reply Reply Quote 0
      • K
        knebb @knebb last edited by

        @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?

        /KNEBB

        Martin Kudláček 1 Reply Last reply Reply Quote 0
        • Martin Kudláček
          Martin Kudláček @knebb last edited by

          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,
          Martin

          1 Reply Last reply Reply Quote 0
          • First post
            Last post