MODE CS        Set electronic camming slave mode

Syntax                        

MODE CS

Set axis in MODE Camming Slave

Operands

PlaceTMLOnline

Binary code

DescriptionSets the drive/motor to operate in the electronic camming slave mode. In this mode, the drive/motor performs a position control with reference set by a cam profile function of the master position. The cam profile is defined by a cam table – a set of (X, Y) points, where X is cam table input i.e. the master position and Y is the cam table output i.e. the corresponding slave position.  Between the points the drive/motor performs a linear interpolation.

 

The new motion mode becomes effective at the next update command UPD.

 

Example

// Electronic camming slave. Master position is read from 2nd

// encoder inputs. Master resolution: 2000 counts/rev

CAMSTART = 0xF000; //Initialize CAM table start address

EXTREF 2; // master position read from P&D or 2nd encoder

CAMOFF = 200; //Cam offset from master

CAMX = 0.5; //Cam input correction factor

CAMY = 1.5; //Cam output correction factor

MASTERRES = 2000; // master resolution

MODE CS; //Set electronic camming slave mode

TUM1; //Set Target Update Mode 1

SRB ACR, 0xEFFF, 0x0000; //Camming mode: Relative

UPD; //execute immediate