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: 

Correct Digital Pulse Triggering

Hi there!
I am new to LabVIEW, and I am having a difficult time with triggering. I'm using DAQmx and an ELVIS II board. Right now, the board is receiving a voltage consisting of two pulses (at about 150 kHz) repeating from an FPGA. The goal is to detect the first of the two pulses (presumably with LabVIEW) and to generate another pulse using the abstract waveform generator VI. I have an idea of how to do this in theory, but the "digital triggering" confuses me. I've set it to start the trigger on the "rising edge" of the square wave, but since there is noise in the signal the board is receiving, there appear to be numerous extra "rising edge"s, and the trigger triggers the waveform generation every chance it gets. I would like to make a simple trigger that activates when the voltage passes a certain threshold. Is there a way that I can do this with the ELVIS II board?

Garrett

0 Kudos
Message 1 of 6
(2,255 Views)

You could try running the trigger signal to an analog input and do an analog trigger on your voltage threshold.

 

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 6
(2,219 Views)

Hi Mike,

I now realize, through further testing, that the trigger is activating on the rising edge as expected. The only problem now is that the trigger seems to repeat indefinitely after each pulse (or at least the "write" command for my generated pulse does). I'm looking for some sort of one-shot trigger where my generated pulse only fires once per two pulses coming in. Any suggestions?
Thanks!

 

Garrett

0 Kudos
Message 3 of 6
(2,192 Views)

It is difficult to say what is happening without seeing some code. Can you post your VI?

 

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 4 of 6
(2,183 Views)

Hi Mike,

 

Here's the VI. I imagine I can take a lot of this out of the while loop to save wasted CPU, such as the creating of a channel and destruction of the task, but I don't know how to do it correctly so that the program still works.
Thanks for the help!

 

Garrett

 

0 Kudos
Message 5 of 6
(2,172 Views)

Additional information:

It seems that I'm sending a packet of information to the DAQ board's buffer, and, when it's triggered, the board generates a signal based off of that buffer until it recieves a new buffer packet. This would explain why the wave I generate is synchronized with the wave I'm receiving only once every several pulses, i.e. 19-20 ms later when LabVIEW is able to start a new task. There must be a way that I can tell the board to only write from the buffer once and then wait for the next trigger in order for it to start again.

 

 

Edit: If I change the "samples per channel" value in the Sample Clock to 7 or 8 (the number of samples in my generated signal), it seems to work correctly once for every time LabVIEW iterates through the loop. Interesting, but no solution...

0 Kudos
Message 6 of 6
(2,161 Views)