Algorithm, Figure 16-2. rotating knife application algorithm, Algorithm -3 – National Instruments NI-Motion User Manual

Page 274

Advertising
background image

Chapter 16

Rotating Knife

© National Instruments Corporation

16-3

NI-Motion User Manual

Algorithm

Figure 16-2. Rotating Knife Application Algorithm

Initialize A = 0; B = 500

Load appropriate move

constraints for the slave

Set gear master = encoder 4;

Slave = axis 1

Enable high-speed capture

Set gear ratio to 1:1

Assuming circumference of the

blade = length of cut

Needed for the superimposed

(correction) move

Set operation mode to be

relative to captured position

Also called registration move mode

Wait for high-speed capture;

Read captured position

Set A = A + 2000

B = B + 2000

Correction =

A – captured position

Enable gearing on slave axis

After gearing is enabled, web can

be started, which rotates the knife

Loop waiting for move complete

Load target position =

correction

Start motion on slave
if current position > B

Advertising