08-25-2011 12:19 AM - edited 08-25-2011 12:24 AM
Hi,
I wrote the following program trying to output a series of 100 samples of pulses whose frequency is ramping up from 10 to 100. Device: PCI-6229.
I got error: -201291: Pulse specifications cannot be written to a finite counter output task on this device.
I do not know what was wrong.
Basically I have no idea how to use the vi, DAQmx Write: Counter Freq NSamp 1Chan or NChan
I do know how to use property node to change frequency and duty cycle on the fly. However, In this particular post I would like to know how to use this NSamp VI.
Thanks.
Solved! Go to Solution.
08-26-2011 12:08 PM
This error is occurring because it's not possible to change the pulse frequency 'on the fly' like this during a finite task for your M-series card. If you switch to Continuous Samples for your timing, this code will run smoothly. Take a look at the following example for reconfiguring pulse frequency during a finite task:
https://decibel.ni.com/content/docs/DOC-6109
Best Regards,
James M.
Applications Engineer
National Instruments
08-26-2011 01:49 PM
Buffered counter operations are only supported on STC3-based devices (i.e. X Series and CompactDAQ).
Your M Series is an STC2-based device and so does not have support for buffered counter outputs. Any updates to the counter output characteristics on this board have to be software-timed. I wrote the example that James linked, and it would be useful if you want an exact number of pulses but don't need the updates to occur deterministically.
If you do need deterministic counter updates, you could either switch hardware or implement a workaround using the digital output with a pre-defined digital waveform.
Best Regards,
08-26-2011 04:21 PM
James, John,
Thanks a lot!