AC (Customer) asked a question.

Formula to write voltage to analog output over Modbus

Need to set 0-10v on a CO-04DA-2 analog output using a Modbus driver. Is there a formula?

 

Thanks in advance


  • Garry (Customer)

    Hi AC,

    There really is no formula. You would set up your analog output card with scaling to indicate the range from 0 to 10 volts.

    click modbus analog out1You can see that this scaling defaults to 0 to 100. I have changed the configuration to 0 to 1000 which represents 0 to 10VDC. Floating point is difficult to transfer over Modbus so I would just use the DS registers and transfer them to the DF area.

    click modbus analog out2The Modbus addresses for DS1 to DS4 are as follows:

    click modbus analog out3As DS1 to DS4 change from 0 to 1000 the analog output will be set.

    I hope this helps you out.

    Regards,

    Garry

     

    https://accautomation.ca/series/click-plc/

     

    Expand Post
  • AC (Customer)

    What about the formula to set the registers? For example if I want to set the output to 7 volts I currently write 16608 to address DF5 with my Modbus driver. Works great. However the scale does not appear to be linear. If for example now I want to set DF5 to output 2.3 volts, it's not clear what values I would write. Is there a formula to convert 0-10v to register values?

  • AC (Customer)

    Ah OK:) Thank You