Skip to main content

Touchprobe

This library is used to measure lengths and / or distances with the help of the fast digital converter input.

TB_One_Mark_Register

TB_One_Mark_Register

The functionblock calculates the position difference between a reference position and a latch posoition. The first detected latch position after the FB-enabling will be the reference position. All register distance calculations are related to this reference position. It is possible to consider the gear factor between load (latch side) and motor.

The functionblock calculates the position difference between a reference position and a latch posoition. The first detected latch position after the FB-enabling will be the reference position. All register distance calculations are related to this reference position. It is possible to consider the gear factor between load (latch side) and motor. The load register distance is multiplied by the gear factor and the result is the neccessary motor register distance. The dead time input considers the position shifting depent of the speed. Additional to the dead time compensation related to the speed, there is a ACC dead time compensation possible. This functionality is switched on and off via the input x_ACC_PRECONTROL_ON.

ATTENTION: It is not allowed to change the following inputs during the register correction process! ud_LATCH_POS_BIT_FILTER, x_INV_REG_DIST, x_ACC_PRECONTROL_ON, ud_ABS_DIST_LIMIT_LOAD, ud_MARK_WINDOW_LOAD, ui_ROUND_MOTOR, ui_ROUND_LOAD, u_SYS_DEAD_TIME, u_INTERRUPT_TIME All this values are initialization values!

Empfohlene Task: EVENT

Verwendete Bibliotheken: POSPROCESS_30bdxx or greater ARITHMETIC_PLC02_30bdxx or greaterBM_TYPES_30bdxx or greaterSYSTEM_C_PLC02_30bdxx or greater

Eingänge

Marking:Data type:Default:Data range:Description:
x_EnableBOOL......TRUE: Enabling of the module.
x_New_Mark_DetectBOOL......LH-edge oder HL-edge: new mark detected and start a new calculation of register distance
x_Invert_Register_DistBOOL......TRUE: dead time compensation depending on acceleration and deceleration is active
x_Acc_PreControl_ONBOOL......activate dead time compensation for acceleration and deceleration
u_Round_MotorUINT......
u_Round_LoadUINT......factor of motor-load-gearbox
u_DeadTime_SystemUINT......dead time of the whole system (dead_time_sensor +  dead_time_touchprobe) [µs]
u_Time_InterruptUINT......Cycle of Event-Task, in which the function block is instantiated [µs]
di_RefPos_Offset_LoadDINT......Offset which is added to the Reference Position
ud_Pos_MotUDINT......Actual Position of the motor (32-bit value, 360° = 4294967295 Inc), it is essential to use the same encoder as for ud_Latch_Pos_Mot
ud_Latch_Pos_MotUDINT......Latched Position of the motor (32-bit value, 360° = 4294967295 Inc), use the touchprobefunction of a Baumüller drive, it is essential to use the same encoder as for ud_Pos_Mot.
ud_Abs_DistLoadUDINT......set a maximum for the calculated register distance which depends on the load side, ABS(di_RegDist_Load) > ud_Abs_Dist_Load --> di_RegDist_Load = +/- ud_Abs_Dist_Load.
ud_Window_Load_MarkUDINT......set a window of tolerance over the referenceposition, this means when the calculated register distance depending on the load-side is within this the window the result is 0, (0 <= ABS(di_RegDist_Load) <= ud_Window_Load_Mark).
us_Latch_Pos_FilterUSINT......filters the last x Bits of the latch position, maximum range: 0 <= ud_Latch_Pos_Filter <= 25 (Example: ud_Latch_Pos_Mot = 11100101_11111111 / ud_Latch_Pos_Filter = 5 --> used latchposition ud_Latch_Pos_Mot = 11100101_11100000).

Ausgänge

Marking:Data type:Description:
x_NewDist_ValueBOOLLH-edge: New register distance is calculated
x_Register_OKBOOLFALSE: calculated register distance depending on the load-side is out of ud_Window_Load_Mark tolerances range
TRUE: calculated register distance depending on the load-side is within ud_Window_Load_Mark tolerances range --> di_RegDist_Load = 0
x_DistLimit_Load_ActiveBOOLFALSE: calculated registerdistance depending on the load-side is not limited
TRUE: calculated registerdistance depending on the load-side is limited (x_Register_OK = TRUE: register distance depending on the load-side is within ud_Window_Load_Mark, x_Register_OK = FALSE: maximum limitation by ud_Abs_Dist_Load)
x_ErrorBOOLTRUE: the function block has one or more errors, for further information see w_Error_Info
di_RegDist_LoadDINTcalculated registerdistance depending on the load-side, motor-load-gearbox is considerated [ 1 turn of the load = 360° = 4294967295 Inc]
di_RegDist_MotorDINTcalculated registerdistance depending on the motor-side, motor-load-gearbox is considerated [ 1 turn of the motor = 360° = 4294967295 Inc]
ud_RefPos_LoadUDINTcalculated registerdistance depending on the motor-side, motor-load-gearbox is considerated [ 1 turn of the motor = 360° = 4294967295 Inc]
ud_Latch_Pos_LoadUDINTshows the last latched position depending on the load, motor-load-gearbox is considerated [ 1 turn of the load = 360° = 4294967295 Inc]
w_Error_InfoWORDsee below

Ein-/Ausgänge

none

TB_TPmeasure

TB_TPmeasure

Distances and/or lengths can be measured with this module. This requires a touch probe function in the controller used. The touch probe function saves the current encoder position with a digital signal. Saving can occur with the positive and/or negative edge of the signal.

The module calculates the distance and length from the measured position. Windows can be specified in which a valid measurement is awaited so that interfering edges can be hidden.

Note:Before the module can be executed, all relevant parameters must be initialized with the TB_TPmeasure_Init technology block. Allowed drives are bmaXX 4400 and 5000.

Empfohlene Task: Event

Verwendete Bibliotheken: ARITHMETIC_xxbd00 or higher TECH_TYPES_xxbd05 or higher

Eingänge

Marking:Data type:Description:
x_EnableBOOLWhen the input x_Enable = TRUE, the module is initialized. If the initialization was successful, the module is enabled. This is indicated when output x_Active = TRUE.
After enabling, the first edge/mark is sought.
When x_Enable = FALSE, x_1stEdge and x_Active are reset.
x_AckBOOLAcceptance acknowledgment of the measured data. When x_Ack = TRUE, then x_Valid = FALSE and the measured distance (and length) is set to -1.
x_CounterclockwiseBOOLBefore enabling the FB with x_Enable, it must be set with this input, in which direction the measurement of lenght will be done.
With direction is meant, if the connected encoder on d_EncPos, counting positive in clockwise direction, or is running in counterclockwise direction.
TRUE: Counterclockwise
FALSE: Clockwise
If changing this variable in continous process, the FB needs on LH edge on x_Enable for reinit all values.
di_DefDistDINTSpecification value of the expected edge distance of the LH edges (or the HL edges) in user units (e.g. printing mark spacing).
di_DefSizeDINTSpecification value of expected edge length of LH to HL edge (or HL to LH edge) in user units (e.g. printing mark length).
di_WinDistDINTPermissible deviation (window width) of the edge distance of the LH edges (or the HL edges) in user units. Distances with di_DefDist ± di_WinDist are accepted.
If nothing is connected, the interfering mark detection is deactivated and all found edges are detected.
di_WinSizeDINTPermissible deviation (window width) of the edge distance of LH to HL edge or HL to LH edge in user units. Widths with di_DefSize ± di_WinSize are accepted.
If nothing is connected, the interfering mark detection is deactivated and all found edges are detected.
ud_UnitsUDINTNumber of user units for the corresponding encoder revolutions (u_Revolution).
u_RevolutionUINTNumber of encoder revolutions for the corresponding user units (ud_Units).
d_EncPosDWORDEncoder actual value of touch probe encoder. Format is 32-bit angle.
d_TP_PosLHDWORDMeasured position of LH edge. Format: 16-bit revolution, 16-bit angle.
d_TP_PosHLDWORDMeasured position of HL edge. Format: 16-bit revolution, 16-bit angle.

Ausgänge

Marking:Data type:Description:
x_ActiveBOOLTRUE: Module is active; initialization occurred without incident.
x_1stEdgeBOOLFirst valid edge detected. x_1stEdge remains TRUE until x_Enable = FALSE.
x_ValidBOOLTRUE: Valid values at di_ActDist (and di_ActSize). Reset with x_Ack = TRUE.
di_ActDistDINTDepending on mode and measurement: Measured OR last valid OR maximum distance of LH edges or HL edges in user units.
di_ActSizeDINTDepending on mode and measurement: Measured OR last valid OR minimum length of the LH to HL edge (or the HL to LH edge) in user units.
x_TP_ErrBOOLTRUE: Faulty measurement, i.e. no edge found within window. Remains TRUE until valid measurement occurs or x_Enable = FALSE.
u_TP_ErrCntUINTNumber of faulty measurements in succession. Reset upon the first valid measurement.
x_ErrorBOOLTRUE: Error detected. See error table.
i_ErrorINTError number. See error table.
s_ErrTxtSTRINGError text. See error table.

Ein-/Ausgänge

Marking:Data type:Description:
_PMdataPM_TypeData from the TB_TPmeasure_Init initialization module.
Representation in FBD

TB_TPmeasure

TB_TPmeasure

Distances and/or lengths can be measured with this module. This requires a touch probe function in the controller used. The touch probe function saves the current encoder position with a digital signal. Saving can occur with the positive and/or negative edge of the signal.

The module calculates the distance and length from the measured position. Windows can be specified in which a valid measurement is awaited so that interfering edges can be hidden.

Note:Before the module can be executed, all relevant parameters must be initialized with the TB_TPmeasure_Init technology block. Allowed drives are bmaXX 4400 and 5000.

Empfohlene Task: Event

Verwendete Bibliotheken: ARITHMETIC_xxbd00 or higher TECH_TYPES_xxbd05 or higher

Eingänge

Marking:Data type:Description:
x_EnableBOOLWhen the input x_Enable = TRUE, the module is initialized. If the initialization was successful, the module is enabled. This is indicated when output x_Active = TRUE.
After enabling, the first edge/mark is sought.
When x_Enable = FALSE, x_1stEdge and x_Active are reset.
x_AckBOOLAcceptance acknowledgment of the measured data. When x_Ack = TRUE, then x_Valid = FALSE and the measured distance (and length) is set to -1.
x_CounterclockwiseBOOLBefore enabling the FB with x_Enable, it must be set with this input, in which direction the measurement of lenght will be done.
With direction is meant, if the connected encoder on d_EncPos, counting positive in clockwise direction, or is running in counterclockwise direction.
TRUE: Counterclockwise
FALSE: Clockwise
If changing this variable in continous process, the FB needs on LH edge on x_Enable for reinit all values.
di_DefDistDINTSpecification value of the expected edge distance of the LH edges (or the HL edges) in user units (e.g. printing mark spacing).
di_DefSizeDINTSpecification value of expected edge length of LH to HL edge (or HL to LH edge) in user units (e.g. printing mark length).
di_WinDistDINTPermissible deviation (window width) of the edge distance of the LH edges (or the HL edges) in user units. Distances with di_DefDist ± di_WinDist are accepted.
If nothing is connected, the interfering mark detection is deactivated and all found edges are detected.
di_WinSizeDINTPermissible deviation (window width) of the edge distance of LH to HL edge or HL to LH edge in user units. Widths with di_DefSize ± di_WinSize are accepted.
If nothing is connected, the interfering mark detection is deactivated and all found edges are detected.
ud_UnitsUDINTNumber of user units for the corresponding encoder revolutions (u_Revolution).
u_RevolutionUINTNumber of encoder revolutions for the corresponding user units (ud_Units).
d_EncPosDWORDEncoder actual value of touch probe encoder. Format is 32-bit angle.
d_TP_PosLHDWORDMeasured position of LH edge. Format: 16-bit revolution, 16-bit angle.
d_TP_PosHLDWORDMeasured position of HL edge. Format: 16-bit revolution, 16-bit angle.

Ausgänge

Marking:Data type:Description:
x_ActiveBOOLTRUE: Module is active; initialization occurred without incident.
x_1stEdgeBOOLFirst valid edge detected. x_1stEdge remains TRUE until x_Enable = FALSE.
x_ValidBOOLTRUE: Valid values at di_ActDist (and di_ActSize). Reset with x_Ack = TRUE.
di_ActDistDINTDepending on mode and measurement: Measured OR last valid OR maximum distance of LH edges or HL edges in user units.
di_ActSizeDINTDepending on mode and measurement: Measured OR last valid OR minimum length of the LH to HL edge (or the HL to LH edge) in user units.
x_TP_ErrBOOLTRUE: Faulty measurement, i.e. no edge found within window. Remains TRUE until valid measurement occurs or x_Enable = FALSE.
u_TP_ErrCntUINTNumber of faulty measurements in succession. Reset upon the first valid measurement.
x_ErrorBOOLTRUE: Error detected. See error table.
i_ErrorINTError number. See error table.
s_ErrTxtSTRINGError text. See error table.

Ein-/Ausgänge

Marking:Data type:Description:
_PMdataPM_TypeData from the TB_TPmeasure_Init initialization module.
Representation in FBD

TB_TPmeasure_Init

TB_TPmeasure_Init

This module initializes the required parameters for the TB_TPmeasure measurement module. The operating mode, encoder input and touch probe input are specified for this purpose.

The touch probe function in the controller is initialized using the specified parameters.

i_OpMode=0: Measurement of the distances between LH edges.
i_OpMode=1: Measurement of the distances between HL edges.
i_OpMode=2: Measurement of the distances between LH edges
and the distances between LH and HL edges.
i_OpMode=3: Measurement of the distances between HL edges
and the distances between HL and LH edges.

Input 1 or 2 can be used as the input for the touch probe. If using the BM4400, an FIO module must be plugged in slot D.

Either Encoder 1 or Encoder 2 can be used.

Note:This Technology block is just possible to use for the BM4400 or BM5000 Series.

Empfohlene Task: Cyclic

Verwendete Bibliotheken: MOTION_CONTROL_xxbd00 or higher TECH_TYPES_xxbd05 or higher

Eingänge

Marking:Data type:Description:
x_ExecuteBOOLTRUE = Edge-sensitive execution, initialisation of the input parameters.
FALSE = Not executed or reset of the FB outputs.
i_ModeINTOperating mode
i_DigInINTDigital input used for the sensor. An FIO module must be used in slot D (bmaXX 4000)
If the FB is executed when i_DigIn = 0, then the configuration of the probe inputs is reset.
i_EncoderINTEncoder used. The corresponding encoder must have been previously activated via Winbass!

Ausgänge

Marking:Data type:Description:
x_OkBOOLTRUE: Initialization was successful.
x_ErrorBOOLTRUE: Error detected. See error table.
i_ErrorINTError number. See error table.
s_ErrTxtSTRINGError number. See error table.

Ein-/Ausgänge

Marking:Data type:Description:
_PMdataPM_TypeData for the TB_TPmeasure measurement module.
_AxisAXIS_REFMotion Control axis used.
Representation in FBD

TB_TPmeasure_Init

TB_TPmeasure_Init

This module initializes the required parameters for the TB_TPmeasure measurement module. The operating mode, encoder input and touch probe input are specified for this purpose.

The touch probe function in the controller is initialized using the specified parameters.

i_OpMode=0: Measurement of the distances between LH edges.
i_OpMode=1: Measurement of the distances between HL edges.
i_OpMode=2: Measurement of the distances between LH edges
and the distances between LH and HL edges.
i_OpMode=3: Measurement of the distances between HL edges
and the distances between HL and LH edges.

Input 1 or 2 can be used as the input for the touch probe. If using the BM4400, an FIO module must be plugged in slot D.

Either Encoder 1 or Encoder 2 can be used.

Note:This Technology block is just possible to use for the BM4400 or BM5000 Series.

Empfohlene Task: Cyclic

Verwendete Bibliotheken: MOTION_CONTROL_xxbd00 or higher TECH_TYPES_xxbd05 or higher

Eingänge

Marking:Data type:Description:
x_ExecuteBOOLTRUE = Edge-sensitive execution, initialisation of the input parameters.
FALSE = Not executed or reset of the FB outputs.
i_ModeINTOperating mode
i_DigInINTDigital input used for the sensor. An FIO module must be used in slot D (bmaXX 4000)
If the FB is executed when i_DigIn = 0, then the configuration of the probe inputs is reset.
i_EncoderINTEncoder used. The corresponding encoder must have been previously activated via Winbass!

Ausgänge

Marking:Data type:Description:
x_OkBOOLTRUE: Initialization was successful.
x_ErrorBOOLTRUE: Error detected. See error table.
i_ErrorINTError number. See error table.
s_ErrTxtSTRINGError number. See error table.

Ein-/Ausgänge

Marking:Data type:Description:
_PMdataPM_TypeData for the TB_TPmeasure measurement module.
_AxisAXIS_REFMotion Control axis used.
Representation in FBD

TF_TPmeasure

TF_TPmeasure

This function block is doing the 16:16 Bit-shifting of the 32Bit LH/HL MT revolutions and 32Bit LH/HL MT angle values, which is needed for the connection to the TB_TPmeasure.

Empfohlene Task: Cyclic

Verwendete Bibliotheken: MOTION_CONTROL_xxbd00 or higher TECH_TYPES_xxbd05 or higher

Eingänge

Marking:Data type:Description:
ud_EncoderActualValueUDINT32 Bit Position actual angle
ud_PosEdgeRevolutionsUDINT32 Bit positive edge revolutions
ud_PosEdgeAngleUDINT32 Bit positive edge angle
ud_NegEdgeRevolutionsUDINT32 Bit negative edge revolutions
ud_NegEdgeAngleUDINT32 Bit negative edge angle

Ausgänge

Marking:Data type:Description:
d_EncPosDWORDPosition actual angle (type converted to DWORD for connection to TB_TPmeasure input d_EncPos)
d_TP_PosLHDWORD16:16 Rev/Angle value LH-edge shifted value of positive edge (for connection to TB_TPmeasure input d_TP_PosLH)
d_TP_PosHLDWORD16:16 Rev/Angle value HL-edge shifted value of negative edge (for connection to TB_TPmeasure input d_TP_PosHL)

Ein-/Ausgänge

none
Representation in FBD

TF_TPmeasure

TF_TPmeasure

This function block is doing the 16:16 Bit-shifting of the 32Bit LH/HL MT revolutions and 32Bit LH/HL MT angle values, which is needed for the connection to the TB_TPmeasure.

Empfohlene Task: Cyclic

Verwendete Bibliotheken: MOTION_CONTROL_xxbd00 or higher TECH_TYPES_xxbd05 or higher

Eingänge

Marking:Data type:Description:
ud_EncoderActualValueUDINT32 Bit Position actual angle
ud_PosEdgeRevolutionsUDINT32 Bit positive edge revolutions
ud_PosEdgeAngleUDINT32 Bit positive edge angle
ud_NegEdgeRevolutionsUDINT32 Bit negative edge revolutions
ud_NegEdgeAngleUDINT32 Bit negative edge angle

Ausgänge

Marking:Data type:Description:
d_EncPosDWORDPosition actual angle (type converted to DWORD for connection to TB_TPmeasure input d_EncPos)
d_TP_PosLHDWORD16:16 Rev/Angle value LH-edge shifted value of positive edge (for connection to TB_TPmeasure input d_TP_PosLH)
d_TP_PosHLDWORD16:16 Rev/Angle value HL-edge shifted value of negative edge (for connection to TB_TPmeasure input d_TP_PosHL)

Ein-/Ausgänge

none
Representation in FBD