Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering each pulse!

I am using a general purpose counter to generate continuous digital pulses at counter's output.
Is there any way that I can trigger each pulse by software or a digital signal or anything?
I am usnig NI 6229 with NI-DAQmx and Borland C++ Builder.
 
Thank You!
0 Kudos
Message 1 of 8
(5,055 Views)
sspeed,

"Is there any way that I can trigger each pulse by software or a digital signal or anything?"

Yes.  You can trigger your pulses using a digital signal.

use...
DAQmxCfgDigEdgeStartTrig()

You will need to use the function below to make your task retriggerable
DAQmxSetStartTrigRetriggerable()

By default your counter task will only trigger once off of the digital signal.  If you set it to retriggerable the task can trigger over and over again for each edge of your digital signal.

An example showing how to do this can be found through the link below...
http://venus.ni.com/stage/we/niepd_web_display.DISPLAY_EPD4?p_answer=&p_guid=F0F72FE2E7EF0EFDE0340003BA7CCD71&p_node=201181&p_rank=&p_source=Internal&p_submitted=N

I hope this helps,
Lorne Hengst
Application Engineer
National Instruments
0 Kudos
Message 2 of 8
(5,041 Views)
Thanks for your answer!
I will try to do it this way.
The problem is that I can not acces the example you provided.
0 Kudos
Message 3 of 8
(5,038 Views)
sspeed,

I saw your other post:

http://forums.ni.com/ni/board/message?board.id=40&message.id=2724

and answered your "task done" quesions there. I just wanted to let you know that this method will also work with actual retriggering (as suggested by Lorne). Please note that calling DAQmxGetCOPulseDone will always reset this property to false. Additionally, if a trigger is received while a pulse it being generated, it will be ignored - you may not even need to poll in software.

Regards,

Message Edited by Ryan V on 09-29-2005 07:36 AM

Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 4 of 8
(5,029 Views)
Thanks to everyobody.
I solved the problem and now it's working just fine.
 
Thanks again for your help.
 
0 Kudos
Message 5 of 8
(5,022 Views)
How did you do that?


Well, i guess i am looking for something similar.
The board is a pci 6115 and would like to trigger lots of single sine waves.

The point is, sometimes the trigger comes before the sine wave is finished, and sometimes afterwards.
For the afterwards trigger, it is possible to use one of the examples,(Gen Mult Volt Updates Int-Clk Dig-Start.vi) put it all in a while loop, and trigger shortly after the wave has finished.

But what if the trigger pulse comes before the wave has finished..the waves stop for a whole cycle.. thats to late.

How can i start the wave right away?

Regards
Cristian from Germany
0 Kudos
Message 6 of 8
(4,771 Views)
I did this a while ago and if I remember correctly I have used the solution from the reply number 2 (from Lorne Hengst).
I used the DAQmxCfgDigEdgeStartTrig()and
DAQmxSetStartTrigRetriggerable().
The thing is that the device will ignore any trigger while is generating you sinewave like you already noticed.

I did not have this problem since the generation of my wave took much less time than the time between 2 triggers.


I am sorry I can not help you more, but some of the veterans can give you some ideas for sure.


Dipl. Eng. Bogdan Mitrea
Graduate Research Assistant
SUNY Upstate Medical University
0 Kudos
Message 7 of 8
(4,763 Views)
Please see reply here.
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 8 of 8
(4,755 Views)