You are getting the very rare weekend post out of me, I can't do a lot of testing because my only way to test stuff is at work, but I can help where I can.
Alrighty, I understand what is going on much clearer now, the "Value" tag (which yes, if it's not in the PLC would be a memory integer) is your Desired Total for the day. I think that Your "Flow" tag is your current total since 10:00 AM. And you want to see How much flow total you need to meet your goal. I hope I am understanding this right.
This should get you going in the right direction, but it's pretty inelegant if that is alright.
So what you can do is Kind of create a countdown script that counts down every hour.
Type: Data Change: $Hour
Code:
HoursRemaining = HoursRemaining - 1;
IF $Hour == 10 THEN HoursRemaining = 24;
ENDIF;
This is what determines how many hours are left till 10:00AM. The only problem I can see with this is that it wouldn't be right until the next time you want to reset your totalizer, aka the next 10:00 AM. If that's not alright, you can just manually set the value of the tag when you make it to however many hours you have left. But after that, it should work just fine.
Your final code should look something like this.
Code:
Result = ((Value - Flow) / HoursRemaining) x (24);
Result is another memory integer by the by.
Note: I really hope that "Value" and "Flow" aren't your actual tag names, use something more descriptive! It will help tremendously in the future.
So now you can run that script whenever you want to in order to update the value of "Result". Be it periodically, or at the press of a button. If you just wanted to create a Display that updates live, you can use a "Display Integer" animation link on just a piece of text. For our apps if we have a live display of a value, we just make the text ####### for spacing and so we know what is supposed to be there. In that dialog box that comes up when you click "Display Integer", you can put the whole expression in the box I believe, meaning what you stick in the box is:
Code:
((Value - Flow) / HoursRemaining) x (24);
That should give you a live update on that piece of text.
I apologize for how long it took me to write this, I have to edit my posts often. I tend to make very, very long run on sentences just filled with comma splices.
I really hope this works! I've only been working with InTouch for about a year and half now, and I am mostly self taught, but I picked it up pretty quick! I guess HMI development is just my favorite little chore that we do.
If it doesn't work, Please let me know, and I'll be happy to see what's up or ask for some help from some of our
real WonderWare Gurus.