LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

changing the frequency of sine wave when using property and invoke nodes

Hi I'm trying to drive a Piezobender through a frequency range and am struggling to understand which part of the code I need to set the frequency parameters in. The attached code is an example provided by ThorLabs and I just want to alter it for my application. Do I just set the frequency in the sine waveform generation or is it set in the LUTWaveParameters property node ?

Thanks in Advance. 

ps attached a photo as specific drivers are needed to view the actual code 

Rachjacq_0-1580923704828.png

0 Kudos
Message 1 of 7
(2,069 Views)

You picture is too blurry to analyze. Can you attach the VI instead?

0 Kudos
Message 2 of 7
(2,061 Views)

There are inputs on the Sine Waveform.vi to set the frequency of the signal.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(2,023 Views)

My guess is you have to put a control on the Frequency input of the Sinewaveform.vi

 

sin1.PNG

Since that array is multiplied by  the desired peak voltage and then fed to the Set.UTwaveSample index

 

BTW: Worst example program ever...

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 7
(2,012 Views)

@RTSLVU wrote:

BTW: Worst example program ever...


Could not agree more.

 

The Sine waveform actually generates 1000 points but only the first 50 points are used, i.e. the first half-wave with the current default settings. Once the the frequency or other sampling info is changed, all bets are off what you'll get, but most likely not a new "frequency" or anything resembling a sine wave. That local variable is just plain silly and the programmer never heard of autoindexing. The only sequence frame that's needed is for the wait. Then we have unlabeled terminals (Go button). What a nightmare!

0 Kudos
Message 6 of 7
(2,006 Views)

hi so after multiple efforts using the above code i have realised that its not actually affecting the motion of the piezotube how it should. it actually is just writing a single voltage output and then stopping ....

looked back through the examples and found a 'set output voltage' node so i now want to try and use this along with the sine waveform vi. obviously i need to sample the wave somehow, but without an internal clock (as in DAQ) I'm unsure how to do this. 

Rachjacq_0-1593522538059.png

 

0 Kudos
Message 7 of 7
(1,860 Views)