6/19/2009 10:38 AM | |
Joined: 11/21/2007 Last visit: 3/14/2024 Posts: 2323 Rating: (307) |
Hi I need to Calculate future Date and Time of Furnace Firing and display it to the operator in WinCC. The Basic Calculation is as follows : the CUR_DATE Tag contains the current time in String format as : DD/MM/YYYY HH:MM:SS The Tags ADD_HRS_01, ADD_MIN_02 are in INT format Two Future Times are to be calculated as : CALC_DATE1 = CUR_DATE + ADD_HRS_01 ( Hours ) + ADD_MIN_01 ( Minutes ) CALC_DATE2 = CALC_DATE1 + ADD_HRS_02 ( Hours) + ADD_MIN_02 ( Minutes) I have written the VB Script to achieve this , which is attached. This does not seem to work. What am I doing wrong ? ( Sorry I am not veryfamiliar with VB programming so may be a stupid mistake !!!) Thanks Navnag AttachmentDatetime.zip (90 Downloads) |
There is no such thing as the last bug in a program |
|
6/19/2009 12:27 PM | |
Joined: 6/13/2006 Last visit: 2/11/2023 Posts: 341 Rating: (24) |
I have modified your vbs. Please try this attachement. reagrds, rit03 AttachmentDatetime_mod.zip (142 Downloads) |
6/19/2009 12:50 PM | |
Joined: 6/13/2006 Last visit: 2/11/2023 Posts: 341 Rating: (24) |
Or try this regards rit03 AttachmentDatetime_mod2.zip (177 Downloads) |
6/19/2009 1:53 PM | |
Joined: 6/13/2006 Last visit: 2/11/2023 Posts: 341 Rating: (24) |
Thanks for the feedback. Glad to know it's working. Regards, rit03 |
Last edited by: rit03 at: 6/19/2009 2:00 PM |
|
Follow us on