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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
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
You can change the Register Values directly in the Array of the Server Class
Int16[] holdingRegisters
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
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.
Here is an example how to write float values into a Server.
modbusClient.WriteMultipleRegisters(4, ModbusClient.ConvertFloatToTwoRegisters((float)47.11,ModbusClient.RegisterOrder.HighLow));