LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Retriggable option in Traditional DAQ

Hi guys,

Does anybody know if there is any option to use retriggable
functionality in traditional DAQ?

Is there anyway to stop trigger on falling time and starting it again
on raising time?

I am using DAQPad 6070E with Labview v7.1

Thanks!!

0 Kudos
Message 1 of 8
(3,518 Views)
 

Hi,

There is an example on the National Instruments website that you can modify for retriggerable AI in Traditional DAQ.  

This example performs analog input using Counter 0 as an external scan clock, which is gated with Counter 1. Counter 1 generates a retriggerable pulse, which is initiated by a trigger signal on PFI 4. This is similar to scan clock gating; however, this operation does not require that the trigger line remain in a logic high state to acquire data.

Please also take a look at these Knowledge Base articles.

Retriggerable Data Acquisition with NI DAQ Devices


Hope these links help you.  Please feel free to post again if you have any further questions.

Regards,

 
Raajit L
National Instruments
0 Kudos
Message 2 of 8
(3,489 Views)
Thanks Raajit. I will download it and try. Hope it works

keep you posted soon

cheers!

0 Kudos
Message 3 of 8
(3,482 Views)
Hi again, Raajit,

Im afraid it does help but not solving my problem yet 😞

I would like to issue an analogue OUTPUT based on an inconing signal
level..

in other words, I need to build a Hardware trigger that listens to an
incoming analogue signal (say 1Hz square pulse 20ms dutycycle) and
only on its rising time crossing a threshold level, issue an analogue
output and return to listen again. This HW trigger should start each
time it senses the level crossed, i.e. retriggable option

hope its something you can help me with..

cheers

0 Kudos
Message 4 of 8
(3,466 Views)

Hi again Raajit,

Im attaching a code that is claimed to solve the retriggable issue, but does not work in my case..

My signal source that the trigger should be based on is connected to PFI0, but no AO is issued..

Thanks again

0 Kudos
Message 5 of 8
(3,456 Views)
Hi,

Now that you mention your triggering parameters, I think there are a few of other ways that we can achieve this. 

  1. I assumed that you were doing digital triggering and not analog triggering.  However that does not change too much.  All that we would need to do is internally route the ATCOUT signal, which is high when the analog trigger condition is matched, to the counter.  This would make the code a little more complicated though.  We would have to modify the "retrigger.vi" example that I posted in the last post to first of all replace the analog input with analog output and then we would also have to set up another analog input task, which is going to trigger on a analog edge and then internally route the ATCOUT to a counter.  There is a much easier option though.  From the code that attached in the last post it seems like you are not going with this method, since you would be needing to use all three of the counters.  However, if you are using this method, please see the attached image of the retrigger.vi.

  2. Since your incoming signal is only 1Hz, what we can do instead is just restart the entire task after capturing a certain amount of samples.  The reason I did not mention this before is because it takes a small amount of time to stop and restart the task, (in the micro second range), but since your trigger is coming in every 1 second, that gives us enough time to restart the task.  To do this, you can just create a while loop around the entire code that you posted, and do a finite, analog triggered acquisition.  There is an example in the example finder that will be able to do this for you.  It is called Generate N updates - E Series - A Trig.vi.  This however, is not going to achieve your requirement of stopping on a falling edge, if your falling edge is going to be consistently after a certain time (20ms) in your case, you can just generate only a certain number of analog output samples which will last 20ms.

  3. A last option is that we can also do something like software triggering.  We can just read this signal in software and detect whether it is crossing a certain level and send the output based on that.  We can also stop the output based on the falling edge as well.  This is not going to be as accurate as hardware timed.
I think the second option might work out best for you.  I have attached the VI for that and the screenshot is for the first option.  Hope all of this helps.  Please post back with any further questions.

Some of these things would be easier to acheive in NI-DAQmx instead of Traditional DAQ.  This is just a more recent driver that we provide and is easier to use.  It does have a different, but similar, programming API.  Please let me know if that will be an option as well.

Best regards,

Message Edited by Raajit L on 10-24-2007 03:41 PM

Raajit L
National Instruments
Download All
0 Kudos
Message 6 of 8
(3,441 Views)
Hi raajit,

Thanks for the prompt response!

You are correct that SW trigger is not an option as accuracy is
important and the software code causes a delay. my incoming signal is
not always 1HZ.. I used 1HZ just for the sake of testing, but in "real
life" it varies between 1Hz and 1.5-2Hz, hence a finite sample
generation wont help much..

Which kind of leaves us with the first option. Im afraid i did not
understnad how to route the ATCOUT, but i will try to play with it a
bit & get back to you shortly..

Thanks again!!

0 Kudos
Message 7 of 8
(3,415 Views)
Hi raajit,

Finnaly it worked!! many thanks for your help!!

There is one last thing, though 🙂

it seems that following a period of time in which the AO writes its
pulse pattern (sometime it after 10 seconds, sometim eits after 15
minutes), suddenly an AO message appears:

error: 10800 at AO control
NI-Daq LV: The operation could not complete within the time limit.

The error occured between the AO start and AO wait


Any clue?

Cheers


0 Kudos
Message 8 of 8
(3,390 Views)