Menu

Change register value on server side

Anonymous
2015-08-01
2015-10-16
  • Anonymous

    Anonymous - 2015-08-01

    How do I change a register value on server side.
    I'm using VB.Net. Please look at the following code.

    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    Dim mbServer As New ModbusServer
    mbServer.Listen() ' Start server
    mbServer.holdingRegisters.SetValue(?,?)
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    How do I use the SetValue function?
    Thanks

     
    • Rossmann Engineering

      You can change the Register Values directly in the Array of the Server Class
      Int16[] holdingRegisters

       
  • Anonymous

    Anonymous - 2015-10-09

    I am also trying to write the register values directly on a server. I want to write a float value but the array that ModbusClient.ConvertFloatToTwoRegisters() returns is an integer array that may overflow Int16[] holdingRegisters.

    Which coversion should i make after? I can´t handle it.

    Thank you very much.

     
    • Rossmann Engineering

      Here is an example how to write float values into a Server.

      modbusClient.WriteMultipleRegisters(4, ModbusClient.ConvertFloatToTwoRegisters((float)47.11,ModbusClient.RegisterOrder.HighLow));

       
      • Anonymous

        Anonymous - 2015-10-16
        Post awaiting moderation.

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.