LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

QMH | How to implement timed I/O communication

The "Read on demand" and "write periodically" will never be 100% compatible, since e.g. the period will be delayed while Writing.

But with that caveat mentioned, there are several solutions.

1. You could e.g. have one consumer loop that does all read and write and have one producer loop that simply adds a Write command periodically. Any UI loop (assumingly) would queue up a read command.

2. If the read if fast enough you can use one common VI for read and write and read directly in the UI loop. The VI will prevent any simultaneous action.

3. Consumer loop can write periodically in a timeout case, in which case you need to keep track of time since last write to update timeout dynamically.

I bet there's more. 🙂

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 11 of 12
(307 Views)

Thank you all for your different suggested approaches.

After comparing them I decided to go with a seperate loop, which periodically queues up a read command.

At last it seems to always be a matter of trading-off to get the best result for a specific application.

 

Message 12 of 12
(290 Views)