Basic principles: "Positioning Interface"

The "Positioning interface" offers the user a possibility to implement travel commands directly on the terminal.

Table of contents

Predefined PDO Assignment

The "Predefined PDO Assignment" enables a simplified selection of the process data. Select the function "Positioning interface" or "Positioning interface compact" in the lower part of the Process data tab. As a result, all necessary PDOs are automatically activated and the unnecessary PDOs are deactivated.

Basic principles: "Positioning Interface" 1:
Predefined PDO Assignment

Parameter set

Two objects are at the user’s disposal in the CoE for the configuration – the "POS Settings" (Index 0x8040) and the "POS Features" (Index 0x8041).

Basic principles: "Positioning Interface" 2:
Settings objects in the CoE

Information and diagnostic data

Via the information and diagnostic data, the user can obtain a more exact statement about which error occurred during a travel command.

Basic principles: "Positioning Interface" 3:
Diagnostic objects in the CoE

States of the internal state machine

The state (drive controller) (Index 0x9040:03, 0x9050:03) provides information about the current state of the internal state machine. For diagnostic purposes this can be read out by the PLC for the propagation delay. The internal cycle works constantly with 250 µs. A connected PLC cycle is very probably slower (e.g. 1 ms). For this reason it may be the case that some states are not visible at all in the PLC, since these will sometimes run through only one internal cycle.

States of the internal state machine

Name

ID

Description

INIT

0x0000

Initialization/preparation for the next travel command

IDLE

0x0001

Wait for the next travel command

START

0x0010

The new command is evaluated and the corresponding calculations are performed

ACCEL

0x0011

Acceleration phase

CONST

0x0012

Constant phase

DECEL

0x0013

Deceleration phase

EMCY

0x0040

An "Emergency stop" has been triggered

STOP

0x0041

The motor has stopped

CALI_START

0x0100

Start of a calibration command

CALI_GO_CAM

0x0110

The motor is being driven towards the cam

CALI_ON_CAM

0x0111

The cam has been reached

CALI_GO_SYNC

0x0120

The motor is being driven in the direction of the HW sync pulse

CALI_LEAVE_CAM

0x0121

The motor is being driven away from the cam

CALI_STOP

0x0130

End of the calibration phase

CALIBRATED

0x0140

The motor is calibrated

NOT_CALIBRATED

0x0141

The motor is not calibrated

PRE_TARGET

0x1000

The set position has been reached; the position controller “pulls” the motor further into the target; “In-Target timeout” is started here

TARGET

0x1001

The motor has reached the target window within the timeout

TARGET_RESTART

0x1002

A dynamic change of the target position is processed here

END

0x2000

End of the positioning phase

WARNING

0x4000

A warning state occurred during the travel command; this is processed here

ERROR

0x8000

An error state occurred during the travel command; this is processed here

UNDEFINED

0xFFFF

Undefined state (can occur, for example, if the driver stage has no control voltage)

Standard sequence of a travel command

The “normally” sequence of a travel command is shown in the following flow diagram.
Coarse distinction is made between these four stages:

Startup

Test the system and the ready status of the motor.

Start positioning

Write all variables and calculate the desired target position with the appropriate “Start type”. Subsequently, start the travel command.

Evaluate status

Monitor the terminal state and, if necessary, dynamically change the target position.

Error handling

In case of error, procure the necessary information from the CoE and evaluate it.

Basic principles: "Positioning Interface" 4:
Flow diagram for a travel command

Start types

The “Positioning interface” offers different types of positioning. The following table contains all commands supported; these are divided into four groups.

Supported “Start types” of the “Positioning interface”

Name

Command

Group

Description

ABSOLUTE

0x0001

Standard

Absolute positioning to a specified target position

RELATIVE

0x0002

Relative positioning to a calculated target position; a specified position difference is added to the current position

ENDLESS_PLUS

0x0003

Endless travel in the positive direction of rotation (direct specification of a speed)

ENDLESS_MINUS

0x0004

Endless travel in the negative direction of rotation (direct specification of a speed)

ADDITIVE

0x0006

Additive positioning to a calculated target position; a specified position difference is added to the last target position

ABSOLUTE_CHANGE

0x1001

Standard Ext.

Dynamic change of the target position during a travel command to a new absolute position

RELATIVE_CHANGE

0x1002

Dynamic change of the target position during a travel command to a new relative position (the current changing position value is used here also)

ADDITIVE_CHANGE

0x1006

Dynamic change of the target position during a travel command to a new additive position (the last target position is used here)

MODULO_SHORT

0x0105

Modulo

Modulo positioning along the shortest path to the modulo position (positive or negative), calculated by the "Modulo factor" (Index 0x8040:0E)

MODULO_SHORT_EXT

0x0115

Modulo positioning along the shortest path to the modulo position; the "Modulo tolerance window" (Index 0x8040:0F)

MODULO_PLUS

0x0405

Modulo positioning in the positive direction of rotation to the calculated modulo position

MODULO_PLUS_EXT

0x0415

Modulo positioning in the positive direction of rotation to the calculated modulo position; the "Modulo tolerance window" is ignored

MODULO_MINUS

0x0305

Modulo positioning in the negative direction of rotation to the calculated modulo position

MODULO_MINUS_EXT

0x0315

Modulo positioning in the negative direction of rotation to the calculated modulo position; the "Modulo tolerance window" is ignored

MODULO_CURRENT

0x0405

Modulo positioning in the last direction of rotation to the calculated modulo position

MODULO_CURRENT_EXT

0x0415

Modulo positioning in the last direction of rotation to the calculated modulo position; the "Modulo tolerance window" is ignored

CALI_PLC_CAM

0x6000

Calibration

Start a calibration with cam (digital inputs)

CALI_HW_SYNC

0x6100

start a calibration with cam and HW sync pulse (C-track)

SET_CALIBRATION

0x6E00

Manually set the terminal to "Calibrated"

SET_CALIBRATION_AUTO

0x6E01

Automatically set the terminal to "Calibrated" on the first rising edge on "Enable"

CLEAR_CALIBRATION

0x6F00

Manually delete the calibration

ABSOLUTE:

The absolute positioning represents the simplest positioning case. A position B is specified and travelled to from the start point A.

Basic principles: "Positioning Interface" 5:
Absolute positioning

RELATIVE:

In relative positioning, the user specifies a position delta S, which is added to the current position A, producing the target position B.

Basic principles: "Positioning Interface" 6:
Relative positioning

ENDLESS_PLUS / ENDLESS_MINUS:

The two start types "ENDLESS_PLUS" and "ENDLESS_MINUS" offer the possibility in the "Positioning interface" to specify a direct motor velocity in order to travel endlessly in the positive or negative direction with the specified accelerations.

Basic principles: "Positioning Interface" 7:
Endless travel

ADDITIVE:

For additive positioning, the position delta S specified by the user is added to the target position E used for the last travel command in order to calculate the target position B.

This kind of positioning resembles the relative positioning, but there is a difference. If the last travel command was completed successfully, the new target position is the same. If there was an error, however, be it that the motor entered a stall state or an “Emergency stop” was triggered, the current position is arbitrary and not foreseeable. The user now has the advantage that he can use the last target position for the calculation of the following target position.

Basic principles: "Positioning Interface" 8:
Additive positioning

ABSOLUTE_CHANGE / RELATIVE_CHANGE / ADDITIVE_CHANGE:

These three kinds of positioning are completely identical to those described above. The important difference thereby is that the user uses these commands during an active travel command in order to dynamically specify a new target position.

The same rules and conditions apply as to the “normal” start types. "ABSOLUTE_CHANGE" and "ADDITIVE_CHANGE" are unique in the calculation of the target position i.e. in absolute positioning an absolute position is specified and in additive positioning a position delta is added to the momentarily active target position.

Note

Caution when using the "RELATIVE_CHANGE" positioning

The change by means of "RELATIVE_CHANGE" must be used with caution, since the current position of the motor is also used here as the start position. Due to propagation delays in the system, the position indicated in the PDO never corresponds to the actual position of the motor! Therefore a difference to the desired target position always results in the calculation of the transferred position delta.

Basic principles: "Positioning Interface" 9:

Time of the change of the target position

A change of the target position cannot take place at an arbitrary point in time. If the calculation of the output parameters shows that the new target position cannot be readily reached, the command is rejected by the terminal and the "Command rejected" bit is set. This is the case, for example, at standstill (since the terminal expects a standard positioning here) and in the acceleration phase (since at this point the braking time cannot be calculated yet).

CALI_PLC_CAM / CALI_HW_SYNC / SET_CALIBRATION / SET_CALIBRATION_AUTO / CLEAR_CALIBRATION:

The simplest calibration case is calibration by cam only (connected to one digital input).

Here, the motor travels in the

1st step with velocity 1 (Index 0x8040:09) in direction 1 (Index 0x8041:13) towards the cam.

Subsequently, in the 2nd step, it travels with velocity 2 (Index 0x8040:0A) in direction 2 (Index 0x8041:14) away from the cam.

After the "In-Target timeout" (Index 0x8040:0C) has elapsed, the calibration position (Index 0x8040:08) is taken on by the terminal as the current position.

Note

Observe the switching hysteresis of the cam switch

With this simple calibration it must be noted that the position detection of the cam is only exact to a certain degree. The digital inputs are not interrupt-controlled and are "only" polled. The internal propagation delays may therefore result in a system-related position difference.

Basic principles: "Positioning Interface" 10:
Calibration with cam

For a more precise calibration, an HW sync pulse (C-track) is used in addition to the cam. This calibration proceeds in exactly the same way as described above, up to the point at which the motor travels away from the cam. The travel is not stopped immediately; instead, the sync pulse is awaited. Subsequently, the “In-Target timeout” runs down again and the calibration position is taken on by the terminal as the current position.

Basic principles: "Positioning Interface" 11:
Calibration with cam and C-track

If calibration by hardware is not possible due to the circumstances of the application, the user can also set the "Calibrated" bit manually or automatically. The manual setting or deletion takes place with the commands "SET_CALIBRATION" and "CLEAR_CALIBRATION".

It is simpler, however, if the standard start types (Index 0x8041:01) are set to "SET_CALIBRATION_AUTO". The "Calibrated" bit will now be set automatically by the first rising edge on "Enable". The command is conceived only for this purpose; therefore, it does not make sense to use it via the synchronous data exchange.

MODULO:

The modulo position of the axis is a piece of additional information about the absolute axis position. Modulo positioning represents the required target position in a different way. Contrary to the standard types of positioning, it must be noted in the case of modulo positioning that the desired target position can be interpreted differently.

The modulo positioning refers in principle to the "Modulo factor" (Index 0x8040:0E), which can be set in the CoE. In the following examples, a rotary axis with a "Modulo factor" equivalent to 360 degrees is assumed.

The "Modulo tolerance window" (Index 0x8040:0F) defines a position window around the current modulo target position of the axis. The window width is twice the specified value (set position ± tolerance value). A detailed description of the tolerance window is provided below.

The positioning of an axis is always referenced to its current actual position. The actual position of an axis is normally the target position of the last travel command. Under certain circumstances (incorrect positioning due to the axis stalling, or a very coarse resolution of the connected encoder), however, a position not expected by the user may arise. If this possibility is not considered, subsequent positioning may lead to unexpected behavior.

Basic principles: "Positioning Interface" 12:
Effect of the modulo tolerance window - modulo target position 0° in positive direction

Example:

An axis is positioned to 0°, with the result that subsequently the actual position of the axis is exactly 0°. A further modulo travel command to 360° in positive direction results in a full turn, with the subsequent modulo position of the axis of once again being exactly 0°.
If the axis comes to a stop somewhat in front of or behind the target position for mechanical reasons, the next travel command does not behave as one would expect.

In order to solve the problem, a "Modulo tolerance window" (Index 0x8040:0F) can be parameterized. This ensures that small deviations from the position that are within the window do not lead to different axis behavior. If, for example, a window of 1° is parameterized, in the case described above the axis will behave identically, as long the actual position is between 359° and 1°.

For values that are within the window range, the modulo tolerance window can therefore lead to movements against the specified direction. For small windows this is usually not a problem, because system deviations between set and actual position are compensated in both directions. This means that the tolerance window may also be used for axes that may only be moved in one direction due to their construction.

Modulo positioning by less than one turn

Modulo positioning from a starting position to a non-identical target position is unambiguous and requires no special consideration.

For a movement from 270° to 0°, a modulo target position of 0° (not 360°) should therefore be specified, because 360° is outside the basic range and would lead to an additional turn.

The modulo positioning distinguishes between three direction specifications: positive direction, negative direction and along the shortest path (MODULO_PLUS, MODULO_MINUS, MODULO_SHORT).
For positioning along the shortest path, target positions of more than 360° are not sensible, because the movement towards the target is always direct. In contrast to positive or negative direction, it is therefore not possible to carry out several turns before the axis moves to the target.

Note

Only basic periods of less than 360° are permitted

For modulo positioning with start type "MODULO_SHORT", only modulo target positions within the basic period (e.g. less than 360°) are permitted, otherwise an error is returned.

Basic principles: "Positioning Interface" 13:

Positioning without the modulo tolerance window

The "Modulo tolerance window" (Index 0 Index 0x8040:0F) is always taken into account in the "normal" types of modulo positioning. However, this is less desirable in some situations. In order to eliminate this "disadvantage", the comparable start types "MODULO_SHORT_EXT", "MODULO_PLUS_EXT", "MODULO_MINUS_EXT" and "MODULO_CURRENT_EXT" can be used, which ignore the modulo tolerance window.

The following tables show some positioning examples.

Examples of modulo positioning with less than one revolution

Modulo start type

Absolute start position

Modulo target position

Relative travel path

Absolute end position

Modulo end position

MODULO_PLUS

90°

270°

360°

MODULO_PLUS

90°

360°

630°

720°

MODULO_PLUS

90°

720°

990°

1080°

MODULO_MINUS

90°

-90°

MODULO_MINUS

90°

360°

-450°

-360°

MODULO_MINUS

90°

720°

-810°

-720°

MODULO_SHORT

90°

-90°

Modulo positioning with full turns

In principle, modulo positioning by one or full turns are no different than positioning to an angle that differs from the starting position. No motion occurs if target position and starting position are identical. For a full turn, 360° has to be added to the starting position. The behavior described in the example shows that special attention must be paid to positionings with whole revolutions. The following table shows positioning examples for a starting position of approximately 90°. The modulo tolerance window (TF) is set to 1° here. Special cases for which the starting position is outside this window are identified.

Examples of modulo positioning with whole revolutions

Modulo start type

Absolute start position

Modulo target position

Relative travel path

Absolute end position

Modulo end position

Note

MODULO_PLUS

90.00°

90.00°

0.00°

90.00°

90.00°

 

MODULO_PLUS

90.90°

90.00°

-0.90°

90.00°

90.00°

 

MODULO_PLUS

91.10°

90.00°

358.90°

450.00°

90.00°

outside TF

MODULO_PLUS

89.10°

90.00°

0.90°

90.00°

90.00°

 

MODULO_PLUS

88.90°

90.00°

1.10°

90.00°

90.00°

outside TF

MODULO_PLUS

90.00°

450.00

360.00°

450.00°

90.00°

 

MODULO_PLUS

90.90°

450.00°

359.10°

450.00°

90.00°

 

MODULO_PLUS

91.10°

450.00°

718.90°

810.00°

90.00°

outside TF

MODULO_PLUS

89.10°

450.00°

360.90°

450.00°

90.00°

 

MODULO_PLUS

88.90°

450.00°

361.10°

450.00°

90.00°

outside TF

MODULO_PLUS

90.00°

810.00

720.00°

810.00°

90.00°

 

MODULO_PLUS

90.90°

810.00

719.10°

810.00°

90.00°

 

MODULO_PLUS

91.10°

810.00

1078.90°

1170.00°

90.00°

outside TF

MODULO_PLUS

89.10°

810.00

720.90°

810.00°

90.00°

 

MODULO_PLUS

88.90°

810.00

721.10°

810.00°

90.00°

outside TF

MODULO_MINUS

90.00°

90.00°

0.00°

90.00°

90.00°

 

MODULO_MINUS

90.90°

90.00°

-0.90°

90.00°

90.00°

 

MODULO_MINUS

91.10°

90.00°

-1.10°

90.00°

90.00°

outside TF

MODULO_MINUS

89.10°

90.00°

0.90°

90.00°

90.00°

 

MODULO_MINUS

88.90°

90.00°

-358.90°

-270.00°

90.00°

outside TF

MODULO_MINUS

90.00°

450.00°

-360.00°

-270.00°

90.00°

 

MODULO_MINUS

90.90°

450.00°

-360.90°

-270.00°

90.00°

 

MODULO_MINUS

91.10°

450.00°

-361.10°

-270.00°

90.00°

outside TF

MODULO_MINUS

89.10°

450.00°

-359.10°

-270.00°

90.00°

 

MODULO_MINUS

88.90°

450.00°

-718.90°

-630.00°

90.00°

outside TF

MODULO_MINUS

90.00°

810.00°

-720.00°

-630.00°

90.00°

 

MODULO_MINUS

90.90°

810.00°

-720.90°

-630.00°

90.00°

 

MODULO_MINUS

91.10°

810.00°

-721.10°

-630.00°

90.00°

outside TF

MODULO_MINUS

89.10°

810.00°

-719.10°

-630.00°

90.00°

 

MODULO_MINUS

88.90°

810.00°

-1078.90°

-990.00°

90.00°

outside TF

Examples of two travel commands with a dynamic change of the target position

Without overrun of the target position

Time

POS Outputs

POS Inputs

Description

t1:

Execute = 1
Target position = 200000
Velocity = 2000
Start type = 0x0001
Acceleration = 1000
Deceleration = 1000

Busy = 1
Accelerate = 1

- Specification of the first parameter
- Start of the acceleration phase

t2:

 

Accelerate = 0

- End of the acceleration phase

t3:

Target position = 100000
Velocity = 1500
Start type = 0x1001
Acceleration = 2000
Deceleration = 2000

 

- Change of the parameters
- Activation by new start types

t4:

 

Decelerate = 1

- Start of the deceleration phase

t5:

Execute = 0

Busy = 0
In-Target = 1
Decelerate = 0

- End of the deceleration phase
- Motor is at the new target position

t6 - t9:

 

 

- Absolute travel back to the start position 0

Basic principles: "Positioning Interface" 14:
Scope recording of a travel command with a dynamic change of the target position, without overrunning the target position
(The axis scaling refers only to the positions, not to the speed or the status bits)

With overrun of the target position

Time

POS Outputs

POS Inputs

Description

t1:

Execute = 1
Target position = 200000
Velocity = 5000
Start type = 0x0001
Acceleration = 3000
Deceleration = 5000

Busy = 1
Accelerate = 1

- Specification of the 1st parameter
- Start of the 1st acceleration phase

t2:

 

Accelerate = 0

- End of the 1st acceleration phase

t3:

Target position = 100000
Velocity = 1500
Start type = 0x1001
Acceleration = 1000
Deceleration = 2000

Warning = 1
Decelerate = 1

- Change of the parameters
- Activation by new start types
- Warning of overrunning the target position
- Start of the 1st deceleration phase

t4:

 

Accelerate = 1
Decelerate = 0

- End of the 1st deceleration phase
- Start of the 2nd acceleration phase in the opposite direction

t5:

 

Accelerate = 0
Decelerate = 1

- End of the 2nd acceleration phase
- Start of the 2nd deceleration phase

t6:

Execute = 0

Busy = 0
In-Target = 1
Decelerate = 0

- End of the 2nd deceleration phase
- Motor is at the new target position

 t7 - t10:

 

 

- Absolute travel back to the start position 0

Basic principles: "Positioning Interface" 15:
Scope recording of a travel command with a dynamic change of the target position, with overrunning of the final target position
(The axis scaling refers only to the positions, not to the speed or the status bits)