annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

Frequency sweep with DAQmx

The following is the setup :

LV7.1 + PCI_6229 + WIN_XP

For controlling the drive rpm of a servo motor, I need to generate a range of frequencies from 60 to 2500 at 10 Hz intervals.

With the DAQmx polymorphic VI,  "CO Pulse Freq" , I can generate  a particular frequency. But if I have to change it on the fly how do I do it ? Like ideally if there was a property node for the polymorphic VI (!) , I could easily do it. But it does not have one such node for frequency and hence the query.

Having started the frequency generation at a default value, I would like to alter it programmatically without having to stop the VI and reload the fresh frequency.

Any suggestions welcome.

Thanks

Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Messaggio 1 di 7
4.587Visualizzazioni
 
There is a great tutorial that describes changing the pulse specs of a pulse train "on the fly".  The second example shows how you can change the duty cycle, but you can also change the frequency with the same technique.  Here is the tutorial:

Advanced Data Acquisition Series – Pulse Width Modulation in NI LabVIEW Using NI-DAQmx

-Alan A.

 
0 Kudos
Messaggio 2 di 7
4.581Visualizzazioni
Dear Alan,

That was the exact information that I was looking for. The tutorial was good.

It has helped solve my problem. Thanks.

Regards

Raghunathan



Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Messaggio 3 di 7
4.574Visualizzazioni
Glad I could help 🙂
-Alan A.
0 Kudos
Messaggio 4 di 7
4.562Visualizzazioni
Hi

Can one generate an analog sweep with PWM i.e. generate a sine wave sweep from frequencies of 200Hz - 20 kHz.  My applications are limited to the hearing range of <20lHz. I understand I will probably need a low pass filter.

Goy


0 Kudos
Messaggio 5 di 7
4.553Visualizzazioni
Hello SG_ENGINEER,
So that is possible, but it is a completely different approach than that mentioned above.  You would have to use a continuous analog output program and change the output waveform.  Check out the attached example.  I modified a shipping example to do an analog output and increment the frequency of the output waveform. 
-Alan A.
0 Kudos
Messaggio 6 di 7
4.536Visualizzazioni

Hello AlanArmstead,

 

I have a question about your exmaple VI.

Why do you take the 'Actual Sample Rate' from the property node as a parameter for the Signal Generator? When and why does is differ from the sample you originally specify as an input for the DAQmx Timing VI?

0 Kudos
Messaggio 7 di 7
2.979Visualizzazioni