04-01-2015 05:55 AM
Hello,
i am developing a GUI for a system which contains relays to control the motors. For the same purpose i am using switch control on my GUI to control these relays.when these relay are turned ON by the switch control on my GUI, they give back status to the GUI, which i am displaying as a switch status .
Now the switch control and switch status on GUI must be same every time so that user can know the actual state of relay and control it.
Now i have a condition when i have already turned ON switch from my GUI but due to some reason (may be communication fault or anything else) rellay is not turned ON and i get status of relay as OFF on my switch indicator. So the situation is" the switch control is in ON state and switch indicator displays OFF state". which is practically wrong.
I want that in this case the GUI should detect the status of the switch indicator and if the switch control is not the same , the switch control should be set as per the switch indicator so that user can use the switch again to turn the switch ON
04-01-2015 06:21 AM
04-02-2015 12:38 AM
Hello Mike,
Thanks for the response!!
As i have described the situation above, in any case if switch control fails to send message to relay due to some hardware fault , in that case relays will be off and the switch on GUI will be ON , and user will think that the relay is ON.Which is false condition.
i tried to use property value(signl) to give back the status of switch indicator to the switch control.
You can have a look at attached files which i have made as demo.
Now the problem is when i run my GUI for the first time all the switch on the front panel are off by default which creates a conflict to control the switches.
Besides i am unaware of the timing events and how to implement it in my application . It would be great if you could provide some more details about it.
Thanks & Regards,
Shivkant Paswan
04-02-2015 07:12 AM
I usually just have another LED to show the current status of the switches. Since you should have another loop or something constantly reading the status, the LEDs will always be up to date.
04-02-2015 10:30 AM