Position conversion between application units and increments

Question:
How can position values be converted between application units and incremental values?

Answer:
For the 9400 Servo Drive HighLine, two different position conversion methods are available in the Engineer:

Fast conversion of process values:
With this conversion method, the values enter the conversion function blocks in application units as process signals. The position value in application units is scaled in the so-called E4 format (integer format where the last four digits are considered as decimal positions, corresponds to the FIX32 format for the 9300). The conversion routine is part of the calling task and therefore newly processed in every task call:
  • Function block L_SdUnitToPos: This function block receives the position value in application units as input signal (process signal) and converts its into an incremental position value. To carry out the conversion, the measuring system required for the conversion must be selected at the input AxisData.
  • Function block L_SdPosToUnit: This function block converts incremental values into positions in application units and outputs the value in the E4 format as a process signal. The output value can continue to be used in the function block interconnection. To carry out the conversion, the measuring system required for the conversion must be selected at the input AxisData.

These function blocks are e. g. used whenever the position values are selected or returned in application units via process data signals of a data bus system or must be internally processed in application units in the function block interconnection.

Slow conversion of code values:
If the position values are to be selected in application units via codes or are to be read from codes, the conversion routines need not be processed in every task call. In this case, the conversion only takes place when the assigned write/read code is accessed as part of the scaling routine. The following function blocks are available for this:
  • Function block L_SdSetPosition: The FB converts a position in application units into an incremental DINT value. The position is selected via a write/read code in the FB itself. The application position is only converted if values are changed as part of the scaling routine for this code. Via a function block output, the incremental position value is available in the further signal flow of the FB interconnection. To carry out the conversion, the measuring system required for the conversion must be selected at the input AxisData.
  • Function block L_SdGetPosition: An incremental position value is read in via the position input of the FB. The value is only converted when the FB-internal read code is read as part of the scaling routine. To carry out the conversion, the measuring system required for the conversion must be selected at the input AxisData.

URL for linking this AKB article: https://www.lenze.com/en-de/go/akb/200802001/1/
Contact form