Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a hardware trigger on an user event?

Dear all,
 
I would like to generate a hardware trigger on one of the RTSI lines for (repeatable) ingle point measurements. I'm using the following NI PCI cards to perform several data aquisitions synchonuously :6602, CAN series 2, 6220 and GPIB.
 
I would like to generate a trigger when I push a button or a function call inside a loop. For now I initialized a new counter generating a single pulse. However, it takes too much time to reinitialize a counter each time.
 
Does someone know a better solution?
 
Thanks,
Jos
 
P.S. I'm using LabView 7.1  
0 Kudos
Message 1 of 5
(2,995 Views)
Do you want to have the ability to trigger on both a external hardware trigger as well has a software trigger?  One option is to set your acquisition to trigger on a digital edge from some PFI/rtsi line and then configure a second task to write to this line based on a software trigger (very similar to what you are doing).  The internal trigger is esentially a task configured as a single shot pule out of one of your counters but configured to trigger on a software trigger (an option under DAQmx) this is done out of the event loop.  Now in the GUI event thread when the button value change event is triggered call the "send software trigger" to the task.  This will be faster than creating a new single shot task since the configure happens once outside of the loop and the only overhead is on the software trigger call.  Another thing you can play with is the "commit command" which sets up your task resources but does not start them.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 5
(2,975 Views)

Thanks for your answer! I tried to implememt a single pulse counter including a software trigger, but I don't have much experience using software triggering... Do you have an example how to setup the counter and generate a software trigger in a simple while loop??

Thanks again!

Jos

0 Kudos
Message 3 of 5
(2,952 Views)
I am not sure if the 6602 supports the advanced software trigger mode unfortunatly.  One other way to minimize the overhead of reconfiguring a task to do the trigger is to use the control->commit setting before a stert, this should do most of the hardware resource allocation before you run the start/wait for task to complete/stop task sequence in the button value changed event.  Since this is a software initiated trigger, I would imagine that you will be starting the data acquisition relativly infrequently, so overhead will be less of a concern.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 5
(2,942 Views)
Hello Paul,
 
Thanks for your replies! I figured out that the 6602 doesn't support software triggering (unfortunately). For now, I configured a DIO and I'm writing '1' and '0' to generate a trigger pulse which is routed to a PFI line internally. I only need to perform a few tests to verify the speed of the 'software' trigger!
 
Grtz,
Jos 
0 Kudos
Message 5 of 5
(2,928 Views)