From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
I'm using labview for some basic automation of a relay board and I haven't been able to find a function to use to make it wait a specified amount of time before sending the next write command, ie Serial Write, wait 6 hours, write again. Can someone tell me what function I would need to use to get this done?
I would generally use a state machine because you will want your user to be able to abort in the middle of the delay. You can use use the time of day (in seconds) and check this at some periodic basis. You dont' want to poll so quickly that you consume all of the CPU cycles and you don't want to delay too long so you can still respond quickly to user requests such as aborting the application.
Mark Yedinak Certified LabVIEW Architect LabVIEW Champion
"Does anyone know where the love of God goes when the waves turn the minutes to hours?" Wreck of the Edmund Fitzgerald - Gordon Lightfoot
I agree about using the Wait (ms) or Delay function. Using the Tick Count or Elapsed Time function would work as well as any of the Get Date Time functions.