Friday, September 17, 2010

That's Hystorical!

I tried to make the title funny on purpose. Sometimes people use the word "funny" instead of strange. For instance, "It is funny how the Historical Data does not seem to updating!"

I did this because this post addresses a problem with the History Data Object. The History Data object only updates when the window it is on, is opened. If new data comes in, the display just stays the same. Reopening the window, shows the new data.

If you are just checking data every once in a while, and flipping to and from the window, this usually is not a problem.
But, what if you need to see the data on a regular basis?
What if you are not changing windows while running your process?
How do you overcome this problem?

The solution I came up with was to put the History Data object on a separate window and pop it up with a Direct Window object using LB10 as OFF to trigger it. I then made a Set Bit object using LB10 with the Momentary attribute and a Label, "Refresh Data". By pressing the button, the momentary action closes the Direct window. Releasing the button recalls the Direct Window with the new History Data.

If you are unsure about how to use a History Data object, you might want to review this project. Here it is!

No comments:

Post a Comment