ENLSP0        Enable positive limit switch input to detect a high to low transition

Syntax                        

ENLSP0

Enable Limit Switch Positive 1->0

Operands

PlaceTMLOnline

Binary code

Firmware version FAxx

ENLSP0

Firmware version FBxx

ENLSP0_MC3

DescriptionEnables positive limit switch input capability to detect a transition from 1(high) to 0(low). When the first transition occurs:
The input capability to detect transitions is disabled. It must be enabled again to detect another transition
Motor position APOS_MT is captured and memorized in the TML variable CAPPOS, except the case of open-loop systems, where reference position TPOS is captured instead
Master position APOS2 or load position APOS_LD is captured and memorized in the TML variable CAPPOS2, except the case of steppers controlled open loop with an encoder on the load, when load position is captured in CAPPOS.

The selection between master and load position is done as follows: load position is saved in CAPPOS2 only for the setup configurations which use different sensors for load and motor and foresee a transmission ratio between them. For all the other setup configurations, the master position is saved in CAPPOS2.

 

Example

//Reverse when the active low positive limit switch is reached

//Position feedback: 500 lines encoder (2000 counts/rev)

CACC = 0.0637;        //acceleration rate = 200[rad/s^2]

CSPD = -16.6667;        //jog speed = -500[rpm]

MODE SP;

UPD;                        //execute immediate

ENLSP0;//Enable positive limit switch for high->low transitions

!LSP;  //Set event on positive limit switch(high->low transition)

WAIT!;//Wait until the event occurs

!MC;        // limit switch is active -> quick stop mode active

WAIT!;// wait until the motor stops because only then the new

// motion commands are accepted

CSPD = 40;                //jog speed = 1200[rpm]

MODE SP;                //after quick stop set again the motion mode

UPD;                        //execute immediate