Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

How To String Together Multiple Straight Line and Contour Moves in NI SoftMotion

Primary Software: LabVIEW Modules>>SoftMotion Development Module
Primary Software Version: 2.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
How can I string together multple moves, say a straight line move and a contoured move, together in the same SoftMotion program?

Solution:
The main idea behind stringing multiple moves together in the Soft Motion is as follows: set up the move, execute the move, set up the next move, wait for the first move to complete, start the second move, and repeat for subsequent moves.
  1. Set up the move

    To set up a straight line move, you will want to use Constraints and Line invoke nodes. These nodes are available at Functions»Vision and Motion»NI Soft Motion»Traj Generator. These invoke nodes will allow you to set the motion parameters for your first straight line move.


  2. Execute the move

    To start a move, use a Method invoke node from the same pallet as the Constraints and Line nodes from step one. Ensure that you have the Start method selection by right-clicking on the Method node and selecting Methods»Start.

    Create an enum constant by right-clicking on the Type terminal and selecting Create»Constant. Set the enum value to Start Motion.


  3. Set up the next move

    If you are interested in stringing two straight line moves together, you can set up your second move in a similar fashion as you set up the initial straight line move. However, if you are interested in using a contour move as your second move, you are going to need to set up a buffer for the contour points as well as set up your contour move.

    To set up a buffer for your contour move, simply put a Contour Move Create Buffer VI before your main trajectory loop. This vi is available at Functions»Visions and Motion»NI Soft Motion»Traj Generator»Contouring»Create

    To set up the parameters for your contour move, you will need to use the Contour Move Read/Write and Contouring Move Method invoke nodes. You will want to use the Contour Move Read/Write node to set your sampling rate and connect your axis handle. You will want to use the Contouring Move Methods node to load your contouring points. You can change the method of your contour Move Methods node by right-clicking the node and selection Methods»Write Points.


  4. Wait for move to complete

    There are a couple of ways that this can be accomplished. One way to accomplish this is to use while loop to wait for the Profile Complete component of the Execution Status cluster from your trajectory generation loop to become true. To implement this method, there are several things that must be done.

    1. Create an indicator for the Profile Complete boolean

      1. Wire the Execution Status wire from your trajectory generation loop to an Unbundle by Name function.
      2. Left-click on the Unbundle by Name and select Profile Complete
      3. Right-click on the Unbundle by Name and select Create»Indicator


    2. Create a Local Variable by right-clicking on the Profile Complete indicator just created and select Create»Local Variable.
    3. Create a While Loop

      1. Place a While Loop in your User Interface Loop in line with your contour move set up.
      2. Wire the Local Variable just created to the conditional terminal of the while loop.


      Note: There is a chance that the trajectory generation step has not yet received the new coordinates for the last move before this latest step begins. If this were to be the case, the Profile Complete status would be inaccurately set to true at the time it is queried. Thus, you will notice a simple wait in the while loop. This wait is simply to insure that the trajectory generation step has had time to receive the new coordinates by the time the Profile Complete status is checked.

  5. Start the Second move

    To start a contoured move, it must first be enabled. To enable a contoured move, use a Contouring Move Method invoke node. To get to the enable method, right-click on the invoke node and select Method»Enable. Then, right-click on the method and select Create»Constant. Ensure that the constant is set to true.

    Once the contoured move has been enabled, simply repeat step two to start the move


  6. Repeat

    To create multiple contoured and straight line moves, simply repeats steps 1 through 5 as many times as you need to in order to complete your entire move.


Related Links:
Developer Zone Community: Stringing multiple move types together using the NI SoftMotion Development Module
KnowledgeBase 3DEA4HB1: What is the Minimum Time Interval for a Contour Move?
KnowledgeBase 3J3D7FKZ: How does Feedback Word with Closed Loop Contour Moves?

Attachments:





Report Date: 05/19/2009
Last Updated: 12/04/2009
Document ID: 4XI8INTK

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit