LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set Loop Frequency

Hi Altenbach,

 

i have a high frequency laser measuring the displacement of the speaker. 

I have th labview drivers of this laser and a labview VI for the laser control.

But this VI includes a loop in which the measurement (/displacement) data is generated.

So using this VI I recognized that i cant go above a loop frequency 1kHz (time interval below 1ms).

(probably because its not possible on windows, as multiple users already explained).

 

At first i thought it would be nice to change this loop so that i can still use this VI.

So i extracted the part of this laser VI which regulates the frequency of the loop and wrote it into a new VI.

I posted this VI with my original question at the top.

I also improved this VI, so that it works properly now for integer multiples of 1ms (see appended VI).

 

I also tried to control a soundcard with labview, but labview doesnt seem to recognize it.

Currently im not recording audio signals. I just tried the soundcard, because i wanted to check/try higher frequencies.

 

For the signal generation i wanted to use a function generator, but this doesnt matter right now.

Currently, the focus is on measuring the displacements ( and after that saving the measurement data).

 

I am not sure how i can make use of the FPGA. You say i should use it to send a signal to the laser or to control the

measurement frequency. Is that what you mean? I cant really understand how to do it this way.

 

So some of the users here said i should rather work with the principle of data flow,

but im not sure if i can use the DAQ stuff with this third party laser.

 

Thank to the community for all of your replies!

Even though i couldnt solve the problem there was still some progress.

 

Greetings

Lukas

 

 

 

0 Kudos
Message 11 of 15
(908 Views)

Lukas,

 

Can you save a version your VI in a format suitable for LV2015 (15.0) please?  If you can do that, I'll take a look.

 

Andy

0 Kudos
Message 12 of 15
(900 Views)

Hi PsyenceFact,

 

here the VI (version 15.0)

 

Greetings

Lukas

0 Kudos
Message 13 of 15
(883 Views)

Well, the VI doesn't tell us very much other than that you're not going to get consistent loop timing in the millisecond range on Windows!

 

What functionality is provided by the laser drivers and VI for laser control?  Are you trying to scan the laser across the speaker surface or are you just measuring velocity at a single location?  As Yamaeda said, you would usually grab a bunch of samples at a time, and let DAQmx worry about the sample rate.

 

For a simple example of this approach, see this link.  In the example shown there, the sample rate is set to 10 kHz and the DAQmx Read is set to read 5000 samples at a time.  The acquisition loop therefore runs at ~0.5 s intervals but this does not need to be set explicitly.

 

Andy

0 Kudos
Message 14 of 15
(877 Views)

As others have already said, don't roll your own high speed loop! Given typical DAQ hardware, both AI and AO support hardware timed control of many samples at a time. If needed you can even run both off the same hardware clock for 100% correlation between sound output and laser signal.

 

What kind of problem do you have with the sound card? Most computers already have sound IO (mic, headphones, line out, etc.), so if you add another soundcard, you need to make sure to define what should be used. You are not giving sufficient information to troubleshoot the problem. You should easily be able to record 44kHz signals as long as the voltages are in a suitable range. However, sound cards are AC coupled and not suitable for DC signals, so calibration might be a problem, depending on what kind if information you need.

0 Kudos
Message 15 of 15
(865 Views)