using delays in the channel event locks up DAQFactory


rmocogni

Recommended Posts

I'm trying to use an event in one of my channels. I just want to turn a relay on and off based on temperature readings. When I use the delay() command for more than 10 seconds it locks up the program. I need to turn the relay on for 15 minutes, so should I put this code somewhere else besides the channel event? Thank you, Ron

Link to comment
Share on other sites

That is expected. It says in a number of places I believe in the help that you CANNOT use delay() in a channel event (or any event really), or do anything that would take a long time. The event runs in the thread of the triggering process and so delays simply backlog into the process and hang the thread. If you need to do something long triggered from an event you should put the long stuff in a sequence and start the sequence from the event using:

beginseq(mysequence)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.