Automatically starting onboard programs, Changing a time slice – National Instruments NI-Motion User Manual

Page 250

Advertising
background image

Chapter 14

Onboard Programs

NI-Motion User Manual

14-42

ni.com

Automatically Starting Onboard Programs

You can configure the onboard program to start automatically without
calling the Run Program function. The onboard program runs as soon as the
motion controller exits the reset state.

To use this feature, save the onboard program to FLASH, and then call
the Enable Auto Start function. The motion controller checks to see if the
auto-start flag is set when it boots up. If the flag is set, the motion controller
executes the onboard program configured to automatically start. The
auto-start requires no host interaction after it is set up.

Automatically starting the onboard programs is very useful if you need to
execute monitoring tasks to begin as soon as the computer and controller
boot up.

Changing a Time Slice

Use the Load Program Time Slice function to specify the minimum time an
onboard program has to be run per watchdog period, with a total of 20 ms
allowed for all running onboard programs. The default value of 2 ms allows
a maximum of 10 onboard programs running simultaneously with equal
time slices.

You can increase the time slice of the program to change its performance.
The higher you set the time slice, the more the program can execute,
because it commands more processor time.

However, because the processing power is being held longer by the onboard
program, the response times of other onboard programs are slower. Also,
increasing the time slice of a program may reduce host responsiveness and
increase I/O reaction time, even though host communications and I/O
reaction have higher priorities than onboard programs because the motion
controller must guarantee that every program runs for its allotted time per
watchdog period.

Advertising