I'm new to ignition so please excuse any incorrect terminology.
I have a UDT called Alarms which consists of 8 tags. One of the tags is called State, whos value ranges from 1 to 4 (integer). i want to create a table/dataset that contains the values of the 8 tags (including State) for any instance of Alarms where the value of State does not equal 4. Is there a way to do this?
Short answer is yes, probably via scripting or by using pturmels' Integration Toolkit to use an expression tag instead of a script.
Basic outline would be to use a Gateway Tag Change event, or maybe a Timer event, to monitor the state value of all the UDT's, and on change (or a set rate when using timer), loop through all the UDT's and collect the tag values of all UDT's where the state does not equal 4.
Depending on the number of instances you could fetch all UDT's and their tag values or you could do an Initial fetch of the State tag values and use that to build the larger list for fetching the additional values.
You would then build your dataset from these values and place it into a Gateway Memory tag for storage/display.
hey mate, appreciate the response. I have added a project library script that populates the table as expected, but i was just wondering if there is a way to prevent the script from running when it doesnt need to? pretty much, is there a way for the script to fire only when the table needs to be updated?
If you change the 1000 to 0, it will only execute once at view load. Then you can provide a button or other means with a click event for the user to trigger the same script.