Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the order in which this Onboard program executes?

The two attached .vi's were written by someone at NI and I received them through a third party. The order of execution is as follows. Download positions, run the program (which does the move) end the program. Sometimes (same move, same conditions) the system oscilates or overshoots. See two examples attached. When "motion capture" goes high, does the program execute the "stop-halt" .vi?
Download All
0 Kudos
Message 1 of 5
(3,409 Views)
Looking at the block diagram for the Load Program to Board (Init_Board_program.vi) VI, then we can see that the program waits on a certain condition (in this case it is the High Speed Capture) and then it will stop the motor (kill the motor). The Stop Motion VI is called in order to stop movement by your motor.

The following tutorial on our website discusses the three different stopping options you have with a motion board. The kill methods generally takes the longest to stop and can cause some motion even after the command is sent. Refer to the following site if you want to read up on each of these methods:

Stopping Modes
http://zone.ni.com/devzone/conceptd.nsf/webmain/567F08C7E3A0CB1E86256802007B99F5?opendocument

Finally, if you want to look at a few oth
er examples and run some other code on your board, then open up the NI Example Finder (go to the Help menu and select Find Examples). Browse for examples by "Directory Structure" and then expand out the Motion folder, which is installed with NI-Motion. For onboard programs, look through the examples in the Onboard folder.

Regards,
Michael
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,409 Views)
Michael,

Thanks for you answer, I've been "fiddling" with this program for most of a week now. And I find that the "High Speed Capture" seems to occure before all my positions are read and executed (positions are placed in a buffer before each run). In particular, the velocity from point to point does not appear to be accurately followed, and my deceleration profile is never reached. Why is this and what is the remeady?

Thanks
JWFee
0 Kudos
Message 3 of 5
(3,409 Views)
Micheal,

I have NI Motion software but there are NO Examples with it...where can I get these?

JWFee
0 Kudos
Message 4 of 5
(3,409 Views)
If the motion folder does not appear in the NI Example Finder then you can check the folder structure of your computer to see if they are installed. The examples are located in the ..\LabVIEW 7.x\examples\Motion\FlexMotion folder. If this folder does not exist on your system, then they most likely were not installed with your installation of NI-Motion. By going through Windows' Control Panel >> Add/Remove Programs you can modify the installation of NI-Motion and add the necessary support to the computer that should install the shipping examples. In Add/Remove Programs, you should highlight the National Instruments Software entry, choose change, and then select NI-Motion from the list of NI Software that appears in the next window.
0 Kudos
Message 5 of 5
(3,409 Views)