Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog IO with 9171 USB chassis on PC104

Hi,

 

I'm running a Labview program on a PC104 which has an analog input module (9203) and and analog output module (9269), each in a cDAQ-9171 chassi connected with USB.

If I just opened the channels and did reads and writes, the throughput was terrible, 4Hz for inputs and 40Hz for 1 output, slower with more outputs. After some study, I found that the attached code seems to work ok but I don't really understand what it is doing.

The output write has a Warning 200015 (glitching, old/new data mix), which is probably fine since it is just trying to write the most current value calculated.

 

Could someone please look at this code and suggest any improvements? (This code was stripped out of the program, it's not the actual code but the initialization/read/write is the same.)

 

Thanks,

Paul

0 Kudos
Message 1 of 2
(2,753 Views)

There are a a couple examples that might interest you in the NI Example Finder, take a look under Hardware Input and Output»DAQmx»Synchronization. I'm attaching one example that you can use as a template and to optimize your code.

Alejandro C. | National Instruments
0 Kudos
Message 2 of 2
(2,728 Views)