From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronized Continuous Acquisition from nine PXI-6123 cards

I'd like help to code a VI that will perform synchronised continuous acquisition from nine PXI-6123 cards.  The shipped examples include Multi-Device Synch-Analog Input-Cont Acquisition.vi and some simplified examples of continuous acquire and graph.

 

Attached is a VI that will perform synchronised acquisition up to the size of the on-board memory (tried and tested).  I'd now like to make changes to implement synchronised continuous acquisition.  For now, I'm assuming for a continuous acquisition the correct approach when using DAQmx will be a producer-consumer architecture utilising a DAQmx Read VI that uses the minimal number of bytes to return the data, the consumer loop writing the data in binary format.

 

My understanding of the 6123 PXI cards is that each have 16Msamples onboard memory. Each 16-bit sample can be represented using I16, occupying 2bytes, therefore 8 channels per card gives us 32MB of onboard memory per card. Sampling at 100kHz on 8 channels will result in 100,000x8x2 bytes per second = 1.6MB/s. With nine cards 1.6x9=14.4MB/s. I understand the PXI chassis can throughput up to 65MB/s when streaming from multiple cards in this way.

 

The problem I have, is without example code for DAQmx multiple-card continuous-acquisition, I'm left guessing at exactly what the code should be.  Attached is my code so far.

 

When opening the attached VIs, you may find LabVIEW cannot locate "Get Terminal Name with Device Prefix.vi".  This VI can be found in shipped example Multi-Device Synch-Analog Input-Cont Acquisition.vi.

 

Development System:

18-slot PXI-1045 chassis

NI PXI-8106 Duo 2.16Ghz Controller, 2 GB RAM

NI PXI-6561 LVDS DAQ 16Mb/ch (6-cards)

NI PXI-6123 16Ms DAQ device (9-cards)

LabVIEW 8.5.1 Full Dev System

NI-DAQmx 8.7.1f3

Traditional NI-DAQ 7.4.4f7

 

0 Kudos
Message 1 of 3
(3,155 Views)

As advised, I have coded a scheme that uses the DAQmx Read VI to Fetch all 72 channels using Analog 1D Wfm Nchan Nsamp.   This approach resulted in a Windows out of memory error.  The code runs fine for 50kHz sample rate, but falls over at 80kHz, I need 100kHz.

 

To arrive at a solution quickly, please advise what area of the code to re-design, should I move to I16 unscaled data or should I optimise other areas of the code first ?

 

Code attached, see 6123 Continuous Acquisition 002.vi.

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

I have re-coded for I16 and it works okay with no memory depletion.

0 Kudos
Message 3 of 3
(3,089 Views)