Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Measurement Matters - The RealTime() Instruction


jra Dec 2, 2014 07:51 PM

Q: Is there a way for the datalogger to tell what day of the week it is?

A: Sure. The RealTime() instruction can do that and more. It gets the year, month, day, hour, minute, second, microsecond, day of week, and day of year from the datalogger clock and stores the results in an array. This is useful if you want the datalogger to do something, say, every Tuesday or not on weekends. Also, consider using RealTime() to control communications devices. In the example below a Boolean variable is set to True between 12:00:00 and 13:00:00 regardless of when the program starts.

Tip: The Example in the CRBasic Help has all the Alias declarations already typed out. You can copy from the example and paste into your program.

Learn more: More about Aliases
More about control


Next time: TimeIsBetween()

Log in or register to post/reply in the forum.