Please enable JavaScript to view this site.

This keyword allows a variable of type STRU_MVTO (STRUCT_P) to be defined.

It is used by the mv_to() motion function.

It consists of the following information:

Field

Type

Description

cPos

REAL

Current position [units].

To be updated the first time the function is called.

In case the position of an axis is controlled, the assignment to be made is:

stru_mvto.cPos = IP()

cSpeed

REAL

Current speed [units/sec].

To be updated the first time the function is called.

In case the position of an IP axis is controlled, the relative IV (speed) is automatically calculated by RTE. The assignment to be executed thus results:

stru_mvto.cspeed = IV()

In case the value of a register or variable is driven (thus not the IP), the calculation of cSpeed (current speed) must be done by the user.

The simplest system is to calculate the rate of change of the controlled unit as follows:

; in rule_init

oldValue = rr(1000)

; in rule_prologue

velMeasure = (rr(1000)-oldValue) / si

oldValue = rr(1000)

; nelle rules viene manipolato il valore della grandezza pilotata

; prima della chiamata alla MV_TO

stru_mvto.cpos = rr(1000)

stru_mvto.cSpeed = velMeasure

....

rr(1000)= MV_TO(........)

dPos

REAL

Desired position [units]

dSpeed

REAL

Desired speed [units/sec]

acc

REAL

Acceleration [units/sec²]

dec

REAL

Deceleration [units/sec²]

delta

REAL

Time increment since the last execution of the function. If used in rules then it corresponds to the value of si.

NOTE: It is not mandatory that the value refer to a time. Nothing prohibits it from being a space of a master axis, for example.

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC