01-05-2010 09:43 PM
Hi,
I'm tried to develop a supply control system.... The supply will be turn on follow the time schedule....
I have tried to construct my VI as shown.... but it got some problem there, could anybody please tell me the problem?
thank you very much.....
best regard
kelvin
01-05-2010 10:21 PM
01-05-2010 10:37 PM
Hi,
Not delay actually........ I want to turn on the the supply in range of time actually (example 9:20:00 till 10:35:00), so when the time in range, it will be true for the system........ but i need to update to now time for everytime i run it, could u tell me any other ways to prevent this?
Besides that i need to design for multi-range but when i have contructed as shown it can't function at all....
best regard
Kelvin
01-05-2010 10:52 PM
You'll have to provide more details. What do you mean "as shown it can't function at all"? What is it doing or not doing?
Instead of posting pictures, post the VI instead so we can play with it. Save some typical values in your control by saving them as default before saving and uploading the VI.
01-05-2010 11:00 PM - edited 01-05-2010 11:01 PM
Hi kelvin tay,
Please put the whole thing inside a while loop and give a valid times in the array,definitely it should work.Since you want those time values should also be updated every time you run ,you should add the relative time difference to the present time and reinitialise the array and then give the arry to the in range function?
Thanks and regards,
srikrishnaNF
01-05-2010 11:35 PM
Hi,
this is my VI...... it can't be true when time in range......
could u please tell me the problem?
thanks
01-05-2010 11:41 PM
01-05-2010 11:57 PM
You forgot to save some sample data in the arrays as the defaults before saving and uploading your VI.
Since you are only showing the time portion of the date/time in the array, it seems very like that srikrishna's answer is the solution to your problem.
01-06-2010 12:04 AM
Hi,
But my system want to run week over week, tat's y i oni show the time portion.....
best regard,
kelvin
01-06-2010 12:11 AM
Even though only time is shown, the date is still present in the timestamp. (If you don't enter any date in those timestamps, the time will be relative to 1/4/1903.) What you need to do is subtract midnight of the current day from the current time and compare that to your timestamps.
You may have to worry about your timezone in doing the math. Search the forums and you'll find numerous threads discussing all the time functions. And there are probably several ways of doing the mat to solve your problem. Also, browse through the time palette with context help turned on.
If you get stuck, post your VI at whatever stage you get stuck at with some real time data saved in the arrays as defaults.