!SRU                Set event when the speed reference is equal or under a 32-bit value or the value of a fixed variable

Syntax                        

!SRU value32

! if SpeedReferenceUnder value32

!SRU VAR32

! if SpeedReferenceUnder VAR32

 

OperandsVAR32: fixed variable

value32: 32-bit fixed immediate value

PlaceTMLOnline

Binary code

DescriptionSets the event condition when the speed reference is equal or under the specified value or the value of the specified variable. After you have programmed an event, you can do the following actions:
Change the motion mode and/or the parameters when the event occurs, with command UPD!
Stop the motion when the event occurs, with command STOP!
Wait for the programmed event to occur, with command WAIT!

The programmed event is automatically erased when the event occurs or if the timeout for the WAIT! command expires.

Remark: After setting UPD! or STOP! you need to wait until the programmed event occurs using WAIT!, otherwise, the program will continue with the next instructions that may override the event monitoring.

 

ExecutionActivates the monitoring of the event, when speed reference <= value32, respectively VAR32. This operation erases a previous programmed event that has occurred.

 

Example:

//Motor is decelerating. Start a position profile when speed

//reference < 600 rpm

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

!SRU 20; //Set event: when position reference is <= 3 rev

// prepare new motion mode

CACC = 0.3183;//acceleration rate = 1000[rad/s^2]

CSPD = 100;//slew speed = 3000[rpm]

CPOS = 20000;//position command = 10[rot]

CPR; //position command is relative

MODE PP;

TUM1; //set Target Update Mode 1

UPD!; //execute on event

WAIT!;//Wait until the event occurs