I have been playing with a C# program where I want ot "publish" values via mobus and I have it working with Easy Mobus.
I can load the holding registers pretty easy by :
modbusServer.holdingRegisters[1] = 123456;
how to I update the value within the program?
modbusServer.holdingRegisters[1] = 654321;
Does not seem to effect the reading
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
this is the correct way to change a holding Register programatically.
Take care that the Modbus connection does not overwrite your register, and that the Registers, you request to read by the client, are shifted by "-1". If you want to read holding Register "1", you have to send a request Read Holding Registers with startingAddress "0".
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"
I have been playing with a C# program where I want ot "publish" values via mobus and I have it working with Easy Mobus.
I can load the holding registers pretty easy by :
modbusServer.holdingRegisters[1] = 123456;
how to I update the value within the program?
modbusServer.holdingRegisters[1] = 654321;
Does not seem to effect the reading
Hi,
this is the correct way to change a holding Register programatically.
Take care that the Modbus connection does not overwrite your register, and that the Registers, you request to read by the client, are shifted by "-1". If you want to read holding Register "1", you have to send a request Read Holding Registers with startingAddress "0".