Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the frequency of a finite pulse train?

Hi all? I Know I’ve asked once a similar question, but I need a better answer. I would like some ideas or examples on how to modify the example in LV; "Finite Pulse Train Generation - Intermediate for AM9513-Based Devices",so that the frequency can be changed while the VI is executing.

Will i have any problem with I use this VI in a DAQ-STC-Based Devices(E-series)?
0 Kudos
Message 1 of 5
(3,957 Views)
Tiano,

There is a Knowledge Base article, which I have linked below, which describes how to change your pulse train frequency on the fly.

How Do I Change The Frequency Output Of My Pulse Train On The Fly?
http://digital.ni.com/public.nsf/websearch/7B1B0427C39FE33086256CEE00752133?OpenDocument

However, since your pulse train is finite, and not continuous, you could just output your finite pulse train, reconfigure the counter for a new frequency, and output another finite train.

Also, the example you mentioned specifically refers to devices using the AM9513 chip. E-Series boards have the DAQ-STC chip, which is a custom ASIC designed by National Instruments. Examples written for the AM9513 are not compatible with the DAQ-STC, and vice versa.

Re
gards,

Justin Britten

Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,957 Views)
Thanks for the reply.

I have a comment to make. I read through the document and clearly understood the solution but when I read the Labview part of the document I managed to get myself confused again. It is not clear to me. Have you read that? Can U rephrase that part for me? Is the example a continuous pulse train generator VI, that one is able to change its frequency during operation? If so, can you modify it in such way that I can change the freq. using a knob in the front panel? Will I have to trigger the gate to change the frequency?

I really need your help ‘cos I’m still learning LV…I am getting seriously frustrated cos I am not getting much done.
0 Kudos
Message 3 of 5
(3,957 Views)
Tiano,

I will try to better explain the paragraph on LabVIEW. The original paragraph reads ...

"While in a loop for continuous pulse train generation, make two calls to Counter Set Attribute.vi to set the values for "pulse spec 1" (constant 14) and "pulse spec 2" (constant 15). Following these calls you would make a call to Counter Control.vi with the control code set to "switch cycle" (constant 7). The attached LabVIEW programs demonstrate this flow."

You can make two calls to Counter Set Attribute or you can make a call to Set Pulse Specs which, if you open this VI, you will see that it is just making two calls to Counter Set Attribute. What you are doing with the Counter Set Attribute VIs is setting two registers called "pulse s
pec 1" and "pulse spec 2". These two registers are used to configure the frequency and duty cycle of your output frequency.

The example program which is attached to this Knowledge Base demonstrates how to change the frequency of a continuous generation on the fly. Why continuous? Because changing the frequency of a finite train would be easy. When the train completes it's finite generation you would just change the frequency and run a finite train again. You would not care about the time delay due to reconfiguration of the counter.

If you would like to change the frequency of the pulse train using a knob, this functionality will have to be added in the while loop. The while loop will be continuously checking for the new value of the knob and using the knob value to set the pulse specs.

LabVIEW is a language, and as with learning all new languages (spoken or programatic) there is a lot of learning to be accomplished. The great thing is that LabVIEW is much easier than mo
st languages and the learning curve should be much smaller. Don't fret, you'll be an expert before you know it. Especially since you're tackling a challenging first project.

Regards,
Justin Britten
0 Kudos
Message 4 of 5
(3,957 Views)
Thanks so much for the whole (both) input given. I manage to get it done.

Cheers
Tiano
0 Kudos
Message 5 of 5
(3,957 Views)