Repeated Move in a FOR Loop
Downloads
Filename: repeated_move_in_a_for_loop.zip
Requirements: View
SUMMARY:
This FlexMotion example demonstrates the implementation of a FOR loop data structure in an onboard program. A relative move of a set length followed by a delay is stored in a loop using this VI.
DEVELOPMENT DETAILS:
Application Software: LabVIEW 5.0.x
Hardware: FlexMotion controller
Driver Software: FlexMotion Software 4.0
REQUIRED HARDWARE:
One-axis motion system.
INSTRUCTIONS:
(0) Initialize the FlexMotion controller before running this VI.
(1) Set the program number to store, move length, delay between moves, and loop parameters on the front panel.
(2) Run the VI to store the program. (The program will not be executed at this time.)
(3) You can then run the program you have stored by calling the run_prog.flx function with the appropriate program number.
ADDITIONAL NOTES:
(a) You should read the following items before writing FlexMotion onboard programs:
(1) The Onboard Programs section of the FlexMotion Hardware User Manual (page 4-9 in the November 1998 edition).
(2) The section about onboard variables in your FlexMotion Software Reference Manual (pages 4-11 and 4-12 in the November 1998 edition)
(3) You will find the chapter of the FlexMotion Software Reference Manual concerning the Onboard Programming functions to be an invaluable reference resource (Chapter 12 of the November 1998 edition) along with the online help for the VI functions.
(b) If you have multiple FOR loops in one onboard program, you may recycle the Loop Variable, Increment Variable, and Final Variable numbers for the different loops in your program if they will not be needed by a previous or subsequent loop while the current loop executes and are not integrated into any other aspect of the program.
(c) This example assumes the the final value of the loop variable should be greater than the initial value (i.e. positive value for increment variable). If the final value of the loop variable is less than the initial value (i.e. decrement instead of increment), then you should modify the Jump condition in the loop variable test to be "Less Than" instead of "Greater Than".
Requirements
Filename: repeated_move_in_a_for_loop.zip
Software Requirements
Application Software: LabVIEW Full Development System 5.0.1
Language(s): LabVIEW
Hardware Requirements
Hardware Group: Motion Control
Driver: NI-Motion
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
