ENLSN1        Enable negative limit switch input to detect a low to high transition

Syntax                        

ENLSN1

Enable Limit Switch Negative 0->1

Operands

PlaceTMLOnline

Binary code

Firmware version FAxx

ENLSN1

Firmware version FBxx

ENLSN1_MC3

DescriptionEnables negative limit switch input capability to detect a transition from 0(low) to 1(high). 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 high negative 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

ENLSN1;//Enable negative limit switch for low->high transitions

!LSN;  //Set event on negative limit switch(low->high 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