Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

asynchronous read/write using DIO wait in Labview

In labview examples, buffered pattern input.vi
when we are using for finite acquisition, it gives two options to read. 1. Synchronous & 2. Asynchronous
How they differ from eachother & how each works. Please explain me briefly both of this.
As per my knowledge :
In asynchronous , it waits for completion of acquisition & when acquisition stops, it starts read.
In synchronous, it starts reading & when required no. of acquisition completes, it will stop.
so please give me the difference and brief about the exact working of both the mode.
0 Kudos
Message 1 of 2
(3,222 Views)
Hi Vishal,

The terms used in the example, synchronous and asynchronous, are just terms chosen by the individual who created the example. There are a couple main differences in how they operate though.

In the "synchronous" case, the Dio Read.vi is a blocking VI with NI-DAQ driver versions 6.9.3 and earlier. This means that the call will hold the driver during operation and not release it until all samples have been acquired. Therefore no other application can access the NI-DAQ driver while this call is being processed.

In the "asynchronous" case, the DIO Wait.vi is a specialized VI that checks up on the driver to see if the driver has finished the digital operation or not. The parameter "Check every N milliseconds" (5ms is the default) is the "check
up" interval. The benefits of using this call is that it doesn't block the driver. Therefore, other DAQ applications can access the driver during this period for other applications (on perhaps other boards). When the operation is complete, the DIO Wait.vi finishes and the DIO Read.vi can acquire the entire buffer immediately.

The chosen words of aysnchronous and synchronous are just referring to the fact that the DIO Read accesses the data during operation or after operation respectively.

It is advisable for non-continuous applications to use the DIO Wait.vi to achieve the benefits of a non-blocking, yet task monitoring VI. Hope that helps. Good Luck.

Ron
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,222 Views)