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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Execute my VI only for a predefined (programmable) amount of time.

Hello,

 

I'm trying to run a VI to generate a frequency sweep signal using an AWG and then acquire it, in the same VI, using a DSO for the duration of the sweep (which is entered by the user).

I want the DSO to start acquiring the signal only when the sweep starts and stop the acquisition when it ends. What can be the simplest way of doing it?

 

looking forward to your help.

Regards.

0 Kudos
Message 1 of 4
(2,011 Views)

if possible i would be looking to set a suitable trigger level so when the waveform goes past a known value the dso starts to aquire then whn it goes back below it stops. Basically set all the cards up ready to generate/sample etc..., then when your ready start the signal, the dso will start to sample then after a period of time stop the signal, which will trigger the dso to sop.

 

Not sure how suitable this is to your requiremnents but hope it helps a bit 

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 2 of 4
(2,006 Views)

Thank you for a quick reply.

 

I tried what suggested, but the labVIEW drivers of my device don't have a very convenient list of options in that matter.

On the other hand, I've tried using the execution speed of the while loop inside which I've placed my DSO blocks. (e.g., if I let the loop run 20 times for a rate of 2/s, I can acquire the data for a 10s frequency sweep).

 

Is there a way I can control the execution speed of a while loop?

 

Regards.

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

You did not indicate what frequency you are using, but if it's any frequency higher than the rate of a skipping rope, trying to do this in software is not a viable solution. You need to set this up in hardware, as noted in the previous reply. Just because the drivers you have don't have the VIs to set this up doesn't mean it can't be done. Look at the documentation for the devices you are using to see how to set up triggers. You may need to write a simply VI to send those setup commands.

0 Kudos
Message 4 of 4
(1,981 Views)