Motion extension
This library extends the existing motion methods within the control. It is supplied as standard with the ProMaster engineering framework.
- TB_DriveEncoder
- TB_DriveEncoder
- TB_DriveState
- TB_DriveState
- TB_EncoderActPos
- TB_EncoderActPos
- TB_GetPosAbsEnc
- TB_GetPosAbsEnc
- TB_MasterEncoder
- TB_MasterEncoder
- TB_MasterEngine
- TB_MasterEngine
- TB_MechActPos
- TB_MechActPos
- TB_PhysicalEncoder
- TB_PhysicalEncoder
- TB_ReadActualTorque
- TB_ReadActualTorque
- TB_ReadAxisStatus
- TB_ReadAxisStatus
- TB_ReadWriteBM5Parameter
- TB_ReadWriteBM5Parameter
- TB_Result
- TB_Result
- TB_VirtualDriveEncoder
- TB_VirtualDriveEncoder
TB_DriveEncoder
Links a technology function to a Motion Control axis. For this purpose, the setpoint value specified from the technology function is transformed with the specified ratio and transmitted to the axis as a position setpoint value.
Attention:
The TB_DriveEncoder function module can only be used in conjunction with Motion Control. Can only be used in a synchronized setpoint event task.
When x_Enable = TRUE, the module is activated. Successful activation is signaled with TRUE at the x_Active output. From this point, the planned velocity (in 1/100th user units/Ts) is converted with the gear ratio ud_Units/u_Revolution and output to the connected axis.
Example for determining the ratio: Spindle with slope 12.5mm/R on a gear with i = 4. 1/1,000th mm is the desired user unit. The ratio is yielded as 12.5 mm/R * 1,000 Units/mm = 12,500 Units/R. Thus ud_Units = 12,500 and u_Revolution = 4.
Empfohlene Task: EVENT
Verwendete Bibliotheken: ARITHMETIC_30bd00 or greater MOTION_CONTROL_xxbd00 or greaterMOTION_MULTI_AXIS_xxbd00 or greaterTECH_TYPES_30bd06 or greater TECH_TOOLS_30bd00 or greater MOTION_TYPES_xxbd07 or greater
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: | |
|---|---|---|---|---|---|
| x_Enable | BOOL | ... | ... | TRUE: Enabling of the module. | |
| di_Vel | DINT | ... | ... | Setpoint velocity in 1/100th user units/Ts. Ts is the configured cycle time of the setpoint event task. | |
| ud_Units | UDINT | ... | ... | Number of user units for the specified motor revolutions (u_Revolution). | |
| u_Revolution | UINT | ... | ... | Number of motor revolutions for the specified user units (ud_Units). | |
| _Axis | AXIS_REF | ... | ... | The Motion Control axis is connected to _Axis. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module is active, and the specified setpoint velocity is converted and output to di_Vel. |
| x_Error | BOOL | TRUE: Movement execution is started. The axis is coupled to the master value. |
| w_Error | WORD | Error number of the detected error. See Motion Control ErrorId error list. |
| _Axis | AXIS_REF | Motion Control axis. |
Ein-/Ausgänge
| none |

TB_DriveEncoder
Links a technology function to a Motion Control axis. For this purpose, the setpoint value specified from the technology function is transformed with the specified ratio and transmitted to the axis as a position setpoint value.
Attention:
The TB_DriveEncoder function module can only be used in conjunction with Motion Control. Can only be used in a synchronized setpoint event task.
When x_Enable = TRUE, the module is activated. Successful activation is signaled with TRUE at the x_Active output. From this point, the planned velocity (in 1/100th user units/Ts) is converted with the gear ratio ud_Units/u_Revolution and output to the connected axis.
Example for determining the ratio: Spindle with slope 12.5mm/R on a gear with i = 4. 1/1,000th mm is the desired user unit. The ratio is yielded as 12.5 mm/R * 1,000 Units/mm = 12,500 Units/R. Thus ud_Units = 12,500 and u_Revolution = 4.
Empfohlene Task: EVENT
Verwendete Bibliotheken: ARITHMETIC_30bd00 or greater MOTION_CONTROL_xxbd00 or greaterMOTION_MULTI_AXIS_xxbd00 or greaterTECH_TYPES_30bd06 or greater TECH_TOOLS_30bd00 or greater MOTION_TYPES_xxbd07 or greater
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: | |
|---|---|---|---|---|---|
| x_Enable | BOOL | ... | ... | TRUE: Enabling of the module. | |
| di_Vel | DINT | ... | ... | Setpoint velocity in 1/100th user units/Ts. Ts is the configured cycle time of the setpoint event task. | |
| ud_Units | UDINT | ... | ... | Number of user units for the specified motor revolutions (u_Revolution). | |
| u_Revolution | UINT | ... | ... | Number of motor revolutions for the specified user units (ud_Units). | |
| _Axis | AXIS_REF | ... | ... | The Motion Control axis is connected to _Axis. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module is active, and the specified setpoint velocity is converted and output to di_Vel. |
| x_Error | BOOL | TRUE: Movement execution is started. The axis is coupled to the master value. |
| w_Error | WORD | Error number of the detected error. See Motion Control ErrorId error list. |
| _Axis | AXIS_REF | Motion Control axis. |
Ein-/Ausgänge
| none |

TB_DriveState
The TB_DriveState function module makes available all required information on the status of the drive.
This function module reads the drive status, i.e. all relevant information, such as hardware inputs, status word, errors and warnings. Using this information, it is possible to check whether the drive is ready to be switched on before switching on with MC_PowerOn, for example. In addition, constant checking of whether errors or warnings arise can be carried out.
Empfohlene Task: CYCLIC
Verwendete Bibliotheken: MOTION_CONTROL_30bd00 or greater
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: | |
|---|---|---|---|---|---|
| x_Enable | BOOL | ... | ... | TRUE: Enabling of the module. | |
| _Axis | AXIS_REF | ... | ... | The Motion Control axis is connected to _Axis. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_DriveRdy | BOOL | TRUE: Communication to the drive is ready. Here it is checked whether both the demand data communication and the cyclical communication (incl. UserMapping) are ready. Both local and field bus axes are checked. |
| x_DriveComRdy | BOOL | TRUE: Drive is ready for switch-on. This output is a link from all relevant states. x_DriveRdy:= x_Enable AND x_DriveComRsy AND NOT x_Error AND x_LinkVolt AND x_HW_PulsEnable AND x_HW_QuickStop AND NOT x_HW_SafetyRelais; |
| w_Statusword | WORD | Status word of the drive (P301). |
| i_Status | INT | Drive status corresponding to the status machine of the drive and displayed at the drive display. States 0 to 5 and 15/F are indicated; states 6 to 7 and 14/E are not indicated. 0: Not ready for switch-on 1: Switch-on block 2: Ready for switch-on 3: Switched on 4: Operation enabled 15/F: Fault |
| x_Error | BOOL | TRUE: Movement execution is started. The axis is coupled to the master value. |
| x_Warning | BOOL | TRUE: Drive warning |
| x_LinkVolt | BOOL | TRUE: System voltage/Intermediate circuit voltage is applied |
| x_HW_PulsEnable | BOOL | TRUE: Pulse enable input at drive is closed |
| x_HW_Quickstop | BOOL | TRUE: Quick stop input at drive is closed. |
| x_HW_SafetyRelais | BOOL | TRUE: Undervoltage in safety relay. |
| x_ComError | BOOL | TRUE: Demand data communication error of the internally used BM_ReadPar function module. Using the demand data communication, the states of the drive not supplied via the AXIS_REF structure are read. |
| _Axis | AXIS_REF | Motion Control axis. |
Ein-/Ausgänge
| none |

TB_DriveState
The TB_DriveState function module makes available all required information on the status of the drive.
This function module reads the drive status, i.e. all relevant information, such as hardware inputs, status word, errors and warnings. Using this information, it is possible to check whether the drive is ready to be switched on before switching on with MC_PowerOn, for example. In addition, constant checking of whether errors or warnings arise can be carried out.
Empfohlene Task: CYCLIC
Verwendete Bibliotheken: MOTION_CONTROL_30bd00 or greater
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: | |
|---|---|---|---|---|---|
| x_Enable | BOOL | ... | ... | TRUE: Enabling of the module. | |
| _Axis | AXIS_REF | ... | ... | The Motion Control axis is connected to _Axis. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_DriveRdy | BOOL | TRUE: Communication to the drive is ready. Here it is checked whether both the demand data communication and the cyclical communication (incl. UserMapping) are ready. Both local and field bus axes are checked. |
| x_DriveComRdy | BOOL | TRUE: Drive is ready for switch-on. This output is a link from all relevant states. x_DriveRdy:= x_Enable AND x_DriveComRsy AND NOT x_Error AND x_LinkVolt AND x_HW_PulsEnable AND x_HW_QuickStop AND NOT x_HW_SafetyRelais; |
| w_Statusword | WORD | Status word of the drive (P301). |
| i_Status | INT | Drive status corresponding to the status machine of the drive and displayed at the drive display. States 0 to 5 and 15/F are indicated; states 6 to 7 and 14/E are not indicated. 0: Not ready for switch-on 1: Switch-on block 2: Ready for switch-on 3: Switched on 4: Operation enabled 15/F: Fault |
| x_Error | BOOL | TRUE: Movement execution is started. The axis is coupled to the master value. |
| x_Warning | BOOL | TRUE: Drive warning |
| x_LinkVolt | BOOL | TRUE: System voltage/Intermediate circuit voltage is applied |
| x_HW_PulsEnable | BOOL | TRUE: Pulse enable input at drive is closed |
| x_HW_Quickstop | BOOL | TRUE: Quick stop input at drive is closed. |
| x_HW_SafetyRelais | BOOL | TRUE: Undervoltage in safety relay. |
| x_ComError | BOOL | TRUE: Demand data communication error of the internally used BM_ReadPar function module. Using the demand data communication, the states of the drive not supplied via the AXIS_REF structure are read. |
| _Axis | AXIS_REF | Motion Control axis. |
Ein-/Ausgänge
| none |

TB_EncoderActPos
Generates the actual mechanical position in user units from the increment position of a connected encoder.
When x_Enable = TRUE, the module is activated. Successful activation is signaled with TRUE at the x_Active output. From this point, the angle changes of the connected encoder are detected, converted into user units, output and added to the position variable connected to di_Pos. The position should be set once by the user.
Empfohlene Task: EVENT
Verwendete Bibliotheken: ARITHMETIC_30bd00 or greater MOTION_CONTROL_xxbd00 or greater
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: | |
|---|---|---|---|---|---|
| x_Enable | BOOL | ... | ... | TRUE: Enabling of the module. | |
| d_Encoder | DWORD | ... | ... | Angle position of the encoder in increments. 232 increments correspond to one revolution of the encoder. | |
| ud_Units | UDINT | ... | ... | Number of user units for the specified motor revolutions (u_Revolution). | |
| u_Revolution | UINT | ... | ... | Number of encoder revolutions for the given user units (ud_Units). ATTENTION: The internal processing precision of the master axis depends on u_Revolution. The smaller the u_Revolution, the greater the resolution: u_Revolution Resolution of the master axis 1 30 bits >= 2 29 bits >= 4 28 bits >= 8 27 bits >= 16 26 bits >= 32 25 bits >= 2^x 32-(x+2) bits = 30-x bits >= 4,096 18 bits >= 8,192 17 bits >= 16,384 16 bits >= 32,768 15 bits 0 = 65,536 14 bits | |
| i_T_Cycle | INT | ... | ... | Configured cycle time of setpoint event task in ms. 1, 2, 4 or 8 ms is possible. | |
| us_Filter | USINT | ... | ... | Filter parameter for the angle change. Zero means filter inactive. The larger the value, the greater the filter effect. | |
| di_Pos | DINT | ... | ... | Mechanical position of the encoder in user units. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module active; angle changes of the encoder are converted into user units and output. |
| di_Vel_Ts | DINT | Output of the current velocity in user units/Ts. Ts is the configured cycle time of the setpoint event task. |
| di_Vel_s | DINT | Output of the current velocity in user units/s. |
| di_Pos | DINT | Position of the encoder in user units |
Ein-/Ausgänge
| none |

TB_EncoderActPos
Generates the actual mechanical position in user units from the increment position of a connected encoder.
When x_Enable = TRUE, the module is activated. Successful activation is signaled with TRUE at the x_Active output. From this point, the angle changes of the connected encoder are detected, converted into user units, output and added to the position variable connected to di_Pos. The position should be set once by the user.
Empfohlene Task: EVENT
Verwendete Bibliotheken: ARITHMETIC_30bd00 or greater MOTION_CONTROL_xxbd00 or greater
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: | |
|---|---|---|---|---|---|
| x_Enable | BOOL | ... | ... | TRUE: Enabling of the module. | |
| d_Encoder | DWORD | ... | ... | Angle position of the encoder in increments. 232 increments correspond to one revolution of the encoder. | |
| ud_Units | UDINT | ... | ... | Number of user units for the specified motor revolutions (u_Revolution). | |
| u_Revolution | UINT | ... | ... | Number of encoder revolutions for the given user units (ud_Units). ATTENTION: The internal processing precision of the master axis depends on u_Revolution. The smaller the u_Revolution, the greater the resolution: u_Revolution Resolution of the master axis 1 30 bits >= 2 29 bits >= 4 28 bits >= 8 27 bits >= 16 26 bits >= 32 25 bits >= 2^x 32-(x+2) bits = 30-x bits >= 4,096 18 bits >= 8,192 17 bits >= 16,384 16 bits >= 32,768 15 bits 0 = 65,536 14 bits | |
| i_T_Cycle | INT | ... | ... | Configured cycle time of setpoint event task in ms. 1, 2, 4 or 8 ms is possible. | |
| us_Filter | USINT | ... | ... | Filter parameter for the angle change. Zero means filter inactive. The larger the value, the greater the filter effect. | |
| di_Pos | DINT | ... | ... | Mechanical position of the encoder in user units. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module active; angle changes of the encoder are converted into user units and output. |
| di_Vel_Ts | DINT | Output of the current velocity in user units/Ts. Ts is the configured cycle time of the setpoint event task. |
| di_Vel_s | DINT | Output of the current velocity in user units/s. |
| di_Pos | DINT | Position of the encoder in user units |
Ein-/Ausgänge
| none |

TB_GetPosAbsEnc
With this function, the current mechanical position of an axis equipped with an absolute value encoder can be calculated. For this purpose, the encoder position and the accompanying mechanical position must be determined during commissioning of the axis.
Empfohlene Task: -
Verwendete Bibliotheken: ARITHMETIC_30bd00 or greater
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: | |
|---|---|---|---|---|---|
| d_EncPresentPos | DWORD | ... | ... | Position of the encoder in increments for which the mechanical position (di_MechPresetPos) is known. This parameter is specified during commissioning. | |
| di_MechPresentPos | DINT | ... | ... | Mechanical position of the axis, if the encoder outputs d_EncPresetPos. This parameter is specified during commissioning. | |
| d_EncPos | DWORD | ... | ... | Current position of the encoder in increments. For this position, the mechanical position of the axis in user units is output. | |
| ud_Units | UDINT | ... | ... | Number of user units for the given encoder revolutions (u_Revolution). | |
| u_Revolution | UINT | ... | ... | Number of encoder revolutions for the given user units (ud_Units). | |
| u_IncsPerRound | UINT | ... | ... | Number of increments per revolution of the encoder. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| TB_GetPosAbsEnc | DINT | Mechanical position of the axis in user units for the encoder position d_EncPos in increments. |
Ein-/Ausgänge
| none |

TB_GetPosAbsEnc
With this function, the current mechanical position of an axis equipped with an absolute value encoder can be calculated. For this purpose, the encoder position and the accompanying mechanical position must be determined during commissioning of the axis.
Empfohlene Task: -
Verwendete Bibliotheken: ARITHMETIC_30bd00 or greater
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: | |
|---|---|---|---|---|---|
| d_EncPresentPos | DWORD | ... | ... | Position of the encoder in increments for which the mechanical position (di_MechPresetPos) is known. This parameter is specified during commissioning. | |
| di_MechPresentPos | DINT | ... | ... | Mechanical position of the axis, if the encoder outputs d_EncPresetPos. This parameter is specified during commissioning. | |
| d_EncPos | DWORD | ... | ... | Current position of the encoder in increments. For this position, the mechanical position of the axis in user units is output. | |
| ud_Units | UDINT | ... | ... | Number of user units for the given encoder revolutions (u_Revolution). | |
| u_Revolution | UINT | ... | ... | Number of encoder revolutions for the given user units (ud_Units). | |
| u_IncsPerRound | UINT | ... | ... | Number of increments per revolution of the encoder. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| TB_GetPosAbsEnc | DINT | Mechanical position of the axis in user units for the encoder position d_EncPos in increments. |
Ein-/Ausgänge
| none |

TB_MasterEncoder
The TB_MasterEncoder function module generates a master position and velocity in user units from a Motion Control axis (AXIS_REF) generated by the TB_MasterEngine or TB_PhysicalEncoder function module. The module is used to generate the master position for the respective "technology" axis (from the TechLib library) from a master axis. This position is used as a master value for the SyncLin und SyncRot technology modules, for example.
When x_Enable = TRUE, the module is activated. Successful activation is signaled with TRUE at the x_Active output. From this point, the positional changes (in user units/Ts) of the connected axis are detected, output (di_MasterVel) and added to the connected position variable (di_MasterPos). The position should be set once by the user. If TB_MasterEncoder is used in conjunction with a technology module (e.g. SyncLin or SyncRot), the position of the technology module is manipulated. See the description of the technology modules for this purpose.
Empfohlene Task: EVENT
Verwendete Bibliotheken: MOTION_MULTI_AXIS_xxbd00 or greaterMOTION_TYPES_xxbd07 or greater
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: | |
|---|---|---|---|---|---|
| x_Enable | BOOL | ... | ... | TRUE: Enabling of the module. The position is changed based on the velocity of the connected axis. Setting of the position does not occur, however. | |
| di_MasterPos | DINT | ... | ... | Position of the master in user units. | |
| _Master | AXIS_REF | ... | ... | A (global) variable of data type AXIS_REF must be connected to _Master. It contains the information of the master axis. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module active; positional changes of master axis cause positional changes at di_MasterPos. |
| di_MasterVel | DINT | Output of the current master velocity in user units/Ts. Ts is the configured cycle time of the setpoint event task. |
| di_MasterPos | DINT | Position of the master axis in user units. |
| _Master | AXIS_REF | Mechanical position of the axis in user units for the encoder position d_EncPos in increments. |
Ein-/Ausgänge
| none |

TB_MasterEncoder
The TB_MasterEncoder function module generates a master position and velocity in user units from a Motion Control axis (AXIS_REF) generated by the TB_MasterEngine or TB_PhysicalEncoder function module. The module is used to generate the master position for the respective "technology" axis (from the TechLib library) from a master axis. This position is used as a master value for the SyncLin und SyncRot technology modules, for example.
When x_Enable = TRUE, the module is activated. Successful activation is signaled with TRUE at the x_Active output. From this point, the positional changes (in user units/Ts) of the connected axis are detected, output (di_MasterVel) and added to the connected position variable (di_MasterPos). The position should be set once by the user. If TB_MasterEncoder is used in conjunction with a technology module (e.g. SyncLin or SyncRot), the position of the technology module is manipulated. See the description of the technology modules for this purpose.
Empfohlene Task: EVENT
Verwendete Bibliotheken: MOTION_MULTI_AXIS_xxbd00 or greaterMOTION_TYPES_xxbd07 or greater
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: | |
|---|---|---|---|---|---|
| x_Enable | BOOL | ... | ... | TRUE: Enabling of the module. The position is changed based on the velocity of the connected axis. Setting of the position does not occur, however. | |
| di_MasterPos | DINT | ... | ... | Position of the master in user units. | |
| _Master | AXIS_REF | ... | ... | A (global) variable of data type AXIS_REF must be connected to _Master. It contains the information of the master axis. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module active; positional changes of master axis cause positional changes at di_MasterPos. |
| di_MasterVel | DINT | Output of the current master velocity in user units/Ts. Ts is the configured cycle time of the setpoint event task. |
| di_MasterPos | DINT | Position of the master axis in user units. |
| _Master | AXIS_REF | Mechanical position of the axis in user units for the encoder position d_EncPos in increments. |
Ein-/Ausgänge
| none |

TB_MasterEngine
This function module can be used to generate a new virtual master. Any user units (Unit) can be used; it is thus possible to present the machinery in mm or °. In addition, any period can be specified, that can be 360° for example, to generate a rotary movement.
Empfohlene Task: EVENT
Verwendete Bibliotheken: MOTION_MULTI_AXIS_xxbd00 or greaterARITHMETIC_30bd00 or greaterMOTION_TYPES_xxbd07 or greaterTECH_TOOLS_30bd00 or greater
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: |
|---|---|---|---|---|
| x_Enable | BOOL | ... | ... | When the input x_Enable = TRUE, the module is initialized. If the initialization was successful, this is indicated when the output x_Active = TRUE. |
| x_Start | BOOL | ... | ... | The virtual master axis is started when x_Start = TRUE. To be able to start, x_Active must be TRUE and x_StopRapid must be FALSE. If the master axis is to stop at a certain position, it must be connected to ud_StopPos and then x_Start must be set to FALSE. Deceleration occurs with the stop deceleration ud_DecStop_s. The successful start of the virtual master axis is indicated when x_Motion = TRUE. |
| x_StopRapid | BOOL | ... | ... | The input x_StopRapid must be FALSE to be able to start the master axis. When x_StopRapid = TRUE, the master axis is stopped immediately. Deceleration occurs with the stop deceleration ud_DecRapid_s. |
| di_Vel_s | DINT | ... | ... | The setpoint velocity in Unit/s is connected to input di_Vel_s. To reach the velocity, acceleration/deceleration is carried out with ud_Acc_s/ud_Dec_s in Unit/s2. |
| ud_Acc_s | UDINT | ... | ... | Acceleration in Unit/s². |
| ud_Dec_s | UDINT | ... | ... | Deceleration in Unit/s². If the input is not occupied, ud_Acc_s is used. |
| ud_AccStart_s | UDINT | ... | ... | Acceleration in Unit/s² with which the master axis accelerates when x_Start = TRUE. ud_Acc_s is used once the setpoint velocity is reached for the first time. The acceleration therefore only has an effect during the first acceleration after the rising edge of x_Start. If the input is not occupied, ud_Acc_s is used. |
| ud_DecStop_s | UDINT | ... | ... | Deceleration in Unit/s² with which the master axis is braked when x_Start = FALSE. The indicated brake time ud_TimeStop_ms refers to this deceleration. If the input is not occupied, ud_Dec_s is used. |
| ud_DecRapid_s | UDINT | ... | ... | Deceleration in Unit/s² with which the master axis is braked when x_StopRapid = TRUE, x_Enable = FALSE or in case of an error. The indicated brake time ud_TimeStop_ms is based on this deceleration. If the input is not occupied, ud_Dec_s is used. |
| ud_StopPos | UDINT | ... | ... | When x_Start = FALSE, positioning to ud_StopPos occurs. If the position is reached, the output x_StopPosReached = TRUE. If the position cannot be reached, e.g. because it is located behind the current position or the braking path is longer than the distance to the stop position, braking occurs immediately. The output x_StopPosReached remains FALSE, however. |
| ud_StartPos | UDINT | ... | ... | If x_Enable = TRUE, ud_MasterPos is initialized with the start position ud_StartPos. |
| ud_Period | UDINT | ... | ... | The resolution of the master axis is specified with ud_Period. Any resolution can be chosen, e.g. 360000 for 360,000° or 735500 for 735,000 mm or 5000 for 50.00 inches. |
| i_T_Cycle | INT | ... | ... | Call interval of the event task in which TB_MasterEngine is called up; in ms. Valid values are 1 ms, 2 ms, 4 ms and 8 ms. |
| ud_Units | UDINT | ... | ... | If you would like to use the virtual master axis to couple Motion Control function modules such as MC_GearIn or MC_CamIn, you must specify a resolution to create the reference of user units per revolution of the motor or per MC_Periode. This resolution is also specified as a break in units/MC_Perioden, whereby ud_Units is the numerator and u_MC_Periode the denominator. If MC_GearIn or MC_CamIn is not to be used with the created master axis, the inputs should not be connected. |
| u_MC_Periode | UINT | ... | ... | see ud_Units! |
| _Master | AXIS_REF | ... | ... | Motion Control axis variable at the calculated master axis position. This axis variable can be used at the cam disk or the electronic gear as a master (master input) (if a resolution has been specified). The master axis position and velocity can still be read out in Unit or Unit/Ts, respectively, with the TB_MasterEncoder function module (no resolution is necessary here). |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | The x_Active output indicates successful initialization of TB_MasterEngine. |
| x_Motion | BOOL | The x_Motion output indicates the active virtual master axis. x_Motion is not FALSE until a standstill has been reached. |
| ud_MasterPos | UDINT | Current master position of the virtual master axis in Unit. The position is set to ud_StartPos with a rising edge of x_Enable. |
| di_MasterVel | DINT | Current velocity of the virtual master axis in Unit/Ts. |
| di_MasterAcc | DINT | Current acceleration of the virtual master axis in Unit/Ts². |
| di_MaVelSet_s | DINT | Setpoint velocity of the virtual master axis in Unit/s. |
| di_MaVelAct_s | DINT | Current velocity of the virtual master axis in Unit/s. |
| ud_TimeStop_ms | UDINT | Time in ms required to stop from the current velocity when x_Start = FALSE. The braking path could thus be calculated using the TB_TimeToTravel function module. |
| ud_TimeAcc_ms | UDINT | Time in ms still required to reach the setpoint velocity. The value can be used for the TB_CamSwitch function module, for example, so that the acceleration can be taken into account with the dead time compensation. |
| i_SegNr | INT | 0: Virtual master axis at standstill 1: Virtual master axis accelerated 2: Virtual master axis braked 3: Virtual master axis has reached setpoint velocity |
| x_StopPosReached | BOOL | The x_StopPosReached output is TRUE when the stop position has been reached. The stop position is not reached if the stop position is located behind the current position or the braking path is greater than the differential distance from the current position to the stop position. |
| x_Standstill | BOOL | The output x_Standstill = TRUE when the virtual master axis is at a standstill. |
| x_Error | BOOL | If an error occurs, the error bit is set and an error number is read out. If a warning occurs, only an error number is output. The error bit is not set. |
| i_Error | INT | see below |
| _Master | AXIS_REF | Motion Control axis variable at the calculated master axis position. This axis variable can be used at the cam disk or the electronic gear as a master (master input) (if a resolution has been specified). The master axis position and velocity can still be read out in Unit or Unit/Ts, respectively, with the TB_MasterEncoder function module (no resolution is necessary here). |
Ein-/Ausgänge
| none |

TB_MasterEngine
This function module can be used to generate a new virtual master. Any user units (Unit) can be used; it is thus possible to present the machinery in mm or °. In addition, any period can be specified, that can be 360° for example, to generate a rotary movement.
Empfohlene Task: EVENT
Verwendete Bibliotheken: MOTION_MULTI_AXIS_xxbd00 or greaterARITHMETIC_30bd00 or greaterMOTION_TYPES_xxbd07 or greaterTECH_TOOLS_30bd00 or greater
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: |
|---|---|---|---|---|
| x_Enable | BOOL | ... | ... | When the input x_Enable = TRUE, the module is initialized. If the initialization was successful, this is indicated when the output x_Active = TRUE. |
| x_Start | BOOL | ... | ... | The virtual master axis is started when x_Start = TRUE. To be able to start, x_Active must be TRUE and x_StopRapid must be FALSE. If the master axis is to stop at a certain position, it must be connected to ud_StopPos and then x_Start must be set to FALSE. Deceleration occurs with the stop deceleration ud_DecStop_s. The successful start of the virtual master axis is indicated when x_Motion = TRUE. |
| x_StopRapid | BOOL | ... | ... | The input x_StopRapid must be FALSE to be able to start the master axis. When x_StopRapid = TRUE, the master axis is stopped immediately. Deceleration occurs with the stop deceleration ud_DecRapid_s. |
| di_Vel_s | DINT | ... | ... | The setpoint velocity in Unit/s is connected to input di_Vel_s. To reach the velocity, acceleration/deceleration is carried out with ud_Acc_s/ud_Dec_s in Unit/s2. |
| ud_Acc_s | UDINT | ... | ... | Acceleration in Unit/s². |
| ud_Dec_s | UDINT | ... | ... | Deceleration in Unit/s². If the input is not occupied, ud_Acc_s is used. |
| ud_AccStart_s | UDINT | ... | ... | Acceleration in Unit/s² with which the master axis accelerates when x_Start = TRUE. ud_Acc_s is used once the setpoint velocity is reached for the first time. The acceleration therefore only has an effect during the first acceleration after the rising edge of x_Start. If the input is not occupied, ud_Acc_s is used. |
| ud_DecStop_s | UDINT | ... | ... | Deceleration in Unit/s² with which the master axis is braked when x_Start = FALSE. The indicated brake time ud_TimeStop_ms refers to this deceleration. If the input is not occupied, ud_Dec_s is used. |
| ud_DecRapid_s | UDINT | ... | ... | Deceleration in Unit/s² with which the master axis is braked when x_StopRapid = TRUE, x_Enable = FALSE or in case of an error. The indicated brake time ud_TimeStop_ms is based on this deceleration. If the input is not occupied, ud_Dec_s is used. |
| ud_StopPos | UDINT | ... | ... | When x_Start = FALSE, positioning to ud_StopPos occurs. If the position is reached, the output x_StopPosReached = TRUE. If the position cannot be reached, e.g. because it is located behind the current position or the braking path is longer than the distance to the stop position, braking occurs immediately. The output x_StopPosReached remains FALSE, however. |
| ud_StartPos | UDINT | ... | ... | If x_Enable = TRUE, ud_MasterPos is initialized with the start position ud_StartPos. |
| ud_Period | UDINT | ... | ... | The resolution of the master axis is specified with ud_Period. Any resolution can be chosen, e.g. 360000 for 360,000° or 735500 for 735,000 mm or 5000 for 50.00 inches. |
| i_T_Cycle | INT | ... | ... | Call interval of the event task in which TB_MasterEngine is called up; in ms. Valid values are 1 ms, 2 ms, 4 ms and 8 ms. |
| ud_Units | UDINT | ... | ... | If you would like to use the virtual master axis to couple Motion Control function modules such as MC_GearIn or MC_CamIn, you must specify a resolution to create the reference of user units per revolution of the motor or per MC_Periode. This resolution is also specified as a break in units/MC_Perioden, whereby ud_Units is the numerator and u_MC_Periode the denominator. If MC_GearIn or MC_CamIn is not to be used with the created master axis, the inputs should not be connected. |
| u_MC_Periode | UINT | ... | ... | see ud_Units! |
| _Master | AXIS_REF | ... | ... | Motion Control axis variable at the calculated master axis position. This axis variable can be used at the cam disk or the electronic gear as a master (master input) (if a resolution has been specified). The master axis position and velocity can still be read out in Unit or Unit/Ts, respectively, with the TB_MasterEncoder function module (no resolution is necessary here). |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | The x_Active output indicates successful initialization of TB_MasterEngine. |
| x_Motion | BOOL | The x_Motion output indicates the active virtual master axis. x_Motion is not FALSE until a standstill has been reached. |
| ud_MasterPos | UDINT | Current master position of the virtual master axis in Unit. The position is set to ud_StartPos with a rising edge of x_Enable. |
| di_MasterVel | DINT | Current velocity of the virtual master axis in Unit/Ts. |
| di_MasterAcc | DINT | Current acceleration of the virtual master axis in Unit/Ts². |
| di_MaVelSet_s | DINT | Setpoint velocity of the virtual master axis in Unit/s. |
| di_MaVelAct_s | DINT | Current velocity of the virtual master axis in Unit/s. |
| ud_TimeStop_ms | UDINT | Time in ms required to stop from the current velocity when x_Start = FALSE. The braking path could thus be calculated using the TB_TimeToTravel function module. |
| ud_TimeAcc_ms | UDINT | Time in ms still required to reach the setpoint velocity. The value can be used for the TB_CamSwitch function module, for example, so that the acceleration can be taken into account with the dead time compensation. |
| i_SegNr | INT | 0: Virtual master axis at standstill 1: Virtual master axis accelerated 2: Virtual master axis braked 3: Virtual master axis has reached setpoint velocity |
| x_StopPosReached | BOOL | The x_StopPosReached output is TRUE when the stop position has been reached. The stop position is not reached if the stop position is located behind the current position or the braking path is greater than the differential distance from the current position to the stop position. |
| x_Standstill | BOOL | The output x_Standstill = TRUE when the virtual master axis is at a standstill. |
| x_Error | BOOL | If an error occurs, the error bit is set and an error number is read out. If a warning occurs, only an error number is output. The error bit is not set. |
| i_Error | INT | see below |
| _Master | AXIS_REF | Motion Control axis variable at the calculated master axis position. This axis variable can be used at the cam disk or the electronic gear as a master (master input) (if a resolution has been specified). The master axis position and velocity can still be read out in Unit or Unit/Ts, respectively, with the TB_MasterEncoder function module (no resolution is necessary here). |
Ein-/Ausgänge
| none |

TB_MechActPos
Generates the actual mechanical position of a Motion Control axis in user units from the axis.
When x_Enable = TRUE, the module is activated. Successful activation is signaled with TRUE at the x_Active output. From this point, the positional changes of the connected axis are detected, converted into user units, output at di_Vel and added to the position variable connected to di_Pos. The position should be set once by the user.
Empfohlene Task: EVENT
Verwendete Bibliotheken: ARITHMETIC_30bd00 or greaterMOTION_CONTROL_xxbd00 or greater
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: | |
|---|---|---|---|---|---|
| x_Enable | BOOL | ... | ... | TRUE: Enabling of the module. The position is changed based on the velocity of the connected axis. Setting of the position does not occur, however. | |
| ud_Units | UDINT | ... | ... | Number of user units for the specified motor revolutions (u_Revolution). | |
| u_Revolution | UINT | ... | ... | Number of motor revolutions for the specified user units (ud_Units). | |
| i_T_Cycle | INT | ... | ... | Configured cycle time of setpoint event task in ms. 1, 2, 4 or 8 ms is possible. | |
| di_Pos | DINT | ... | ... | Mechanical position of the axis in user units. | |
| _Axis | AXIS_REF | ... | ... | The Motion Control axis is connected to _Axis. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module active; positional changes of master axis cause positional changes at di_MasterPos. |
| di_Vel | DINT | Output of the current master velocity in user units/Ts. Ts is the configured cycle time of the setpoint event task. |
| di_Pos | DINT | Position of the axis in user units |
| _Axis | AXIS_REF | Motion Control axis |
Ein-/Ausgänge
| none |

TB_MechActPos
Generates the actual mechanical position of a Motion Control axis in user units from the axis.
When x_Enable = TRUE, the module is activated. Successful activation is signaled with TRUE at the x_Active output. From this point, the positional changes of the connected axis are detected, converted into user units, output at di_Vel and added to the position variable connected to di_Pos. The position should be set once by the user.
Empfohlene Task: EVENT
Verwendete Bibliotheken: ARITHMETIC_30bd00 or greaterMOTION_CONTROL_xxbd00 or greater
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: | |
|---|---|---|---|---|---|
| x_Enable | BOOL | ... | ... | TRUE: Enabling of the module. The position is changed based on the velocity of the connected axis. Setting of the position does not occur, however. | |
| ud_Units | UDINT | ... | ... | Number of user units for the specified motor revolutions (u_Revolution). | |
| u_Revolution | UINT | ... | ... | Number of motor revolutions for the specified user units (ud_Units). | |
| i_T_Cycle | INT | ... | ... | Configured cycle time of setpoint event task in ms. 1, 2, 4 or 8 ms is possible. | |
| di_Pos | DINT | ... | ... | Mechanical position of the axis in user units. | |
| _Axis | AXIS_REF | ... | ... | The Motion Control axis is connected to _Axis. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module active; positional changes of master axis cause positional changes at di_MasterPos. |
| di_Vel | DINT | Output of the current master velocity in user units/Ts. Ts is the configured cycle time of the setpoint event task. |
| di_Pos | DINT | Position of the axis in user units |
| _Axis | AXIS_REF | Motion Control axis |
Ein-/Ausgänge
| none |

TB_PhysicalEncoder
Generates the actual mechanical position in user units from increment position of a connected encoder and outputs this as a Motion Control axis. With this module, a mechanical encoder can be used as a master encoder for synchronous movements. For this purpose, the 32-bit angle position (in increments) of the encoder is available as a cyclical value.
When x_Enable = TRUE, the module is activated. Successful activation is signaled with TRUE at the x_Active output. From this point, the angle changes of the connected encoder are detected, converted into user units, output, added to the position variable connected to di_Pos and saved in the _Master axis. The position should be set once by the user. The master axis can be used directly in Motion Control. The di_Pos position is available for using technology modules (SyncLin, SyncRot etc.).
If you would like to use the real master axis to couple Motion Control function modules such as MC_GearIn or MC_CamIn, you must specify a resolution to create the reference of user units per MC_Periode. This resolution is specified per break, e.g. in 360°/1 MC_Periode or 54,554 mm/1,000 MC_Periods. If you use the virtual master axis with function modules from the technology library, such as TB_SyncLin or TB_SyncRot, you do not need to specify the resolution, as these function modules work with user units.
With the TB_MasterEncoder function module, a unique master position for each individual technology axis is generated from the _Master (AXIS_REF) structure occupied by the TB_PhysicalEncoder function module. For this purpose, see "Application Manual Encoder Concept".
Empfohlene Task: EVENT
Verwendete Bibliotheken: MOTION_MULTI_AXIS_xxbd00 or greaterARITHMETIC_30bd00 or greaterMOTION_TYPES_xxbd07
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: | |
|---|---|---|---|---|---|
| x_Enable | BOOL | ... | ... | TRUE: Enabling of the module. The position is changed based on the velocity of the connected axis. Setting of the position does not occur, however. | |
| d_Encoder | DWORD | ... | ... | Angle position of the encoder in increments. 232 increments correspond to one revolution of the encoder. | |
| ud_Units | UDINT | ... | ... | Number of user units for the specified motor revolutions (u_Revolution). | |
| u_Revolution | UINT | ... | ... | The internal processing precision of the master axis depends on u_Revolution. The smaller the u_Revolution, the greater the resolution:
u_Revolution Resolution of the master axis 1 30 bits >= 2 29 bits >= 4 28 bits >= 8 27 bits >= 16 26 bits >= 32 25 bits >= 2^x 32-(x+2) bits = 30-x bits >= 4,096 18 bits >= 8,192 17 bits >= 16,384 16 bits >= 32,768 15 bits 0 = 65,536 14 bits | |
| i_T_Cycle | INT | ... | ... | Configured cycle time of setpoint event task in ms. 1, 2, 4 or 8 ms is possible. | |
| us_Filter | USINT | ... | ... | Filter parameter for the angle change. Zero means filter inactive. The larger the value, the greater the filter effect. | |
| ud_Units_1 | UDINT | ... | ... | Number of user units for the specified Motion Control periods (u_MC_Periode). | |
| u_MC_Periode | UINT | ... | ... | Number of Motion Control periods for the specified user units (ud_Units_1). | |
| di_Pos | DINT | ... | ... | Mechanical position of the encoder in user units. | |
| _Master | AXIS_REF | ... | ... | Motion Control master axis. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module active; positional changes of master axis cause positional changes at di_MasterPos. |
| di_Vel_s | DINT | Output of the current velocity in user units/Ts. Ts is the configured cycle time of the setpoint event task. |
| di_Vel_Ts | DINT | Output of the current velocity in user units/s. |
| di_Pos | DINT | Position of the axis in user units |
| _Master | AXIS_REF | Motion Control master axis |
Ein-/Ausgänge
| none |

TB_PhysicalEncoder
Generates the actual mechanical position in user units from increment position of a connected encoder and outputs this as a Motion Control axis. With this module, a mechanical encoder can be used as a master encoder for synchronous movements. For this purpose, the 32-bit angle position (in increments) of the encoder is available as a cyclical value.
When x_Enable = TRUE, the module is activated. Successful activation is signaled with TRUE at the x_Active output. From this point, the angle changes of the connected encoder are detected, converted into user units, output, added to the position variable connected to di_Pos and saved in the _Master axis. The position should be set once by the user. The master axis can be used directly in Motion Control. The di_Pos position is available for using technology modules (SyncLin, SyncRot etc.).
If you would like to use the real master axis to couple Motion Control function modules such as MC_GearIn or MC_CamIn, you must specify a resolution to create the reference of user units per MC_Periode. This resolution is specified per break, e.g. in 360°/1 MC_Periode or 54,554 mm/1,000 MC_Periods. If you use the virtual master axis with function modules from the technology library, such as TB_SyncLin or TB_SyncRot, you do not need to specify the resolution, as these function modules work with user units.
With the TB_MasterEncoder function module, a unique master position for each individual technology axis is generated from the _Master (AXIS_REF) structure occupied by the TB_PhysicalEncoder function module. For this purpose, see "Application Manual Encoder Concept".
Empfohlene Task: EVENT
Verwendete Bibliotheken: MOTION_MULTI_AXIS_xxbd00 or greaterARITHMETIC_30bd00 or greaterMOTION_TYPES_xxbd07
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: | |
|---|---|---|---|---|---|
| x_Enable | BOOL | ... | ... | TRUE: Enabling of the module. The position is changed based on the velocity of the connected axis. Setting of the position does not occur, however. | |
| d_Encoder | DWORD | ... | ... | Angle position of the encoder in increments. 232 increments correspond to one revolution of the encoder. | |
| ud_Units | UDINT | ... | ... | Number of user units for the specified motor revolutions (u_Revolution). | |
| u_Revolution | UINT | ... | ... | The internal processing precision of the master axis depends on u_Revolution. The smaller the u_Revolution, the greater the resolution:
u_Revolution Resolution of the master axis 1 30 bits >= 2 29 bits >= 4 28 bits >= 8 27 bits >= 16 26 bits >= 32 25 bits >= 2^x 32-(x+2) bits = 30-x bits >= 4,096 18 bits >= 8,192 17 bits >= 16,384 16 bits >= 32,768 15 bits 0 = 65,536 14 bits | |
| i_T_Cycle | INT | ... | ... | Configured cycle time of setpoint event task in ms. 1, 2, 4 or 8 ms is possible. | |
| us_Filter | USINT | ... | ... | Filter parameter for the angle change. Zero means filter inactive. The larger the value, the greater the filter effect. | |
| ud_Units_1 | UDINT | ... | ... | Number of user units for the specified Motion Control periods (u_MC_Periode). | |
| u_MC_Periode | UINT | ... | ... | Number of Motion Control periods for the specified user units (ud_Units_1). | |
| di_Pos | DINT | ... | ... | Mechanical position of the encoder in user units. | |
| _Master | AXIS_REF | ... | ... | Motion Control master axis. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module active; positional changes of master axis cause positional changes at di_MasterPos. |
| di_Vel_s | DINT | Output of the current velocity in user units/Ts. Ts is the configured cycle time of the setpoint event task. |
| di_Vel_Ts | DINT | Output of the current velocity in user units/s. |
| di_Pos | DINT | Position of the axis in user units |
| _Master | AXIS_REF | Motion Control master axis |
Ein-/Ausgänge
| none |

TB_ReadActualTorque
The function block TB_ReadActualTorque calculates the actual torque of the axis, including saturation. Upon activation with x_Enable = TRUE, the FB reads essential motor parameters via service data communication and initiates the conversion of the input variable r_ActualCurrent into the actual drive torque. The calculated value is then output through the output variable r_ActualTorque.
The function block can be called from any motion state and can be instantiated as many times as needed.
Note: The function block cannot be used for drives with hollow shaft and belt transmission.
Empfohlene Task: Event
Verwendete Bibliotheken: MOTION_TYPES_40bd11MOTION_CONTROL_40bd11SYSTEM2_PCC3_40bd04TECH_TOOLS_40bd08
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | Switches the function block on or off. If FALSE, all outputs are reset. |
| r_ActualCurrent | REAL | Actual motor current in [A]. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| r_ActualTorque | REAL | Actual motor torque in [Nm]. |
| x_Valid | BOOL | Signals that the function block is active and the output signal r_ActualTorque is valid. |
| x_Busy | BOOL | Signals that the function block is active, but the output signal r_ActualTorque is not yet valid. |
| x_Error | BOOL | Error bit indicating whether an error has occurred (error code w_ErrorID is valid). |
| w_ErrorID | WORD | Error code containing further information about the motion control error that occurred. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| _Axis | AXIS_REF | Motion Control axis variable |

TB_ReadActualTorque
The function block TB_ReadActualTorque calculates the actual torque of the axis, including saturation. Upon activation with x_Enable = TRUE, the FB reads essential motor parameters via service data communication and initiates the conversion of the input variable r_ActualCurrent into the actual drive torque. The calculated value is then output through the output variable r_ActualTorque.
The function block can be called from any motion state and can be instantiated as many times as needed.
Note: The function block cannot be used for drives with hollow shaft and belt transmission.
Empfohlene Task: Event
Verwendete Bibliotheken: MOTION_TYPES_40bd11MOTION_CONTROL_40bd11SYSTEM2_PCC3_40bd04TECH_TOOLS_40bd08
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | Switches the function block on or off. If FALSE, all outputs are reset. |
| r_ActualCurrent | REAL | Actual motor current in [A]. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| r_ActualTorque | REAL | Actual motor torque in [Nm]. |
| x_Valid | BOOL | Signals that the function block is active and the output signal r_ActualTorque is valid. |
| x_Busy | BOOL | Signals that the function block is active, but the output signal r_ActualTorque is not yet valid. |
| x_Error | BOOL | Error bit indicating whether an error has occurred (error code w_ErrorID is valid). |
| w_ErrorID | WORD | Error code containing further information about the motion control error that occurred. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| _Axis | AXIS_REF | Motion Control axis variable |

TB_ReadAxisStatus
The function block "TB_ReadAxisStatus" reads various status information of the axis. After activating the function block with x_Enable = TRUE, the reading of the drive status is initiated.
The function block can be called from any motion state and can be instantiated as many times as needed.
Empfohlene Task: Cyclic/Event
Verwendete Bibliotheken: MOTION_TYPES_40bd11
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | Input signal for activating the function block. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| i_State | Int | Indicates the current state of the drive (according to the state machine). 0: Not ready for start 1: Inhibit Start 2: Ready for switch on 3: Switched On 4: Operation Enabled 15: Error |
| x_DC_Link | BOOL | Indicates whether the DC link voltage is present. |
| x_ReadyToOperate | BOOL | Indicates whether the drive is ready for operation. |
| x_OperationDisabled | BOOL | Indicates whether the operation of the drive is disabled due to a missing PulseEnable signal. |
| x_PulseEnable | BOOL | Indicates whether the PulseEnable signal is activated. |
| x_QuickStop | BOOL | Indicates whether there is a request for a quick stop. |
| x_DriveWarning | BOOL | Indicates whether a drive warning has been detected. |
| x_DriveError | BOOL | Indicates whether a drive error has been detected. |
| x_Active | BOOL | Indicates whether the FB is active. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| _Axis | AXIS_REF | Motion Control axis variable |

TB_ReadAxisStatus
The function block "TB_ReadAxisStatus" reads various status information of the axis. After activating the function block with x_Enable = TRUE, the reading of the drive status is initiated.
The function block can be called from any motion state and can be instantiated as many times as needed.
Empfohlene Task: Cyclic/Event
Verwendete Bibliotheken: MOTION_TYPES_40bd11
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | Input signal for activating the function block. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| i_State | Int | Indicates the current state of the drive (according to the state machine). 0: Not ready for start 1: Inhibit Start 2: Ready for switch on 3: Switched On 4: Operation Enabled 15: Error |
| x_DC_Link | BOOL | Indicates whether the DC link voltage is present. |
| x_ReadyToOperate | BOOL | Indicates whether the drive is ready for operation. |
| x_OperationDisabled | BOOL | Indicates whether the operation of the drive is disabled due to a missing PulseEnable signal. |
| x_PulseEnable | BOOL | Indicates whether the PulseEnable signal is activated. |
| x_QuickStop | BOOL | Indicates whether there is a request for a quick stop. |
| x_DriveWarning | BOOL | Indicates whether a drive warning has been detected. |
| x_DriveError | BOOL | Indicates whether a drive error has been detected. |
| x_Active | BOOL | Indicates whether the FB is active. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| _Axis | AXIS_REF | Motion Control axis variable |

TB_ReadWriteBM5Parameter
The function block BM_ReadWriteBM5Parameter enables read & write access to all drive parameters of the BmaXX 5000 family. The service data communication with the slave runs via CAN over Ethercat (CoE); by using its own communication channel, the FB is completely independent of Motion Control.
Because the function block has a resource dependency, this must be configured accordingly in the POU (process object environment) in which the function block is instantiated.
On a rising edge of the input x_Execute, the read/write operation is initiated. The block reads or writes a parameter value to or from a motion control axis specified by the input variable_Axis. The drive parameter is determined by parameter IDs i_ParaID0 to i_ParaID3.
The output x_Busy indicates whether the block is actively processing. Upon successful processing, the output x_Done is set. If an error occurs, the output x_Error is set, and the corresponding error number is displayed in the output w_ErrorID. The error description can be found in the Baumüller Motion Control Help or in the "MC_ErrorInfo" function block.
The block supports various types of parameters, including DWORD, REAL, and STRING. The respective type is indicated by the input variable si_ValueType. The number of transmitted bytes is displayed in the output si_ByteLength, depending on the selected parameter type.
Empfohlene Task: Cyclic/Event
Verwendete Bibliotheken: MOTION_TYPES_40bd11SYSTEM2_PCC03_40bd04
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Execute | BOOL | Edge-sensitive input for executing the read/write operation |
| x_Write | BOOL | Indicates whether the operation is a write operation (TRUE) or not (FALSE). |
| si_ValueType | SINT | Type of the set or actual value (1: BYTE, 2: WORD, 4: DWORD, 5: REAL, 6: STRING). |
| i_ParaID0 | INT | Parameter ID for the first parameter. |
| i_ParaID1 | INT | Parameter ID for the second parameter. |
| i_ParaID2 | INT | Parameter ID for the third parameter. |
| i_ParaID3 | INT | Parameter ID for the fourth parameter. |
| t_Timeout | TIME | Time limit for the transmission. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| si_ByteLength | SINT | Number of relevant bytes in the transferred value. |
| x_Busy | BOOL | Indicates whether the function block is currently busy. |
| x_Done | BOOL | Indicates whether the operation has been successfully completed. |
| x_Error | BOOL | Indicates whether an error has occurred and the variable w_ErrorID is valid. |
| w_ErrorID | WORD | Number used to identify the occurred motion control error. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| _Axis | AXIS_REF | Motion Control axis variable |
| s_Value_STRING | STRING | Set value or Actual value as a string. |
| dw_Value_DWORD | DWORD | Set value or Actual value as a DWord. |
| r_Value_REAL | REAL | Set value or Actual value as a floating-point number (Real). |

TB_ReadWriteBM5Parameter
The function block BM_ReadWriteBM5Parameter enables read & write access to all drive parameters of the BmaXX 5000 family. The service data communication with the slave runs via CAN over Ethercat (CoE); by using its own communication channel, the FB is completely independent of Motion Control.
Because the function block has a resource dependency, this must be configured accordingly in the POU (process object environment) in which the function block is instantiated.
On a rising edge of the input x_Execute, the read/write operation is initiated. The block reads or writes a parameter value to or from a motion control axis specified by the input variable_Axis. The drive parameter is determined by parameter IDs i_ParaID0 to i_ParaID3.
The output x_Busy indicates whether the block is actively processing. Upon successful processing, the output x_Done is set. If an error occurs, the output x_Error is set, and the corresponding error number is displayed in the output w_ErrorID. The error description can be found in the Baumüller Motion Control Help or in the "MC_ErrorInfo" function block.
The block supports various types of parameters, including DWORD, REAL, and STRING. The respective type is indicated by the input variable si_ValueType. The number of transmitted bytes is displayed in the output si_ByteLength, depending on the selected parameter type.
Empfohlene Task: Cyclic/Event
Verwendete Bibliotheken: MOTION_TYPES_40bd11SYSTEM2_PCC03_40bd04
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Execute | BOOL | Edge-sensitive input for executing the read/write operation |
| x_Write | BOOL | Indicates whether the operation is a write operation (TRUE) or not (FALSE). |
| si_ValueType | SINT | Type of the set or actual value (1: BYTE, 2: WORD, 4: DWORD, 5: REAL, 6: STRING). |
| i_ParaID0 | INT | Parameter ID for the first parameter. |
| i_ParaID1 | INT | Parameter ID for the second parameter. |
| i_ParaID2 | INT | Parameter ID for the third parameter. |
| i_ParaID3 | INT | Parameter ID for the fourth parameter. |
| t_Timeout | TIME | Time limit for the transmission. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| si_ByteLength | SINT | Number of relevant bytes in the transferred value. |
| x_Busy | BOOL | Indicates whether the function block is currently busy. |
| x_Done | BOOL | Indicates whether the operation has been successfully completed. |
| x_Error | BOOL | Indicates whether an error has occurred and the variable w_ErrorID is valid. |
| w_ErrorID | WORD | Number used to identify the occurred motion control error. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| _Axis | AXIS_REF | Motion Control axis variable |
| s_Value_STRING | STRING | Set value or Actual value as a string. |
| dw_Value_DWORD | DWORD | Set value or Actual value as a DWord. |
| r_Value_REAL | REAL | Set value or Actual value as a floating-point number (Real). |

TB_Result
The status of the axis modules TB_xxx_CY is available as a structure variable at the _Result output. The TB_Result function module is used to break down and display this status. Thus not only the status of the axis module is available, but also the status of the drive in its entirety.
This function module is used for the diagnosis of the axis module and the drive. The _Result structure, which is available at the output of the axis module, is used as an interface.
The outputs that describe the status of the drive were generated in the axis module of TB_DriveState.
The outputs that describe the status of the axis module are generated in the "output" action. The error messages can be expanded or modified, depending on the application. The error code is structured as follows:
dw_Result:
Bits 0 to 15: error number of the faulty function module
Bits 16 to 23: number of the module/function module
Thus it is possible to transmit the following fault message:
In "Automatic" mode (bits 24 to 32), the "third" function module (bits 16 to 23) has the error number "-110" (bits 0 to 15).
Empfohlene Task: Cyclic
Verwendete Bibliotheken: TECH_TYPES_30bd05 or higher
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: |
|---|---|---|---|---|
| _Result | DriveStateType | ... | ... | Status of an axis module. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_DriveRdy | BOOL | TRUE: Drive is ready for switch-on. (for more detailed information, see TB_DriveState function module). |
| x_DriveComRdy | BOOL | TRUE: Communication to the drive is ready. (for more detailed information, see TB_DriveState function module). |
| w_Statusword | BOOL | Status word of the drive (P301). (for more detailed information, see TB_DriveState function module). |
| i_Status | INT | Drive status corresponding to the status machine of the drive and displayed at the drive display. (for more detailed information, see TB_DriveState function module). |
| x_Error | BOOL | TRUE: Drive fault. |
| x_Warning | BOOL | TRUE: Drive warning. |
| x_LinkVolt | BOOL | TRUE: System voltage/Intermediate circuit voltage is applied. |
| x_HW_PulsEnable | BOOL | TRUE: Pulse enable input at drive is closed. |
| x_HW_Quickstop | BOOL | TRUE: Quick stop input at drive is closed. |
| x_HW_SafetyRelais | BOOL | TRUE: Undervoltage in safety relay. |
| x_ComError | BOOL | TRUE: Demand data communication error of the internally used BM_ReadPar function module. |
| i_MC_Mode | INT | Mode number, see table under General description. |
| s_MC_ModeTxt | STRING | Mode number text. |
| i_ModuleId | INT | Module number, e.g. third function module in "Automatic" mode. |
| i_MC_MessageId | INT | Error number/Message number of the faulty function module. |
Ein-/Ausgänge
| none |

TB_Result
The status of the axis modules TB_xxx_CY is available as a structure variable at the _Result output. The TB_Result function module is used to break down and display this status. Thus not only the status of the axis module is available, but also the status of the drive in its entirety.
This function module is used for the diagnosis of the axis module and the drive. The _Result structure, which is available at the output of the axis module, is used as an interface.
The outputs that describe the status of the drive were generated in the axis module of TB_DriveState.
The outputs that describe the status of the axis module are generated in the "output" action. The error messages can be expanded or modified, depending on the application. The error code is structured as follows:
dw_Result:
Bits 0 to 15: error number of the faulty function module
Bits 16 to 23: number of the module/function module
Thus it is possible to transmit the following fault message:
In "Automatic" mode (bits 24 to 32), the "third" function module (bits 16 to 23) has the error number "-110" (bits 0 to 15).
Empfohlene Task: Cyclic
Verwendete Bibliotheken: TECH_TYPES_30bd05 or higher
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: |
|---|---|---|---|---|
| _Result | DriveStateType | ... | ... | Status of an axis module. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_DriveRdy | BOOL | TRUE: Drive is ready for switch-on. (for more detailed information, see TB_DriveState function module). |
| x_DriveComRdy | BOOL | TRUE: Communication to the drive is ready. (for more detailed information, see TB_DriveState function module). |
| w_Statusword | BOOL | Status word of the drive (P301). (for more detailed information, see TB_DriveState function module). |
| i_Status | INT | Drive status corresponding to the status machine of the drive and displayed at the drive display. (for more detailed information, see TB_DriveState function module). |
| x_Error | BOOL | TRUE: Drive fault. |
| x_Warning | BOOL | TRUE: Drive warning. |
| x_LinkVolt | BOOL | TRUE: System voltage/Intermediate circuit voltage is applied. |
| x_HW_PulsEnable | BOOL | TRUE: Pulse enable input at drive is closed. |
| x_HW_Quickstop | BOOL | TRUE: Quick stop input at drive is closed. |
| x_HW_SafetyRelais | BOOL | TRUE: Undervoltage in safety relay. |
| x_ComError | BOOL | TRUE: Demand data communication error of the internally used BM_ReadPar function module. |
| i_MC_Mode | INT | Mode number, see table under General description. |
| s_MC_ModeTxt | STRING | Mode number text. |
| i_ModuleId | INT | Module number, e.g. third function module in "Automatic" mode. |
| i_MC_MessageId | INT | Error number/Message number of the faulty function module. |
Ein-/Ausgänge
| none |

TB_VirtualDriveEncoder
Generates a motion control axis and the actual mechanical position of the axis in user units from a speed in 1/100 user units / Ts.
Eingänge
| Marking: | Datatype: | Description: |
|---|---|---|
| x_Enable | BOOL | Enable of function block |
| di_Vel | DINT | Speed in 1/100 units / Ts |
| ud_Units | UDINT | Number of user units per ... |
| u_MC_Periode | UINT | … Number of MC_revolution |
| di_Pos | DINT | Position of the axis in user units |
Ausgänge
| Marking: | Datatype: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Function block active |
| di_Pos | DINT | Position of the axis in user units |
Ein-/Ausgänge
| Marking: | Datatype: | Description: |
|---|---|---|
| _Master | AXIS_REF | Motion Control Axis |

TB_VirtualDriveEncoder
Generates a motion control axis and the actual mechanical position of the axis in user units from a speed in 1/100 user units / Ts.
Eingänge
| Marking: | Datatype: | Description: |
|---|---|---|
| x_Enable | BOOL | Enable of function block |
| di_Vel | DINT | Speed in 1/100 units / Ts |
| ud_Units | UDINT | Number of user units per ... |
| u_MC_Periode | UINT | … Number of MC_revolution |
| di_Pos | DINT | Position of the axis in user units |
Ausgänge
| Marking: | Datatype: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Function block active |
| di_Pos | DINT | Position of the axis in user units |
Ein-/Ausgänge
| Marking: | Datatype: | Description: |
|---|---|---|
| _Master | AXIS_REF | Motion Control Axis |
