02-11-2010 06:21 PM
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
02-11-2010 08:45 PM
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:
I would try this order of operations (for example, using a 3-frame flat sequence structure):
(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