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 post

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 post

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 post
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 post

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 post

Join the conversation

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

Guest
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.

  • Similar Content

    • By Aniket Gadekar
      Hello Network,
      I am writing array of timestamp in TDMS file. "TDMS Write.vi" generates an error after calling this VI as follows.
       
       
      Group Name = "DUT T1"
      Channel Names = "DUT T1_Time"
      Please let me know if anyone has any suggestions.
      BR
      Aniket
       
    • By roberto1719
      Hi Everyone!
      I started with LabVIEW in last year. I have a short question for you with my little trouble. In first of all my VI must counting up and down in the range 45 to 145. On first program step, two case structures will stop count, if we get number out of range. In case of we writes a good number, last procedure will launch counting from zero to number on input, but I want to start incresing/decreasing from last number on output not from zero like in this case. Have anyone problem like me ever? Thanks for respond and support.

      http://fotowrzut.pl/STCFT0EJXI
    • By Zyga
      LAVA users,
      We are looking for alternatives for NI DAQ devices for industrial automation. Since NI has its devices mostly focused on advanced/high speed/high precison data acquisition/processing its prices are inadequate to simple automation tasks. 
      I would also say that NI PC based daq systems are expensive if need to be distributed systems (found this but still relatively expensive cRIO required).
      Just now we need to extend our compactDAQ based system with two DIO modules. We even have free chassis slots for this, but station that needs this IOs is few meters away from PC. How easier would it be if we could use single ethernet cable..  Ofcourse we can add another small cDAQ (what we probably going to do) but this is slightly expensive solution for our customer.
      Does anyone have some experience with 3rd party solutions? Any known daq devices vendors? Standalone ethernet daq modules?

      Regards,
      Zyga
    • By Gab
      Hello Everyone,
      Need some verification with daq program.
      I have one force sensor that connectd with my usb daq device. with this force sensor, unknown object is connected(hanging) and i want to find the mass of this object (F=ma) so i am taking continous sample and generate waveform graph. After the scaling, my waveform will be in Newton unit.
      my question is: if i take RMS of this waveform(1d Array data point) and divide by g (9.8 m/s2) then whatever value come is my correct mass? (F=ma).
      Thank you in advance
    • By Atron100
      hi
      i have a question in basic understanding of update rate sample rate samples per buffer and cycles per buffer.
      i have DAQ 6343 and electronic circuit. 
      i'm using AO0 for generation sine wave at these frequencies 10Hz, 100Hz, 500Hz, 1kHz, 3kHz this signal enters to electronic circuit.
      and after conversion i must to measure two outputs of this circuit by AI2 and AI3.
      from my understanding of tech spec of the daq analog output update rate is 900kS/s and analog input update rate is 500kS/s
      as i understand if i have freq = 3kHz the maximum sample rate per buffer is 300 samples
      and if i have freq = 10Hz i can generate this signal with 90000 samples per buffer?
      for analog input the formula is the same?
      that meaning of cycles per buffer?
      which sample rate of AI i need to setup to measure data fast and accurately? 
       
      thanks for answers
×
×
  • Create New...

Important Information

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