LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Break a loop with Timeout

Dear all, I am writing a LabVIEW code to log data that are aquired through some RS-485 meters with an cRIO-9074, however sometimes that communication requires more time to complete and in that case I would like to break the communication task and pass to the next one in order to comply time requirements.

 

For an infinite loop that runs as fast as possible to the maximum number of cycle as possible with a specific Timeout it is possible to break the loop if the Timeout is reached, but the current loop is always completed, resulting in a loop that takes more time then the Timeout. How can I break the current loop if Timeout is reached?

 

I have tried several aproches with Tick Count or Timed Structures with no success. Is there a way to do it via State Machine?

0 Kudos
Message 1 of 3
(2,464 Views)

Would a Consumer/Producer loop work for you?

 

You'd have two loops: one to acquire the data, and another to consume the data.

0 Kudos
Message 2 of 3
(2,456 Views)

Isn't there a timeout on the communication nodes?  If you are using VISA, you can configure the timeout through a property node.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(2,452 Views)