LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger stop problem adquiring a period signal

Hi,

i am stucked on this problem for a while now. let me explain :

i receive a signal which has a variable period ( beetween 10 and 20 seconds. )
Anyway, the period always start with a Rising edge, and stop with a falling edge downto 0 ( 0 is never reached during the period )
between each period of this signal, i have a 2seconds delay with no signal ( 0 value ).

Therefore, i used a analog start trigger, which starts the adquisition when the signal goes above 0 ( 0,02 ) and a stop trigger at the same level. The signal is compared to the constant level. ( i can't use another channel to do this triggering operation )
The problem is for the timing, i put 20 seconds ( example : 20 000 samples with a 1000 rates ). When the rising edge is detected, the signal is adquired, but adquisition does not stop when it gets the falling edge, but when all the 20 000 samples are adquired !!
So my stop trigger isn't usefull !

Is there a way to get only the values between start and stop triggers ?
Maybe am I not using well the analog stop trigger, someone have an example to show me ?


Thanks for helping.

Charlot.
0 Kudos
Message 1 of 2
(2,448 Views)
Hello Charlot,

Which language do you use to program your board? Which board are you using? Which driver (DAQmx, Traditional DAQ)?

This is a tricky question. If you look at this link:

http://zone.ni.com/devzone/conceptd.nsf/webmain/2a03115556fb233386256870005bb522?OpenDocument

you can see that you could use ND_ABOVE_HIGH_LEVEL type of trigger. If you route this trigger signal (ATCOUT) to use it as the GATE of a pulse train operation using a counter (frequency equal to your desired sample rate), and then route/choose the pulse train as the scan clock for your analog input operation, then that's the only way I can think of this to work in a completely-hardware controlled manner.

At the end of the document, it explains the Analog Scan Clock Gating, with an example that shows this idea. Please note not all boards support this.

Besides that option, I'm afraid you cannot do that operation completely by hardware with just one board. The reason is that you can only have one active analog trigger condition, as there is just one analog trigger circuit on each board.

There are some approaches though:

-Do the comparison via software (you check the samples and keep those inside the window/above your level, and discard those samples outside the window/below your threshold/level)

-Use an external circuit (comparator, etc..) that generates a digital pulse/edge both when the signal enters the window and when it leaves the window. Then program your analog input acquisition based on a digital start and stop trigger.

-Use a second board to accomplish this. You can initiate a windowed trigger analog input operation on one board, and route the output of the trigger circuit ACTOUT to the second board, which will be configured to do analog acquisition with a digital start and digital stop triggers.

These links are related and I recommend you to check them out:

http://digital.ni.com/public.nsf/websearch/8737E90ABEE342BD862569EE0077F6D2?OpenDocument

http://forums.ni.com/ni/board/message?board.id=170&message.id=5573&requireLogin=False

http://forums.ni.com/ni/board/message?board.id=170&message.id=70967&requireLogin=False

Hope this helps... Please let me know if you get this application working!
Any other suggestions out there?

Regards,

Jorge M.

Mensaje editado por Jorge M.

Mensaje editado por Jorge M.

Mensaje editado por Jorge M.

0 Kudos
Message 2 of 2
(2,432 Views)