Please enable JavaScript to view this site.

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

It is used by the mv_to_cjv() motion function.

It consists of the following information:

Field

Type

Description

stopPosition

REAL

(read only) If the field dSpeed is set to zero, the stop position is automatically written

stopTime

REAL

(read only) In case of imposing the field dSpeed to zero, the relative time required for stopping is automatically written

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, its 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 controlled (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 variable as follows:

; in rule_init

oldValue = rr(1000)

; in rule_prologue

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

oldValue = rr(1000)

; in rules the value of the controlled magnitude is manipulated

; before the call to MV_TO

stru_mvto.cpos = rr(1000)

stru_mvto.cSpeed = velValue

....

rr(1000)= MV_TO_CJV(........)

cAcc

REAL

Current acceleration [units/sec²].

To be updated the first time the function is called.

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

stru_mvto.cAcc = IA()

dPos

REAL

Desired position [units]

dSpeed

REAL

Desired speed [units/sec]

dAcc

REAL

Acceleration [units/sec²]

dJerk

REAL

Jerk [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.

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