10-05-2009 05:41 AM
Solved! Go to Solution.
10-06-2009 07:08 AM
Ciao Giakko,
you can take a look at this example to change on the fly the frequency of the generated pulse:
http://decibel.ni.com/content/docs/DOC-3751
Regards,
Andrea
10-07-2009 04:08 AM
Ciao Andrea,
thanks for your reply. For example I would like to generate a train of pulses at 1000 Hz. when I start the VI , frequency of pulses start from low values and then increase linearly or exponentially up to 1000 HZ. How could I do? thanks in advance for your help
Giacomo
10-07-2009 04:56 AM
Ciao Giacomo,
in order to change the frequency programmatically you can refer to the example in the previous post. You need do write on the property CO.Frequency.
If you want to change the frequency from 0 to 1000 Hz you could write some code that at a given condition gives the new value to the property node.
I'm attaching a simple VI to show you one way to do this, but there are several implementation depending on the condition you want to set.
In my example the loop rate is 100 ms and I set the new frequency every second (10 iterations). The Frequency values increment linearly from 0 with a step of 10.
Be aware of generating a pulse at 0 Hz, so read this KB:
http://digital.ni.com/public.nsf/allkb/7656E39CD15D181786256E69006B8523?OpenDocument
Ciao,
Andrea
10-08-2009 05:11 AM
thanks so much Andrea !! I solved
my problem !!