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.

Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Optimize SCXI 1600 for speed with Thermocouples

I'm working on a data acquisition system for my engineering firm and I'm trying to find a way to use our new thermocouple system as fast as possible.

 

The requirements for the DAQ process are:

Read 32 voltage channels from a PCI-6071E card

Read 32 thermocouple channels from a SCXI-1600 with an 1102C accessory

Complete the entire operation in under 5ms (this is so other parts of the program can respond to the incoming data quickly and trigger safety protocols if necessary)

 

Using LabVIEW 7.1 and MAX 4.4, I've got the voltage channels working to my satisfaction (with traditional DAQ VIs) and the rep rates I measure when I run the program are around 1ms (I do this by putting the DAQ code in a loop and reading the millisecond timer every time through that loop, then calculating the average time between loop executions).  I have been trying to get similar performance from the thermocouple channels using DAQ Assistant and DAQmx.  Some of the problems I've encountered are:

Very slow rep rates with 1-sample and N-sample acquisition modes (300-500ms)

Good rep rates when I switch to continuous mode, but then I get buffer overflow error -200279.

When I attempted to correct that error by setting the DAQmx buffer to overwrite unread data and only read the most recent sample, the calculated sample rate went to 20ms.  It was around 8ms when I left the error unhandled and continued acquisition.

 

At this point I'm out of ideas and am just looking for something to try and optimize the DAQ process for speed, as much as is possible.

Thank you for any help.

0 Kudos
Message 1 of 5
(6,555 Views)

Hi,

 

Have you tried some of the shipped examples with the DAQmx driver to test there performance?  There is an example that you could run to check the performance under Help>>Find Examples>>Hardware Input and Output>>DAQmx>>Analog Measurements>>Voltage>>Acq&Graph Voltage-Int Clk-Dig Ref.vi. 

 

Also, what sampling rate are you using?  Are you just taking one sample and then performing the post processing (No hardware timing)?  I see that you are receiving a buffer overflow error.  Are you performing the read task and then post processing in the same loop?   

Regards,
Jordan F
National Instruments
0 Kudos
Message 2 of 5
(6,549 Views)

I did try the shipped examples, but the performance was not what I was looking for.  My other test code had been made by creating a DAQ Assistant (what I'm more familiar with) and then converting it to a sub-VI to get the DAQmx code.  I could then modify that code as needed to try out new things (such as the buffer overwrite).

 

Currently I'm trying to sample 5 points from all 32 channels at 6060Hz.  This is the maximum sample rate DAQ Assistant would allow.  Neither the number of samples or sample rate is set in stone for me, I just need data from all 32 channels to be read in 1-5ms.  Lastly, I am using some post-processing in my loop after the read task.  The program has to send out control signals to other hardware after the DAQ tasks are complete, and when the program is set to record data the output from the read tasks is stored in an array for later processing.

 

Hope this clarifies what I'm trying to do.  I have been trying to tweak the continuous data acquisition to get the data I want as quickly as possible, but if there's a better way I'd like to try that as well.

0 Kudos
Message 3 of 5
(6,544 Views)

I guess I would be interested in checking out your code to see if there is anything I can recommend on changing.  However, I do have a few general Ideas of how to improve your performance.  These recommendations are purely based on what you could be doing to slow down the speed of the program because I am not sure how exactly you have everything set up.  

 

-Are you setting up the task and closing the task each time that you read from your daq card?  the way to get around this is to only have the DAQmx read vi in the while loop so you do not have time alloted for opening and closing the task each time.

 

-Try using a Producer/Consumer architecture.  This architecture uses queues and splits the aquisition with the post processing.  Here is a link to how to set up this architecture and some information on when to use it.

 

Application Design Patterns: Producer/Consumer

http://zone.ni.com/devzone/cda/tut/p/id/3023 

 

 

Message Edited by Jordan F on 02-06-2009 04:35 PM
Regards,
Jordan F
National Instruments
0 Kudos
Message 4 of 5
(6,526 Views)

I would try to decouple the TC readings from your 5ms (loop)time ... 

I don't know your setup and TCs are fast sensors...

Do you have the (step) responsetimes of your temperaturmeasurement ? Noisefloor and filtersetting of theTC-Voltage channel?

 

Sounds like a Dmanager requirement: The system has to response within ...ms to ....,overtemperature, ... .

And the sensor has a responsetime of 20s (90% of 10K Step in water!!)     BTDT   

 

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 5
(6,457 Views)