National Instruments NI-Motion Home Safety Product User Manual


 
Chapter 14 Onboard Programs
© National Instruments Corporation 14-15 NI-Motion User Manual
Algorithm
Figure 14-8. Updating Velocity Based on ADC Channel Algorithm
Before you execute this program, set the operation mode of the axis to
velocity mode.
Set a label
Start move
Jump to label
Begin store
Put motion controller in store mode
End store
End the store mode
Read ADC
Read the analog channel, and
save value to an onboard variable
Jump to label
Jump to label if no update
required. Else continue.
Load velocity
Update the loaded velocity
with the new velocity
Get velocity value
Multiply ADC value by a
scale factor to calculate velocity
Check if value needs
to be updated
Update if last value is
different from current value
No
Ye s