Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get the X-Y GRID INSPECTION.VI to wait until data collection is complete before it starts moving?

I am using a PCI-7344 card with LabView to control a 3-axis servo motor motion system in conjunction with a data acquisition system. The intent is to collect data at each grid point of an X-Y grid.

Using the X-Y Grid Inspection (Template).vi as a starting point, I programmed my data acquisition vi to start when the Check Blend Complete Status.vi returned a value of TRUE. I expected the while loop to complete once the data acquisition was complete, but the system starts moving at the same time the data acquisition starts.

Is there a way to force the motion system to wait for the data acquisition to complete prior to moving to the next waypoint?
0 Kudos
Message 1 of 2
(3,114 Views)
If you enter a positive value into the blend factor control (period in ms), the board will wait this amount of time until it starts the next move.
The Check for Blend Complete.flx function returns TRUE when this wait period is finished. Thus you will see the bahvior you have described.

There are three options I can think of:
1. Check the move complete status in order to start your measurement after the move has come to a stop.
This method might be not the ideal solution as you need to be sure that your measurement doesn't take longer than the wait period you have entered as blend factor. Of course you can make this period very long but then your overall test time will increase.

2. To avoid the disadvantage of 1. don't use blending at all. Instead start a
move to the desired position, wait for move complete, do your measurement and start the next move. This method makes sure that you don't waste time.

3. This might be the smartest and fastest method but there are a few additional requirements:
- The time for your measurement is fixed
- You can use an external trigger or scanclock to start your measurement.

If these requirements are met you could combine the x-y grid example with a breakpoint example.
You could program your board to generate a breakpoint (trigger) at each target position. The Breakpoint output of your 7344 is connected to the trigger or scanclock or whatever input of your measurement device. Now each time your axes reach the next target position the 7344 fires a trigger and your measurement device acquires data.

Best regards,

Jochen Klier
National Instruments Germany
Message 2 of 2
(3,114 Views)