Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How Do I start Continuous DAQ measurements after a specific event

Here is what i am trying to do.

 

I have an oscillatory motion on an axis through a PCI 7342.  This motion is contoured, and based of the 1-d countoured move example VI.  What I want is to configure a break point, so that at the first peak of the motion, a trigger is sent through the RTSI line to my PCI 6221, so that once I start taking data, I know how everything lines up in time.  The problem is, the tasks that I have on the daq, to measure a load cell, and to measure the counter for the axis, both start as soon as the start task VI hits.  I have the breakpoint configured, and I am reading the status to see that is isn't on, then does come on down  the road.  All the examples I have found involve finite sampling, but I just don't want the task to start until a certain point in the motion, and I really don't want to do this in labview, as the associated software lag will introduce an unacceptable phase shift into my different data arrays.

 

Attached is the current working verison of the VI I am learning from to figure this out.

 

 I use matlab to create the array for the axis to spline through.  So, if you don't have matlab, you probably won't be able to open the VI. Or I guess the script will be disabled.

 

Thank you if you can help.

 

Sincerely,

 

Keith Taylor

 

0 Kudos
Message 1 of 2
(2,970 Views)

Hi Keith,

 

You should configure the motion controller and the DAQ tasks in a specific order. Without a sequence structure or dataflow dependency, LabVIEW will execute parallel codepaths in, well, parallel. If Select Signal or Enable Breakpoint Output changes the state of RTSI0, DAQmx could see this as a trigger, depending on the polarity.

 

The DAQmx shipping examples in LabVIEW\Examples\DAQmx\Synchronization demonstrate a few approaches for starting multiple tasks in a specified order:

  • Use parallel error clusters with a flat sequence structure around the VIs whose order matters
  • Merge/split the error cluster before/after the VIs whose order matters
  • Zigzag a single error cluster through all of the VIs in the desired order

 

I would try this order of operations (for example, using a 3-frame flat sequence structure):

  1. Enable Breakpoint Output (so that the motion controller is driving RTSI0 before DAQmx starts listening for triggers)
  2. DAQmx Start (on both tasks, causing them to listen for triggers)
  3. Start Motion

(Disclaimer: I've never worked with NI motion control products, so I'm not sure what polarity the motion controller uses for breakpoints or which VI actually causes it to drive RTSI0.)

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 2 of 2
(2,962 Views)