Div_by_zero Posted September 9, 2017 Report Posted September 9, 2017 I have a Productivity 2000 PLC communicating with a 3rd party device (embedded C++) via Modbus. If I want to do, say, holding register writes... This may sound like a silly question, but how do I know what the value of a register is before I write a new value to it? Do I have to execute a read before I write, or are PLC write commands usually set up to do that for you? Agan, sorry for such a fundamental question.
Mark- Posted September 10, 2017 Report Posted September 10, 2017 Hello, >Do I have to execute a read before I write Depends. Function code 23 executes a read and a write with one command but, most devices do not support it. >PLC write commands usually set up to do that for you? No. Normally you want to write a value to the register regardless of the current register value My2c
Div_by_zero Posted September 11, 2017 Author Report Posted September 11, 2017 Thanks Mark. So it sounds like on my HMI, I will need a "Poll Parameters" button that will populate all the parameter values. Then, the user will be able to see what they are and change the ones that need to be changed with numeric entries. A "Write All Changes" button will facilitate that. Sound about right? Again, forgive me, I've never done this before. Thanks again.
Mark- Posted September 11, 2017 Report Posted September 11, 2017 Hello, To me, no. But, you have not defined who is using the device, the purpose of the communication, the level of security required, the design goals, etc..
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now