Using Global DateTime
I also tried using the global variable datetime element. I tried making one called TimeNow with the Variable Type "DateTime" and when I try to use it, I get errors.
For example, when I tried doing
new datetime o_t
new datetime othertime
o_t = TimeNow datetime
othertime = now
it doesn't work, and I get a "no property found with name datetime". Commenting out the global parts, the "othertime" datetime variable prints fine.
However if I have TimeNow set to a Value (5) instead of DateTime I can do
new value o_t
o_t = TimeNow value
and it is fine, printing out "5".
So I guess I'm confused on the use of datetime elements, or there is something else up.
My global that works...
new datetime HLTpreheat
HLTpreheat = "05:00:00"
wait "HLTpreheat" <= now