Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Pretrigger delay

Hi again.
If you use MAX, you use two tasks: one for acquisition (stopped and waiting for the trigger) and one for trigger generation.
Attached you can find a code that shows the problem (you only have to add the trigger generation).
I tried that using a NI-switch trigger output as trigger, and in this case the problem occurs.
Please, let me know the result.
Thanks
Dario
0 Kudos
Message 11 of 14
(1,159 Views)
Dario,

I have tested the VI you have posted and it works fine.
See my suggestions in the attached VI here and tell me what you think.
Regards,

AlessioD
National Instruments
0 Kudos
Message 12 of 14
(1,150 Views)
Alessio, you said:

"This is configured to run for 5 seconds. There are 2 seconds before the trigger can be sensed.
If I apply a digital trigger before the 2 seconds, it is not recognized because there are
not enough samples in the buffer"

That's the problem I have!!

If I setup the DAQ board to get samples for 5 seconds with a pretrigger time of 2 seconds and, immediately, I raise the trigger, the acquisition starts, I can see the 5 seconds of samples but without pretrigger samples (I see the trigger event at the beginning).

In one sentence: after the "DAQmx Start Task.vi" call, a wait of 2 seconds should be inserted before raising the trigger.

Or did I misunderstand your answer?

Dario
0 Kudos
Message 13 of 14
(1,144 Views)
Dario,

I am going to put it in Italian...

Se faccio partire il VI e applico il trigger immediatamente, prima che siano passati i 2 secondi, il trigger non viene visto, l'acquisizione non termina perche' resta in attesa di un trigger dopo che i primi 2000 campioni sono stati acquisiti (2 sec).
Da quello che dici tu invece, se fai partire il VI e applichi trigger immediatamente, l'acquisizione prende 5000 punti e termina.
Questo non e' quello che mi succede.
Hai provato a passare il trigger digitale da una linea digitale della scheda stessa controllata con un VI che alza e abbassa la linea simulando un impulso?

saluti,
AlessioD
0 Kudos
Message 14 of 14
(1,143 Views)