Using Global DateTime
I am trying to compare two Global DateTime values and the syntax I'm using isn't working.
wait G_TimeDate value >= A_StartTime
LED state = on
This is the error i get:
[ERROR: Object reference not set to an instance of an object.]
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.
Yes, this seems not to work. Let me investigate.
My global that works...
new datetime HLTpreheat
HLTpreheat = "05:00:00"
wait "HLTpreheat" <= now
Thanks, but there is no reference to a global here. That variable is a local one (to the script it’s in).
OH, my bad.. I didn't read enough. I was on the phone while browsing.. disregard.