deepsilence Posted August 25, 2011 Report Posted August 25, 2011 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. Quote
jgcode Posted August 25, 2011 Report Posted August 25, 2011 Hi deepsilence Have you had a look through any of the example VIs that ship with LabVIEW? Cheers -JG Quote
deepsilence Posted August 25, 2011 Author Report Posted August 25, 2011 Hey, JG, yep, i've searched through the examples. I didn't find any one using Counter Write NSamp. Quote
jgcode Posted August 25, 2011 Report Posted August 25, 2011 Hey, JG, yep, i've searched through the examples. I didn't find any one using Counter Write NSamp. I am just taking a stab (from memory - it has been a while) but have you tried to setup the Write VI before the Start VI? I.e. put data into the buffer that it uses as output before you start the task. Then you monitor the Task to see if it has finished (or something similar). Cheers -JG Quote
Neville D Posted August 25, 2011 Report Posted August 25, 2011 Have you tried using continuous samples instead of finite samples? Quote
deepsilence Posted August 26, 2011 Author Report Posted August 26, 2011 I got official reply from NI engineers: 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. 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. Also look at the following example for reconfiguring pulse frequency during a finite task, it would be useful if you want an exact number of pulses but don't need the updates to occur deterministically. https://decibel.ni.com/content/docs/DOC-6109 Thanks guys Quote
jgcode Posted August 27, 2011 Report Posted August 27, 2011 I got official reply from NI engineers: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. 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. I won't argue with an NI Eng... ...but I am pretty sure I have used the older cDAQ (with M series board and therefore STC2-based timing) and inserted a module with inbuilt timing and exported the clock so I can do Buffered Counter Input on Slot 5/6 with a DIO module. I implemented a plug-in for Signal Express as it didn't allow Buffered Counter Input even though MAX/LabVIEW support it. I thought it would have been similar with Buffered Counter Output. I am not sure if you can set something up like that with the hardware you have, but I think that is a workaround for STC2-based CompactDAQ? Quote
deepsilence Posted August 29, 2011 Author Report Posted August 29, 2011 I won't argue with an NI Eng... ...but I am pretty sure I have used the older cDAQ (with M series board and therefore STC2-based timing) and inserted a module with inbuilt timing and exported the clock so I can do Buffered Counter Input on Slot 5/6 with a DIO module. I implemented a plug-in for Signal Express as it didn't allow Buffered Counter Input even though MAX/LabVIEW support it. I thought it would have been similar with Buffered Counter Output. I am not sure if you can set something up like that with the hardware you have, but I think that is a workaround for STC2-based CompactDAQ? Thanks, jgcode. I will give it some thinking. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.