From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Start counter on analog trigger

I have an E-series card and I would like to start a pulse train on a particular level of a rising edge of an analog signal. Specifically, I have a sine wave going from -1V to +1V and I would like to start the pulse train on the rise of the sine from 0V.

Thanks!
0 Kudos
Message 1 of 5
(2,782 Views)
A very simple approach would be to condition the analog signal to convert it into a TTL-compatable squarewave that switches at the input sinewave's zero-crossing point, and feed the result into a digital input on the card. Just make sure whatever technique you use gives a very clean edge and no over/under shoot or ringing.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(2,782 Views)
Mike, thanks for your answer, but I may not have explained things just right.

I'm trying to output an analog signal (the buffered sine wave) and, synchronized with it, a digital trigger signal (the counter). Their relative phase seems to vary with the frequency, so I can't just try to start them together. So I thought of taking the analog signal, feeding it into an analog input and using the analog trigger signal (ATCOUT) to start the counter.

I'm not sure what signals I should set to what values in Counter Set Attribute.vi to achieve this. The closest example is ATCOUT Viewer.vi found in Analog Trigger Circuitry Output as an External Signal.zip, but I don't need to use the double counter.

Thanks!
0 Kudos
Message 3 of 5
(2,782 Views)
Devices that have the DAQ-STC chip don't have the capability of triggering a counter event. You could do this with a NI TIO device but not with a DAQ-STC device. The document below goes over this in more detail. I hope this helps.

Can I Use the AI Start Trigger of the Analog Input Channels to Trigger Pulse Train Generation from the DAQ-STC Counter?
http://digital.ni.com/public.nsf/websearch/80AA17718CFC0A4886256B4A00785103?OpenDocument

Regards,

Todd D.
NI Applications Engineer
0 Kudos
Message 4 of 5
(2,781 Views)
Actually, "ATCOUT Viewer.vi" (found in "Analog Trigger Circuitry Output as an External Signal.zip") is exactly what I needed.

Thanks!
0 Kudos
Message 5 of 5
(2,781 Views)