Prevent iX from "guessing" the value of a register

Discussion of configuring and troubleshooting communication to PLC's or other devices using iX Developer.
Post Reply
fsturlese
Posts: 36
Joined: Tue Nov 22, 2011 11:57 am

Prevent iX from "guessing" the value of a register

Post by fsturlese »

Hello,
we are having a problem with the Modbus/TCP master driver: when writing a value to the controller, iX seems to "trust" that the value will be actually accepted by the controller, and updates its internal database to reflect the write operation before reading again the value from the controller. If the controller does not accept the value written, or returns a different value, the result is a glitch of the value read.

Example: our controller uses the same register to toggle a switch and return the status of the same switch. The toggle operation is done by a momentary setting to 1 of the register. Let's assume that we have a pushbutton that sets the register, and a lamp that shows the value of the same register:
- Current value of register = 0 (switch off, the switch status lamp is off)
- Now push the button: the value 1 is written to the register
- iX updates its internal database to 1, and the lamp turns on
- Now release the button: the value 0 is written to the register
- iX updates its internal database to 0, and the lamp turns off
- Our controller understands that the switch must be switched on: turns the hw output on and updates the value of the register
- iX reads the register back and gets 1 from the controller, so the lamp turns on again
The annoying effect is that when pushing the button, the lamp goes on, then off, then on again.
Note that, during the entire operation, the register from the controller reads always 0 until the I/O switch changes status, after then it reads 1 steady, without any glitch. The glitch is due to the assumption of iX that the register has gone to 1 without reading the actual value.
Is there any way to disable this kind of pre-fetch of the register?
Thanks, Federico.

User avatar
Ron L.
Posts: 214
Joined: Fri Jul 15, 2011 3:21 pm

Re: Prevent iX from "guessing" the value of a register

Post by Ron L. »

I would try configuring the tag you are using to Write only and see if that helps.
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer

Post Reply