!RPU                Set event when the load relative position is equal or under a 32-bit value or the value of a long variable

Syntax                        

!RPU value32

! if RelativePositionUnder value32

!RPU VAR32

! if RelativePositionUnder VAR32

 

OperandsVAR32: long variable

value32: 32-bit long immediate value

PlaceTMLOnline

Binary code

RPU

DescriptionSets the event condition when the load relative position is equal or under the specified value or the value of the specified variable. The relative position is the load displacement from the beginning of the actual movement.

Remark: The origin for the relative position measurement (TML variable POS0) is set function of the target update mode. Under TUM1, POS0 = TPOS. Under TUM0, POS0=APOS_LD.

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 load relative position <= value32, respectively VAR32. This operation erases a previous programmed event that has occurred.

 

Example        

//Move negative and change speed command after 10 rev

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

!RPU 20000;//Set event: when load relative position is <= 10 rev

CSPD = 13.3333;//new slew speed command = 500[rpm]

UPD!; //execute on event

WAIT!;//Wait until the event occurs