Discussion:
Retriggable option in Traditional DAQ
(too old to reply)
Molder
2007-10-13 07:49:03 UTC
Permalink
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!!
Raajit L
2007-10-15 22:40:05 UTC
Permalink
Hi,There is an example on the National Instruments website that you can modify for retriggerable AI in Traditional DAQ.&nbsp; Here it is. <a href="http://sine.ni.com/devzone/cda/epd/p/id/2062" target="_blank"> Retriggerable Analog Input with Two DAQ-STC Counters</a> . 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.<a href="http://digital.ni.com/public.nsf/websearch/0BE919DC92D7419E86256C2C00716ECB?OpenDocument" target="_blank">How Can I Set the Counters on My E Series DAQ Card to Achieve a Re-Triggerable Analog Input Acquisition?</a> <a href="http://digital.ni.com/public.nsf/websearch/5E765D80CB141102862568AF005B62D5?OpenDocument" target="_blank"> Configuring an Analog Input Acquisition with Multiple Triggers on an E Series DAQ Device</a> Hope these links help you.&nbsp; Please feel free to post again if you have any further questions.Regards,
Molder
2007-10-16 07:40:26 UTC
Permalink
Thanks Raajit. I will download it and try. Hope it works

keep you posted soon

cheers!
Molder
2007-10-22 10:56:29 UTC
Permalink
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
molderon
2007-10-24 11:40:08 UTC
Permalink
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


My_retriggerable_AO_advanced_6.vi:
http://forums.ni.com/attachments/ni/170/279996/1/My_retriggerable_AO_advanced_6.vi
Raajit L
2007-10-24 20:40:07 UTC
Permalink
Hi,Now that you mention your triggering parameters, I think there are a few of other ways that we can achieve this.&nbsp; - I assumed that you were doing digital triggering and not analog triggering.&nbsp; However that does not change too much.&nbsp; 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.&nbsp; This would make the code a little more complicated though.&nbsp; 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.&nbsp; There is a much easier option though.&nbsp; 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.&nbsp; However, if you are using this method, please see the attached image of the retrigger.vi.
- 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.&nbsp; 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.&nbsp; To do this, you can just create a while loop around the entire code that you posted, and do a finite, analog triggered acquisition.&nbsp; There is an example in the example finder that will be able to do this for you.&nbsp; It is called Generate N updates - E Series - A Trig.vi.&nbsp; 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.
- A last option is that we can also do
something like software triggering.&nbsp; We can just read this signal in
software and detect whether it is crossing a certain level and send the
output based on that.&nbsp; We can also stop the output based on the falling edge as well.&nbsp; This is not going
to be as accurate as hardware timed.
I think the second option might work out best for you.&nbsp; I have attached the VI for that and the screenshot is for the first option.&nbsp; Hope all of this helps.&nbsp; Please post back with any further questions.Best regards,


retriggerableanaloginput.png:
Loading Image...


anlogout.llb:
http://forums.ni.com/attachments/ni/170/280148/2/anlogout.llb
Molder
2007-10-25 16:24:45 UTC
Permalink
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!!
Molder
2007-10-29 16:58:28 UTC
Permalink
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

Loading...