LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Retriggerable Tasks in NI-DAQmx using PFI (USB 6001 card)

Hello,

I am using a USB-6001 card.

I use the PFI0 to trigger an Analog Output generation.

I cannot find out how to reset the trigger so that the generation occurs every time a rising edge arrives on PFI0.

 

I started my code using the NI example "Voltage - Finite Output.vi".

My idea was to put the "Start-Wait-Stop" function in a while loop, but after the first trigger arrives, the generation is continuous (as if the task remembers the old trigger and does not wait for a new one).

Why stopping-restarting the task does not seem to clear the previous trigger ?

What should I do ?

 

Thank you for your help

 

 

0 Kudos
Message 1 of 16
(3,147 Views)

Try using the Start.Retriggerable property via a "Triggering Node".

You probably don't need to loop through Start/Stop cycling given the finite samples.

 

Copying from the help for the property:

Start:More:Retriggerable Property

Short Name: Start.Retriggerable

Property of DAQmx Trigger

Specifies whether a finite task resets and waits for another Start Trigger after the task completes. When you set this property to TRUE, the device performs a finite acquisition or generation each time the Start Trigger occurs until the task stops. The device ignores a trigger if it is in the process of acquiring or generating signals.


GCentral
0 Kudos
Message 2 of 16
(3,084 Views)

I tried this solution but I cannot see any "start.retriggerable" in the "DAQmx trigger" property node !

Am I missing something ?

I am using LV2018.

0 Kudos
Message 3 of 16
(3,073 Views)

Should be under Start > More  > Retriggerable

retrigger.png

Edit: Highlight the right node...

 


GCentral
0 Kudos
Message 4 of 16
(3,071 Views)

Great, thank you for the screen shot.

It is clear now.

What I find strange is that this "retriggerable" property does not appear if I use a generic property node connected to the Task wire and select the DAQmx class.

 

0 Kudos
Message 5 of 16
(3,054 Views)

@titi_nicolas wrote:

Great, thank you for the screen shot.

It is clear now.

What I find strange is that this "retriggerable" property does not appear if I use a generic property node connected to the Task wire and select the DAQmx class.

 


So if you connect a normal property node to a DAQmx task wire, you'll need to right click on the property node and choose (in this case) "Select DAQmx Class" > DAQmx Trigger. 

There are about 15 classes you can choose from, each having different properties available. Sometimes it takes a couple of guesses to find the right one if you don't already know/remember.

retrigger.png

The default when you connect a generic PN is "DAQmx Event", which is basically never what I want...


GCentral
0 Kudos
Message 6 of 16
(3,039 Views)

Yes, this is exactly what I did...

I will send you a screenshot next week when I will be back to my office.

0 Kudos
Message 7 of 16
(3,020 Views)

So I took the screenshot of the "DAQmx Trigger" node and as you can see it shows much less options as yours, and in particular I don't have any "Retriggerable" item under "Start>More>".

Trigger node properties.png

 

I found out that LabVIEW is filtering out the results depending on the device connected to the computer.

So it means that my USB-6001 card does not support the "Retriggerable" option.

 

So we are back to square 1 : what should I do to rearm the trigger ?

Since my test with "starting-stopping" the task does not work, I don't see how to do it.

Personally, I can not believe that this DAQ card can only trigger once... this would not make any sense.

 

I would appreciate any help.

Thanks

 

0 Kudos
Message 8 of 16
(2,984 Views)

Hi,

 

Sorry for the delay replying - I'm away from a reliable internet connection at present.

Indeed that collection of options does seem depressingly short...

Perhaps someone else can more elegantly solve your problem (using a retriggering equivalent system) but if the triggers are not too fast, you might have success with your original method.

I'd suggest placing both the Trigger and the Write nodes before the Start node within the loop and seeing if that works. If so, try removing one or the other and determine which need to be redone each time. I'd expect that if you can't set Regeneration to be enabled (using a Write node) then you'll need to rewrite the same pattern each time (but you don't need to recreate it).

 


GCentral
0 Kudos
Message 9 of 16
(2,946 Views)

Hello, I encountered the same issue- trying to use a USB 6003 low cost card to drive the AO with limited samples and retriggerable function. Although this post was a few years ago, I am curious if you finally had a way to solve this problem. Thanks!

0 Kudos
Message 10 of 16
(1,175 Views)