Set Window to Always Updating

Is there a way to set a window to always updating? I have a table that is populating based on client event scripts, but if that window isn’t in the foreground the tables won’t update.

So, the table’s data property is not bound to a polling SQL query but rather set from a client event script? If so, can you post an example of the script?

Hello,

This is the Client Event Script I am running, it is triggered when a step/index changes in the PLC. I can’t seem to update my table with the new dataset unless my window is in the foreground.

Thanks.

#Set the index based on the tag value that changed
index = newValue.value
#Set the window
window = system.gui.getWindow(‘Main Control’)

#TimeSP
TimeSP = float(system.tag.getTagValue(“PLC/SM_STATE_LIST/SM_STATE_LIST_” + str(index) + “/TimeInStateSP"))
#Description
Description = system.tag.getTagValue("PLC/SM_STATE_LIST/SM_STATE_LIST
” + str(index) + “_/StateName/STRING”)

#Create the row data array
newRow = [TimeSP,Description]
#Create a new dataset with the added row
updatedDS = system.dataset.addRow(window.getRootContainer().getComponent(‘tblCycles’).data, newRow)
#Update the table with the new dataset
window.getRootContainer().getComponent(‘tblCycles’).data = updatedDS

How about this…

instead of updating the table directly, update a client tag instead (client tags may be datasets). Then you can bind the table to the client tag and… and… I was trying for a climactic finish, but that’s pretty much it. :laughing:

If you update a tag instead, it’s not relying on the window to be front and center.

We went over this in a support call and got it solved. We bound the client tag to the root container and added the script to a propertyhange event. But for the original problem: the table does update if the window is in the background.