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

    Re-Calculation of Voltage for AI/AO still valid?

    Neuron Series
    2
    2
    774
    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,

      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

      C 1 Reply Last reply Reply Quote 0
      • C
        cleve administrators @knebb last edited by

        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.

        Best regards,
        Kryštof Černý - Unipi engineer

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