Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Aug 16, 2007


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Asynchronously Reading the AI Read Drop-In Replacement

2 ratings | 5.00 out of 5
Print

Downloads

Filename: 1083.zip
Requirements: View

AI Read.vi is a synchronous operation that monopolizes the thread it runs in until the data requested is received. This example uses the scan backlog to implement a drop-in replacement, AI Read (Asynchronous).vi, which reads the replacement asynchronously and allows other operations to obtain CPU time while waiting for data.

This type of operation can also be implemented using DAQ occurrences, but not as simply as replacing the existing AI Read.vi with this AI Read (Asynchronous).vi. Refer to the block diagram and documentation in VI Properties for more information on implementation.

NOTE: Due to the operation of this VI, you must wire a positive time-out period of sufficient duration for your operation so it will function properly. If you leave the default input of -1 wired, you will receive a -10800 error every time you try to run it.

Requirements


Filename: 1083.zip

Software Requirements


Application Software: LabVIEW Full Development System 5.0
Language(s): LabVIEW

Hardware Requirements


Hardware Group: Multifunction DAQ (MIO)
Driver: Traditional NI-DAQ (Legacy) 6.5.0

 
2 ratings | 5.00 out of 5
Print

Reader Comments | Submit a comment »

Asynch AI Read doesn't always work
Asynch AI Read doesn't work the same in all cases, nor as desired for slow scanning SCXI apps.) I tried it using a DAQ board, and I love it. However, I tried it scanning 3 SCXI modules @ 1 hz, and 'AI Readwith#scans=0' does not pick up the just-completed scan at the exact time it comes in. It seems to need about 50-200 milliseconds after the scan is completed to indicate the existence of the scan in the scan backlog. Be aware of this if you're planning to use the 1Hz rate from the Asynch AI Read as a timing basis for the rest of your program.
- Alan R. Bentz, Kodak. alan.bentz@kodak.com - May 16, 2003

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).