Parameterising the DRIVE command (A10)

1.1 IntroductionPAGEREF _Toc307301018 \h3

1.2 Description 3

1.2.1 Programming 3

1.2.2 Bitwise writing 3

1.2.2.1 Specifics for SERCOS-drives 4

1.2.3 Limitation of the output value 4

1.3 Example 1 5

1.4 Example 2 7

1.5 Parameters 8

1.5.1 Overview 8

1.5.2 Description 8

1.6 Constants 13

More:

button Introduction

button Description

button Example 1

button Example 2

button Parameters

button Constants


Introduction

Motivation

Depending on the drive type used, drive functionality is generally addressed in different ways.

In the case of SERCOS drives, changeover of a driver's parameter set is realised via the parameters S-0-216 and S-0-217, for example. In the case of Profidrive drives, the parameter set is changed over by control bits in STW1 in the cyclically transferred setpoint telegram.

Setting the torque limit is a further example:

In the case of SERCOS drives, on the one hand the torque limit can be set by writing the parameter S-0-0092 through the service channel or, on the other hand, S-0-0092 can also be parameterised in the cyclic telegram.

In the case of PROFIDRIVE drives, the torque limit is modified via the manufacturer's specific telegram element MomRed (signal number 50101 in the case of SIEMENS 611u) and the percentage by which the torque limit is to be reduced is specified i the telegram element (MomRed = 30 -> reduction by 30 % to 70 %).

The NC command #DRIVE was implemented to provide the user with a possibility, independent of the drive type, of controlling drive functionality.

By means of this command, users can address identical functionality of differing drive types in the NC program in a manner that is independent of the drive type.

The CNC kernel is configured accordingly to adjust to the relevant drive type.

This functionality is currently supported for the SERCOS and Profidrive drive types only.


Description

More:

button Programming

button Bitwise writing

button Limitation of the output value


Programming

Programming

In the NC program, the drive functions are controlled by the NC command #DRIVE WR SYN. The KEY call parameter is used to select the drive function.

Example

#DRIVE WR SYN [AX=X KEY=MOMRED, VAL=437]

In the NC line above, the "MOMRED" drive function is invoked with the value 437 for the X axis.

For the parameter VAL it can be set up if this value shall be passed to othe drive unchanged, if a parameterisized conversion of the value shall be used or if the programmed value shall trigger the transmission of a bitmask to the drive.

By parameterisation of the CNC kernel, it is now necessary to ensure, depending on the drive type used, that this NC line is mapped to appropriate parameterisation of the drive controller.

At present, a conversion of the call parameter VAL can only be done for torque/current values.


Bitwise writing

Bitwise writing

With bitwise writing of drive values with the #DRIVE command some bits of a value transferred to the drive can be set or reset.

To achieve this the data type set up in parameter P-AXIS-00399 has to be set to either  BITARRAY-16  or  BITARAY_32  .

If the value of the #DRIVES  VAL  parameter is bigger than zero the bits defined in parameter P-AXIS-00429 are set in the value rtransfered to the drive, if the  VAL  parameter is zero the bits defined in P-AXIS-00429 are reset.

Bitwise writing of drive values is only possible for bits that are not already used from the CNC.

If P-AXIS-00429 contains bits that are used by the CNC error message P-ERR-70404 is output.

If the complete telegram element is used by the CNC, for example a command position, error message P-ERR-70405 is output.

Bitwise writing of drive values is at present only supproted for communication type  CYCLIC  (see P-AXIS-00397). For all other cummunication types error message P-ERR-70402 is output if P-AXIS-00399 is set to  BITARRAY-16  or  BITARAY_32  .

More:

button Specifics for SERCOS-drives


Specifics for SERCOS-drives

For SERCOS-drives the controlword is confiured automatically and does not appear in the list of configured process data.

When the realime control bits shall be used for bitwise writing the according wr_ident[] (P-AXIS-00398) has to be set to  S-0-0134  , see example 2.


Limitation of the output value

Limitation

The value output to the drive can be limited to maximum and minimum values. When the value programmed in the #DRIVE command is outside the configured limits the output value is automatically limited, an error message is not output.

The scaling of the limit values is according the the scaling type set up in parameter P-AXIS-00401 (antr.function[].scaling_type).

When setting up the limits out the output value it has to be ensured that these are within the value range defined by the data type set up in parameter P-AXIS-00399 (antr.function[].data_type), otherwise an error message is output (P-ERR-70383, P-ERR-70384) and the limits are corrected automatically.

If no limits are set up no limitation is applied to the output values.

The configured maximum value has to be bigger than the minimum value, otherwise Warning P-ERR-70385 is output and the limits are swapped.

Parameter definition

The parameterisation defines how the functionality requested by the #DRIVE command in the NC program is triggered in the drive. The following parameters must be assigned for this purpose:

P-AXIS-00396 | ID of the drive function. This is the value of the call parameter KEY of the #DRIVE command, which must be used to activate the drive function.
P-AXIS-00397 | Nature of communication between the CNC kernel and the drive controller
P-AXIS-00398 | Name of the parameter in the drive or of the element in the cyclic setpoint telegram
P-AXIS-00399 | Data type of the data item to be transferred to the drive
P-AXIS-00400 | Value of the drive data item after controller start-up if the data item is transferred in the cyclic setpoint telegram
P-AXIS-00401 | Scaling. At the moment only unscaled output and torque scaling is supported.


Example 1

Example

The maximum torque of a drive is to be reduced in the NC program regardless of the drive type. The limit value shall be passed in Nm related to the motor shaft.

The maximum permissible torque value is 6.5 Nm the minimum permissible values is 1.0 Nm.

For example the command

#DRIVE WR SYN [AX=X KEY=TORQLIMIT VAL=4.5]

is to be used to set the torque limit to 4.5 Nm.

Torque scaling

To set up the torque scaling the following motor data is neccessary:

Nominal torque of the motor: 7 Nm

Maximum torque of the motor: 15 Nm

Torque scaling of the motor in 0.1 % related to the maximum motor torque (This is a setup data of thedrive).

P-AXIS-00392 has to be set to the nominal torque of the motor.

antr.acc_reference_value 7.0

In parameters P-AXIS-00325 and P-AXIS-00326 that value that has to be output to the drive in order to achive the nominal torque of the motor has to be entered.

With the given values:

So the values for parameters P-AXIS-00325 and P-AXIS-00326 are:

antr.torque_scale_num 4667

antr.torque_scale_denom 10

Finally parameter P-AXIS-00401 has to be set up for torque scaling:

antr.function[0].scaling_type TORQUE_DRIVE_SIDE

Limitation

The limit values have to be set up in P-AXIS-00408 and P-AXIS-00409.

Because the the scaling type is set to torque scaling, the limit values have also the be set in Nm.

antr.function[0].min_limit 1.0

antr.function[0].max_limit 6.5

Parameterization of transmission

Variant 1:

SERCOS drive; the torque limit is set by writing the SERCOS parameter S-0-92 through the service channel.

The following axis parameters must be set in the axis parameter list:

antr.function[0].id TORQLIMIT

antr.function[0].commu ACYCLIC

antr.function[0].wr_ident[0] S-0-92

antr.function[0].data_type SGN16

Variant 2:

SERCOS drive; the torque limit is transferred in the cyclically transferred setpoint diagram.

The following axis parameters must be set in the axis parameter list:

antr.function[0].id TORQLIMIT

antr.function[0].commu CYCLIC

antr.function[0].wr_ident[0] S-0-92

antr.function[0].data_type SGN16

antr.function[0].startup_value 1000

A telegram element with the name "S-0-92" and the data type SGN16 must be configured in the cyclic telegram.

Variant 3:

Profidrive drive; the torque limit is transferred in the cyclic setpoint telegram in the "MOMRED" telegram element as a signed 16-bit value.

The following axis parameters must be set in the axis parameter list:

antr.function[0].id TORQLIMIT

antr.function[0].commu CYCLIC

antr.function[0].wr_ident[0] MOMRED

antr.function[0].data_type SGN16

antr.function[0].startup_value 1000

A telegram element with the name "MOMRED" and the data type SGN16 must be configured in the cyclic telegram.


Example 2

Beispiel

In a drive speed monitoring shall be disabled by controlling a bit in the drives control word.

As example the command

#DRIVE WR SYN [AX=X KEY=SPEED_MON VAL=0]

shall disable speed monitoring, the command

#DRIVE WR SYN [AX=X KEY=SPEED_MON VAL=1] shall enable speed monitoring.

Parameterization of transmission

1. Alternative:

PROFIDRIVE, speed monitoring is controlled by bit 8 in the drives control word 2 (STW2).

The following parameters have to be set up in the axis parameter list:

antr.function[0].id SPEED_MON

antr.function[0].commu CYCLIC

antr.function[0].wr_ident[0] STW2

antr.function[0].startup_value 1

antr.function[0].data_type BITARRAY_16

antr.function[0].mask BIT_8

#alternativ:

#antr.function[0].mask 0x100

#

2. Alternative:

SERCOS drive, speed monitoring is controlled by real time control bit 1.

The following parameters have to be set up in the axis parameter list:

antr.function[0].id SPEED_MON

antr.function[0].commu CYCLIC

antr.function[0].wr_ident[0] S-0-0134

antr.function[0].startup_value 1

antr.function[0].data_type BITARRAY_16

antr.function[0].mask 0x40


Parameters

More:

button Overview

button Description


Overview

ID | Parameter | Description
P-AXIS-00396 | id | Name of the drive function in the NC program
P-AXIS-00397 | commu | Nature of communication with the drive amplifier
P-AXIS-00398 | wr_ident[0]/wr_ident[1] | Name of the parameter or telegram element
P-AXIS-00399 | data_type | Data type of the data item to be transferred
P-AXIS-00400 | startup_value | Value of a cyclically transferred data element after controller start-up
P-AXIS-00401 | scaling_type | Definition of the scaling that has to be applied to the value VAL for scaling to the drive format.
P-AXIS-00325 | torque_scale_num | Numerator scaling factor torque scaling.
P-AXIS-00326 | torque_scale_denom | Denominator scaling factor torque scaling.
P-AXIS-00392 | acc_reference_value | Reference value for scaling of torque values in the drive format.
P-AXIS-00408 | min_limit | Minimal admissible output value.
P-AXIS-00409 | max_limit | Maximal admissible output value.
P-AXIS-00429 | mask | Bitmask for bitwise writing of output values.


Description

P-AXIS-00396 | Name of the drive function in the NC program
Parameter | antr.function[i].id
Description | Name by which the parameterised drive function is addressed in the NC program with the #DRIVE command ([PROG]).
Data type | String
Data range | Maximum of 29 characters
Dimension | Translatory: - | Rotatory: -
Default |
Remarks | Currently for SERCOS and Profidrive drives only

P-AXIS-00397

Nature of communication with the drive amplifier

Parameter

antr.function[i].commu

Description

Parameter defines the method of communication by which the functionality is addressed in the drive.

The following values are permitted for the parameter:

CYCLIC | The drive function is switched by a telegram element that is configured in the cyclic drive telegram. The telegram element's name must be parameterised in the P-AXIS-00398 parameter.
ACYCLIC | The drive function is addressed by writing a drive parameter through the parameter channel. The telegram element's name must be parameterised in the P-AXIS-00398 parameter.
IGNORE | No value is transferred to the drive.

Data type

String

Data range

["CYCLIC" | "ACYCLIC" | "IGNORE"]

Dimension

Translatory: -

Rotatory: -

Default

Remarks

Currently for SERCOS and Profidrive drives only

P-AXIS-00398 | Name of the parameter or telegram element
Parameter | antr.function[i].wr_ident[0]/[1]
Description | This parameter defines which drive parameter or which telegram element of the cyclic telegram is to be used to switch the drive function.
Data type | String
Data range |
Dimension | Translatory: - | Rotatory: -
Default |
Remarks | Currently for SERCOS and Profidrive drives only

P-AXIS-00399

Data type of the data item to be transferred

Parameter

antr.function[i].data_type

Description

This parameter defines the data type of the drive parameter or of the telegram element belonging to the cyclic telegram that is to be used to switch the drive function.

The parameter can assume the following values:

Type Id | Data type | Minimum value | Maximum value
SGN16 | Signed 16-bit integer | MIN_SGN16 | MAX_SGN16
SGN32 | Signed 32-bit integer | MIN_SGN32 | MAX_SGN32
BITARRAY_16 | Bitarray with 16 bit | 0 | MAX_UNS16
BITARRAY_32 | Bitarray with 16 bit | 0 | MAX_UNS32

Data type

String

Data range

["SGN16" | "SGN32" |  BITARRAY_16  |  BITARRAY_32  ]

Dimension

Translatory: -

Rotatory: -

Default

Remarks

Currently for SERCOS and Profidrive drives only.

At present the data types  BITARRAY_16  and  BITARRAY_32  are supproted only for communication type  CYCLIC  (P-AXIS-00397). for all other communication types error message P-ERR-70402 is output.

P-AXIS-00400 | Value of a cyclically transferred data element after controller start-up
Parameter | antr.function[i].startup_value
Description | This parameter defines the value of the telegram element belonging to the cyclic telegram when P-AXIS-00397 has the value "CYCLIC".
Data type | SGN32
Data range | [MIN_SGN16 MAX_SGN16] when P-AXIS-00399 = "SGN16", [MIN_SGN32 MAX_SGN32] when P-AXIS-00399 = "SGN32"
Dimension | Translatory: - | Rotatory: -
Default |
Remarks | Currently for SERCOS and Profidrive drives only

P-AXIS-00401

Scaling that has to be applied to the transfered value

Parameter

antr.function[i].scaling_type

Description

This parameter defines the scaling of the value that has to be transfered to the drive.

The following scaling types are possible:

Label | Scaling
UNSCALED | Unscaled output of the value programmed in the NC-Program. (Scaling factor = 1).
TORQUE_DRIVE_SIDE | The progammed value is a torque value related to the motor shaft and is scaled to the drives torque format with the parameters P-AXIS-00325, P-AXIS-00326 and P-AXIS-00392. The scaling factor does not change when the gearbox changes. Scaling factor f is:

Data type

STRING

Data range

[  UNSCALED  |  TORQUE_DRIVE_SIDE  ]

Dimension

translatory: -

rotatory: -

Default

UNSCALED

Remarks

At the moment only implemented for drive type SERCOS and PROFIDRIVE.

P-AXIS-00325 | Numerator scaling factor torque scaling
Parameter | antr. torque_scale_num
Description | Numerator of scaling factor for torque output to the drive. The factor is defined as quotient. This quotient is the value that has to be output to the drive in order to get the nominal torque of the motor.
Data type | UNS32
Data range | 0 < v_reso_nom < MAX(UNS32)
Dimension | translatory: Increments | rotatoriy Increments
Default | 1
Remarks |

P-AXIS-00326 | Denominator scaling factor torque scaling
Parameter | antr.torque_scale_denom
Description | Denominator of scaling factor for torque output to the drive. The factor is defined as quotient. This quotient is the value that has to be output to the drive in order to get the nominal torque of the motor.
Data type | UNS32
Data range | 0 < torque_scale_denom MAX < (UNS32)
Dimension | translatorisch: - | rotatorisch: -
Default | 1
Remarks |

P-AXIS-00392 | Reference value for scaling of torque values in the drive format
Parameter | antr.acc_reference_value
Description | This parameter is used to set up the scaling factor for conversion in the drive side torque format. The nominal torque of the motor has to be entered.
Data type | REAL64
Data range | 0 .. MAX_REAL64
Dimension | Nm (N for Linearmotor)
Default | 1
Remarks |

P-AXIS-00408

Minimum admissible output value

Parameter

antr.function[].min_limit

Description

With this prameter the minimal admissible put value can be defined.

If the value programmed in the #DRIVE command underruns the set up minimum value the output value is automatically set to the minimum value, no error message is output.

If P-AXIS-00408 is less than the the minimum representable minimum value of the data type set up with P-AXIS-00399 error P-ERR-70384 is output and the value is corrected.

If P-AXIS-00409 is configured it has to be bigger than P-AXIS-00408 otherwise warning P-ERR-70385 is output and the values are swapped.

If this parameter is not configured, no minimum limitation takes place.

Data type

REAL64

Data range

Dependent on P-AXIS-00399 and P-AXIS-00401

Dimension

Default

Remarks

P-AXIS-00409

Maximum addmissible output value

Parameter

antr.function[].max_limit

Description

With this prameter the miximum admissible put value can be defined.

If the value programmed in the #DRIVE command exceeds the set up maximum value the output value is automatically set to the maximum value, no error message is output.

If P-AXIS-00408 is bigger than the the maximum representable maxiimum value of the data type set up with P-AXIS-00399 error P-ERR-70384 is output and the value is corrected.

If P-AXIS-00408 is configured it has to be less than P-AXIS-00409 otherwise warning P-ERR-70385 is output and the values are swapped.

If this parameter is not configured, no minimum limitation takes place.

Data type

REAL64

Data range

Dependend on P-AXIS-00399 and P-AXIS-00401

Dimension

Default

Remarks

P-AXIS-00429

Bitmask

Parameter

antr.function[].mask

Beschreibung

With this parameter the bitmask that has to be used for bitwise writing is defined.

If the value programmed in the #DRIVE-command is bigger than zero the bits defined in the bitmask are set, for a programmed value of zero the bits are reset.

This parameter is used only it the data type set up in P-AXIS-00399 has either the value  BITARRAY_16  or  BITARRAY_32  .

The value of this parameter must be smaller than or equal to the maximul value defined by setting P-AXIS-00399, other wise error message P-ERR-70403 is output.

Datentyp

UNS32

Datenbereich

Dependent on P-AXIS-00399:

Typ ID | Datantype | Minimal value | Maximal value
BITARRAY_16 | Bitmaske 16 Bit | 0 | MAX_UNS16
BITARRAY_32 | Bitmaske 32 Bit | 0 | MAX_UNS32

Dimension

Standardwert

0

Anmerkungen

At the moment only implemented for drive type SERCOS- and Profidrive.


Constants

Constant | Value
MIN_SGN16 | -32768
MAX_SGN16 | 32767
MIN_SGN32 | -2147483648
MAX_SGN32 | 2147483647
MAX_UNS16 | 65535
MAX_UNS32 | 4294967295