03-24-2011
10:30 AM
- last edited on
04-21-2025
02:39 PM
by
Content Cleaner
Hello, I am the follow-up of Oliver and have to implement/use the code in LabView.
@ John P:
Many thanks for the link, I think it will be helpful for me (hopefully)
I am still using PCI-6221 card (16 bit, 250 kS/s, 16 AI, 2AO, 10 DI/O, 2 Counters, 37pins)
It should be somehow possible to make a ramp:
startpoint: 1kHz
endpoint: 15kHz
time for Ramp: 1s
I think, the sample from https://forums.ni.com/t5/Example-Code/Reconfigurable-Finite-Counter-Output-Using-DAQmx-on-E-or-M/ta-...
is a good starting point, but how to implement it for the ramp?
Thank you.
03-24-2011 03:16 PM
Hi EWiebe,
That example is useful if you need a specific number of pulses. If you need a specific amount of time, you might as well just use the continuous counter output and stop it in software (since any updates to frequency have to come from software anyway). You'll have to define an array of frequencies that you want to be generated, then write them to the counter output task in a loop. You can control the loop rate in software. Of course, this would be non-deterministic, but you can get pretty close to what you need.
It's worth noting that X Series boards have a counter output buffer and deterministically output an array of pulses.
Best Regards,
08-02-2011 06:18 AM
Hello,
now I am using X-Series PCIe-6323 board
how to make frequency output ramp there?
Thanks.
08-02-2011
02:21 PM
- last edited on
04-21-2025
02:39 PM
by
Content Cleaner
Hi EWiebe,
You could do something similar to this, where each period of the counter output is buffered ahead of time and implicitly clocked out. This has the benefit of only requiring one counter but you have to make a much larger buffer.
Or, you could use a sample-clocked counter output task to write only one sample of each specific frequency you want generated, then use a clock to advance the generation to the next sample. This method is a bit easier to define the buffer, but you need a clock source (probably use a 2nd counter).
Best Regards,