Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to sample an LVDT displacement probe from SCXI-1102B and load cell from SCXI-1122 simultaneously.

I've been trying to figure out how to sample data from an SCXI-1122 board and SCXI-1102B board simultaneously. I am aware that the 1122 cannot sample multiple channels from itself simultaneously but I am only using a single channel on that board so the sample rate is acceptable with that alone. When I try to build a LabView program which samples the 1122 channel and the 1102B channel it returns errors or does not perform fast enough. Here is what I have tried:

1. Using "DAQ Assistant" with multiple channels --- does not work since the 1122 and 1102B must be accessed separately or there is a task related error (resource unavailable).

2. Using "DAQ Assistant" with a single channel for 1122 data and then repeating for 1102B data but in a stack sequence --- returns similar task related error.

3. Using "DAQmx" blocks "DAQmx Read" and then "DAQmx Clear" to read the 1122 data and then repeated for the 1102B data (in a sequence stack) --- works but operates at around 1 Hz only (need faster).

The problem is that the system can scan the 1122 data at an acceptable rate (~100 Hz) if there is no other DAQ requested, but only using the "Continuous" acquisition mode. If I try to use any other acquisition mode the sampling rate drops to around 1 Hz. If I set up the system to read 10 samples at 100 Hz it still takes over 1 second! If I set up the system to read 200 samples at 100 Hz it takes approximately 3 seconds (instead of the expected 2 s).

This leads me to conclude that there is a 1 second delay in the operation of the 1122, if not using the "Continuous" mode, which I guess is for stopping and closing the task.

The overall objective is to sample a displacement probe (LVDT) and a load cell for use in an experimental setup, and ideally at a much higher rate than 1 Hz. If I connect the load cell to the 1102B module there is much higher noise (the 1122 is designed to accept load cells whereas the 1102B is designed for thermocouples ... I think).

Any suggestions would be most appreciated, thanks in advance!

0 Kudos
Message 1 of 4
(3,662 Views)

Hi bklynch-

 

     Your SCXI setup has some limitations in terms of synchronization.  The SCXI chassis is simply an extension of a DAQ card.  That DAQ card most likely is a multiplexing DAQ card, which means there is no way to officially synchronize the channels.  The readings between channels will always be off by a very small amount.  Trying to synchronize two SCXI modules adds another level of complexity because they are both still an extension of your DAQ card. 

 

     If you are limited to using this SCXI hardware, then it would be best to use the 1122 for both measurements since it is able to sample faster.  Your data will not be officially synchronized, but at least you will be getting data at fairly close to the same time.

 

     If you require simultaneuos sampling, I recommend looking at either our S Series cards, DSA cards (great dynamic range for your load cell), or a cDAQ chassis.

 

     The fact that your acquisition takes longer than expected (200 samples @ 100Hz takes 3 seconds) is most likely due to the program.  Ensure that the only thing that takes place in your while loop is a DAQ read.  Anything else in the loop will cause it to take longer between gathering samples.  The DAQ card will take two seconds to gather your samples, then it may need to wait on software to process some other commands before finishing the while loop and moving on to the next iteration.

 

     I hope this helps.  Best of luck with your application!

Gary P.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,650 Views)

Hey Gary,


Thanks for the reply! The program is acquiring data only (aside from sending the output to a chart and numeric display) and I cannot believe that there is a 1 second delay from that since I have run far more complex programs with much higher effective sampling rates. It seems that there is some kind of delay for the 1122 to initialize, acquire data, and close itself through one session of data acquisition -- this occurs for the "1 sample", "1 sample HW" and "N samples" options, but not for the "Continuous" option (suggesting during continuous operation it does not need to reinitialize or close the session).

 

I do realize that the channels are never synchronized with the 1122 and that sampling multiple channels means lowering the sampling rate, but I am not synchronizing multiple channels in the 1122, I am trying to sample one channel from the 1122 and one channel from the 1102B. My hopes were that the system could handle acquiring data from the 1122 and then from the 1102B (or vice versa) with obviously some small delay between the two acquisitions due to the fact they run in series (although I did not expect 1 second delay for that).

 

I'm guessing you meant to suggest using the 1102B for both measurements since the 1122 is not really made for that -- when I use the 1122 for both channels it gives acceptable sampling frequency (50 Hz for 2 channels) but makes an intrusive and unsettling buzzing sound due to the switching between channels (at first I thought there was something wrong but apparently it is supposed to make that noise).

 

If I try to use the 1102B for both channels then I lose the signal conditioning benefits of the 1122 and my load cell strain gauge measurement becomes unacceptably noisy. It looks like the best option is, as you suggested, to purchase a different module. Would the 1121 module be more appropriate since it has parallel-mode operation? I will certainly consider the three options you mentionned but am hoping to find a simple solution to replace the 1122 within the system I have (PXI-1000 Chassis -> PXI-6220 -> SCXI-1000 Chassis ...).

 

Thanks again for your help, it is most appreciated!


Brian

0 Kudos
Message 3 of 4
(3,644 Views)

Hi Brian-

 

     Yes, the SCXI-1121 would operate much more quietly than the 1122 because it has parallel inputs (simultaneous sampling).  The 1122 multiplexes through its channels, and you hear the mechanical switching sound as it does.  This is actually okay (you mentioned it was not made for this), you won't hurt anything by using the 1122 in this fashion.  But it can be annoying and the 1121 would not make the same sound using multiple channels.  You will get fewer channels and there are only a couple of other specification differences between the two modules, but it sounds like you are on the right track for figuring out what will work best for you.

 

     With regards to the programming delay, you can open/initialize and close a task outside of a while loop.  You shouldn't have to initialize and close with every iteration of a while loop.  All you need to have in your while loop is your read/write and any other data operations that need to take place for your program to execute properly.    

 

     Best of luck with your application, and let us know if you have any questions!

0 Kudos
Message 4 of 4
(3,624 Views)