LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to stop DAQ assistant express vi

Solved!
Go to solution

I am wanting to collect data from a few channels at once at a high acquisition rate (40000Hz) while also controlling stepper motor motion.  My problem is that when I set the DAQ assistant to continous samples at 40kHz it still acquires the amount set in the number of sample box before stopping.  I wired a local variable to the stop input but it seems to have no affect.  Any help would be great.

 

-Jake

0 Kudos
Message 1 of 9
(5,932 Views)

You can't.  It is going to do what you tell it to do.  Once it starts requesting X samples, it is going to stay in that express VI until it has acquired the X samples.

 

All you can do is request a smaller number of samples and have the loop that it is in iterate more often.

Message 2 of 9
(5,931 Views)

So the instances n-samples and continous are the same thing basically?

 

-jake

0 Kudos
Message 3 of 9
(5,921 Views)
Solution
Accepted by topic author jdb1986

No.

 

N samples will collect N samples and not collect anymore until the next time you call it.

 

Continuous starts collecting samples.  You ask for N and it will wait and return N samples once they come in.  In the mean time, while you are doing other things in your code, it will continue to collect, the N+1, N+2, etc. in its buffer.  The next time you come back around and call it, it will again wait for N samples to come in, but it may already have all of those N, or nearly all of them and won't have to wait as long.  You also won't have a break in the data because the first sample of the next N will be the one that immediately follows the last sample of the first N with the clock timing.

Message 4 of 9
(5,918 Views)

Ok that clears up a lot for me!  Thanks a ton!

 

-Jake

0 Kudos
Message 5 of 9
(5,911 Views)

So is there any way to stop or abort it?

 

I want to display a waveform which reads from a binary file and sends to a DAQ board. But the file sometime is too long, so I want to stop it during the execution. But I don't want to use EXIT function, so is there any better way?

 

Thanks!

Wendy

0 Kudos
Message 6 of 9
(5,675 Views)

There is a 'Stop' input to the DAQ Assistant which you should have noticed. This is the graceful way to stop. Of course stopping the loop that the assistant is in will stop both.

0 Kudos
Message 7 of 9
(5,665 Views)

I see. But I'm actually use the seperate DAQ functions. Does the DAQ Stop function do the same thing as Stop in DAQ assistant? If I add DAQ Stop function in, how to wire the stop button to this DAQ Stop function, so confusing...

0 Kudos
Message 8 of 9
(5,653 Views)

Have you looked at any of the DAmx examples that come with LabVIEW? Do that and you'll see how to stop an acquisition. It would also help if you posted your code.

 

p.s. Since you are not using the DAQ Assistant, you should not have posted to a thread that was about it.

0 Kudos
Message 9 of 9
(5,639 Views)