LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone had issues changing the sample rate of DAQmx channels?

I have an application with an NI6052E where I have to change my parameters a lot for different purposes on the same hardware channels. I need to acquire two channels on software trigger with one sample rate, then later I have to acquire 1 channel on hardware trigger with a higher sample rate. Whichever way I set up a channel first seems like it locks the DAQmx channel to that configuration, so I get messed up results anytime I try to acquire that channel at a different sample rate later in the program. I also get messed up when I try to get one channel with a DAQmx call, then later try to reconfigure the same DAQmx Task name to get more than one channel. All my vi's individually run fine, but when I se
quence them DAQmx gets confused. Do I need to create a new virtual channel for each possible sample rate or something? Anyone run into this?
-Devin
I got 99 problems but 8.6 ain't one.
0 Kudos
Message 1 of 3
(2,658 Views)
By the way, between calls I am careful to stop and clear any DAQmx tasks. Doesn't seem to have any effect. Many times I don't even get an error flag I just get bogus acquisitions or acquiring two channels instead of one.
-Devin
I got 99 problems but 8.6 ain't one.
0 Kudos
Message 2 of 3
(2,658 Views)
Hello,

I created a VI that is a combination of two LabVIEW shipping examples - Cont Acq&Graph Voltage - Analog SW Trigger, and Cont Acq&Graph Voltage - Int Clk - Analog Start. The first part of the program has a software trigger after seeing so much data. I removed the boolean control coming out of the software trigger VI that could potentially stop the while loop if that is your desired behavior, otherwise, the program requires you to hit stop. The second part of the VI waits for a analog trigger on PFI0, and once it is received, begins the to acquire data on the same channel as before, but this time at a different sample rate.

I don't know if this is exactly what you were talking about, but hopefully, by seeing this it might give you a few more ideas ab
out your own application. Note that you may need to try to open the examples that I mentioned above if it is telling you that it is missing any subVIs.

Jared A
0 Kudos
Message 3 of 3
(2,658 Views)