Digital Multimeters (DMMs) and Precision DC Sources

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Occurrence on NI-4351

Hi there:

I am using a NI-4351, a PCI-6052E and a PCI-6713 card on a 1.2 GHz Pentium III with 256 MB of memory under Windoze XP and LabVIEW 6.0i. Each card has its own while loop for reading/writing data, and all three loops are in parallel.

The NI-4351 lopp is causing me a headache. It is so slow, that it gates everything when I read data from it via the AI Single Scan VI. I cannot do anything faster than about 1.5 s, which is close to the multichannel speed of 9.7 Hz divided by 14 channels.

So I wanted to use a DAQ Occurence (via the DAQ Occurence Config VI with the DAQ Event set to 2) which checks when the acquisition is complete and only then calls the AI Single Scan VI. However, when I do so, I receive "Error -10403 occurred at D
AQ Occurence Config". Does that means I cannot use a DAQ Occurence on this card (NI-4351)?
Are there any other ways to bypass the slowness of this card, i.e. make it do whatever it needs to do (which is mostly being idle) in the background, and let everything else proceed at its own speed? Did I buy a useless card?

Please advise. Thanks.

Matt Koch
0 Kudos
Message 1 of 2
(6,977 Views)
I also had such a problem with the NI4351. I resolved it that way:
Use the VI 'AnalogInput' ('AI') Config and define a sufficient large buffer. Start the aquisition with the SubVI 'AI Start'. Now comes the trick: Within the loop (best use a timed loop, not a regular one - it consumes less CPU time and set it best to 300 ms or longer) use the SubVI 'Read' from the menu 'Advanced AI' (important! - not the SubVI 'AI Read'). Select the input 'Data to read' (sorry - i have the german version, so the input name might be different) and set it to '0'. This operation will check the buffer for new entries without really reading it. Now check the 'scan backlog' output whether it is nonzero. If so, use the 'scan backlog' value within a case structure to read the buffer with a copy of the SubVI 'Read'.
So you might ask, why not reading the buffer directly.  You now can set the timed loop to 2 s and the loop will read 1...2 values per loop at maximum scan rate (the VI 'AI Start' will give you the exact rate in scans/sec...) with a minimum of CPU load.
However, i experienced a small but annoying difference between the SubVI 'AI Read' from the menu 'Analog Input' compared to the SubVI 'Read' from the menu 'Advanced Analog Input': When using the first, CPU load will be maximized while for the second VI the load is neglectable (even on a PII 300!). Nevertheless there seems to be a huge difference between the two versions: the read values differs. Depending on the desired accuracy, this can be very annoying - since you have to check first with an additional device, which voltage value is the 'true' one.... Maybe an expert here can tell us more about that!
0 Kudos
Message 2 of 2
(6,658 Views)