Jump to content

how to use "DAQmx Write: Counter Freq 1Chan NSamp"


deepsilence

Recommended Posts

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.

post-26697-0-86430200-1314250947_thumb.j

Link to comment

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

Link to comment

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

Link to comment
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?

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.