LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger generation using DAQ Assistant

I'm trying to send a trigger in my Labview program to an external device through an NI DAQ board (PCIe-6361). The trigger cable is connected to a digital line (P0.0). In MAX, I can do this by manually turning on and off the line.

 

MAX.jpg

To do the same in Labview, I put two DAQ Assistants in flat sequence with 10 ms delay, each of which inverts the line as shown below (the VI is also attached). 

 

DAQ Assistant.jpg

1. Could anyone tell why it doesn't work?

2. Is there a more standard way to do this (generate a trigger in Labview)?

 

Thank you.

0 Kudos
Message 1 of 3
(2,855 Views)

Unfortunately, NI introduced the Dreaded DAQ Assistant, possiibly because instructors (and students learning "by themselves") didn't understand how easy DAQmx was to teach and utilize, and how "hiding all the details" inside the DDA (Dreaded DAQ Assistant) only confuses things.

 

The picture of the code that you posted doesn't say anything except that you never set the Digital Output to anything, so you never turn anything on or off in this code.  Do you see the input marked "Data"?  Nothing is wired to it!!!  Thus its value never changes.

 

I strongly recommend that you do a Web search for "Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquisition Applications" (I think that's the name of it).  If you haven't done this already, run MAX, find your PCI3-6361, and create Test Panel for its Digital Output port.  Play a bit with it.  Create a Task for it with MAX.  Now you can write a 4 DAQmx program, "Start Task", "DAQmx Write" (with True wired to the input), "DAQmx Write" (with False), and "Stop Task".  Nothing "hidden" inside an inscrutable DDA.

 

Bob Schor

0 Kudos
Message 2 of 3
(2,804 Views)

Thank you so much for the suggestions.

The webpage you told has many useful links, which are very helpful.

Yes I have used the Test Panels in MAX to turn on and off the digital line. Creating a task in MAX shows a different menu, what I see on the DAQ Assistant in Labview, so I end up with the same problem.

Following your suggestion, I added a waveform data to the DAQ Assistant, and it works!

Can you please take a look at the screen capture below and let me know if you have any further suggestions?

I'm still unsure whether this is a standard way to generate a trigger in Labview.

 

3doptics_0-1584374723328.png

3doptics_1-1584374739723.png

 

0 Kudos
Message 3 of 3
(2,778 Views)