I have a button in which I am trying to change a tag value as per certain conditions. The tag values changes multiple times during the execution of the script. I am trying to see these variations on designer window . I have bound the tag value to a component . I am able to see only the final value on the component… (only after the execution of the button script completely). How to fix this problem? I want to see the changes on the tag value on the window.
Thank you for the response. There is no external device. I am working with secs gem ( the inbuilt simulator is used) where a button triggers a series of event runs. So I want to see a status change on a particular tag. So, it needs to be updated in accordance to the event run. The tag value is getting updated, but I can’t see it on the designer window as it shows only the final value ie. only after completing the whole script inside the button. Is there any way to fix this?
There is no bug in Ignition to fix. The error is in your use of an event routine for a long-running task. You cannot do this. (Not in any modern programming language–not just Ignition.) There are two approaches you can take for a problem like this:
Run the long task in an asynchronous thread, using the techniques in the linked topic to interact with the GUI, or
Break your task into many individual operations that run quickly as part of an appropriate trigger event, typically with an accompanying state machine.
In general, if you use any form of sleep or busy looping in an event routine, you’ve screwed up.