Tools
This library provides basic blocks and functions, some of which are also used by advanced libraries. This is delivered with the engineering framework ProMaster as standard.
- TB_Blinker
- TB_Blinker
- TB_DriveReadConfig
- TB_DriveReadConfig
- TB_DriveReadError
- TB_DriveReadError
- TB_FIFO
- TB_FIFO
- TB_FilterReal
- TB_FilterReal
- TB_NormCamCreate
- TB_NormCamCreate
- TB_PosAdd
- TB_PosAdd
- TB_ReadGCodeBuffer
- TB_ReadGCodeBuffer
- TB_RtcDateToString
- TB_RtcDateToString
- TB_RtcTimeToString
- TB_RtcTimeToString
- TB_Select_PT1
- TB_Select_PT1
- TB_ShiftReg
- TB_ShiftReg
- TB_SlipCtrl
- TB_SlipCtrl
- TB_StateMonitor_IAX
- TB_StateMonitor_IAX
- TB_SyncCam_Init
- TB_SyncCam_Init
- TB_TimeToTravel
- TB_TimeToTravel
- XAND
- XAND
TB_Blinker
This technology function realizes a blinker. Here it is possible to paramerize a several time for On period and off period. If input "x_Const_Out = TRUE" then the blinking output is an high level all the time. If an HL edge is detected at this input the blinker starts automatically.
Empfohlene Task: CYCLIC/ EVENT
Verwendete Bibliotheken: -
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | FALSE: The function is deactivated TRUE: The function is activated, at the moment of an LH-edge and "x_ConstOut = FALSE", then the output starts to blink automatically |
| x_Const_Out | BOOL | FALSE: The output is blinking, at the moment of an HL-edge the output starts to blink automatically TRUE: The output level is high |
| t_BlinkON_Time | TIME | Time of an blinking interval when the output is high. |
| t_BlinkOFF_Time | TIME | Time of an blinking interval when the output is low. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Blink_Out | BOOL | blinking signal. |
Ein-/Ausgänge
| none |

TB_Blinker
This technology function realizes a blinker. Here it is possible to paramerize a several time for On period and off period. If input "x_Const_Out = TRUE" then the blinking output is an high level all the time. If an HL edge is detected at this input the blinker starts automatically.
Empfohlene Task: CYCLIC/ EVENT
Verwendete Bibliotheken: -
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | FALSE: The function is deactivated TRUE: The function is activated, at the moment of an LH-edge and "x_ConstOut = FALSE", then the output starts to blink automatically |
| x_Const_Out | BOOL | FALSE: The output is blinking, at the moment of an HL-edge the output starts to blink automatically TRUE: The output level is high |
| t_BlinkON_Time | TIME | Time of an blinking interval when the output is high. |
| t_BlinkOFF_Time | TIME | Time of an blinking interval when the output is low. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Blink_Out | BOOL | blinking signal. |
Ein-/Ausgänge
| none |

TB_DriveReadConfig
This function block readout specified configuratoin parameters of a Baumüller drive. Please read the general description for further informations.
Actually this fuction block is usable for
Bmaxx 32xx, BmaXX 33xx, BmaXX 52xx, BmaXX 53xx
Empfohlene Task: Event/Cyclic
Verwendete Bibliotheken: TECH_TYPES_xxbd07 or higherMOTION_CONTROL_xxbd08 or higherMOTION_TYPES_xxbd08 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Execute | BOOL | Starts the readout with an LH-edge |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Busy | BOOL | TRUE: fb is busy and is doing the readout at the moment FALSE: fb is in standby |
| x_Done | BOOL | TRUE: readout was successful, x_Busy has to be FALSE in this state |
| x_Error | BOOL | TRUE: fb has an error |
| w_ErrorID | WORD | If x_Error = TRUE this out output shows a detailled error information number. |
| a_DriveCfg | AXS_PAR | struct in which all configuration parameters are written. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| _Axis | AXIS_REF | axis reference |

TB_DriveReadConfig
This function block readout specified configuratoin parameters of a Baumüller drive. Please read the general description for further informations.
Actually this fuction block is usable for
Bmaxx 32xx, BmaXX 33xx, BmaXX 52xx, BmaXX 53xx
Empfohlene Task: Event/Cyclic
Verwendete Bibliotheken: TECH_TYPES_xxbd07 or higherMOTION_CONTROL_xxbd08 or higherMOTION_TYPES_xxbd08 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Execute | BOOL | Starts the readout with an LH-edge |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Busy | BOOL | TRUE: fb is busy and is doing the readout at the moment FALSE: fb is in standby |
| x_Done | BOOL | TRUE: readout was successful, x_Busy has to be FALSE in this state |
| x_Error | BOOL | TRUE: fb has an error |
| w_ErrorID | WORD | If x_Error = TRUE this out output shows a detailled error information number. |
| a_DriveCfg | AXS_PAR | struct in which all configuration parameters are written. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| _Axis | AXIS_REF | axis reference |

TB_DriveReadError
With this fb it is possible to read all errors of a Baumüller drive. When the drive creates an error the fb read all errors and stores them in the array "a_ErrorList". Also the count of errors is stored. A succesfull reading is characterized by "x_ListDone = TRUE". A falling edge at the input "x_Acknowledge" deletes the content of "a_ErrorList" and the monitoring of new drive errors will start again.
With this fb it is also possible to read the actual error of drive continously. This function must be activated by "x_ContCheck = TRUE". When this function is used t_CheckCycle must be selected higher than 0. The activation and reactivation by "x_ContCheck" can be done at any time. Attention: The drive errors are readout via user data.
The functionblock detects itself which type of axis is connected!
Attention: Actually this fb is usable for:
BmaXX 32xx, BmaXX 33xx, BmaXX 44xx with Firmware-Version 3.11 or higher, BmaXX 52xx, BmaXX 53xx
Empfohlene Task: Event
Verwendete Bibliotheken: BM_TYPES_xxbd01 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: Fb ist enabled |
| x_Acknowledge | BOOL | HL-edge: delete content of the array of drive's errors. Also start the monitoring of a new drive error. |
| x_ContCheck | BOOL | TRUE: enable continously readout of errors |
| t_CheckCycle | TIME | Interval of the continously readout; Attention: this value must be higher than 0, if the value is lower the readout doesn't work anymore. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Error | BOOL | TRUE: Fb has an error |
| x_ListDone | BOOL | TRUE: List of errors was created successully and can be used |
| x_DriveError | BOOL | TRUE: fb has an error |
| x_DriveWarning | BOOL | TRUE: Drive has one or more warnings. |
| x_Active | BOOL | TRUE: Fb is active and waits for an error of the error FALSE: when error list was created successfully |
| w_ErrorID | WORD | detail information abaut the errors of the Fb, for more information please read error list of fb |
| a_ErrorList | INT_32_BMARRAY | struct in which all configuration parameters are written. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| _Axis | AXIS_REF | axis reference |

TB_DriveReadError
With this fb it is possible to read all errors of a Baumüller drive. When the drive creates an error the fb read all errors and stores them in the array "a_ErrorList". Also the count of errors is stored. A succesfull reading is characterized by "x_ListDone = TRUE". A falling edge at the input "x_Acknowledge" deletes the content of "a_ErrorList" and the monitoring of new drive errors will start again.
With this fb it is also possible to read the actual error of drive continously. This function must be activated by "x_ContCheck = TRUE". When this function is used t_CheckCycle must be selected higher than 0. The activation and reactivation by "x_ContCheck" can be done at any time. Attention: The drive errors are readout via user data.
The functionblock detects itself which type of axis is connected!
Attention: Actually this fb is usable for:
BmaXX 32xx, BmaXX 33xx, BmaXX 44xx with Firmware-Version 3.11 or higher, BmaXX 52xx, BmaXX 53xx
Empfohlene Task: Event
Verwendete Bibliotheken: BM_TYPES_xxbd01 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: Fb ist enabled |
| x_Acknowledge | BOOL | HL-edge: delete content of the array of drive's errors. Also start the monitoring of a new drive error. |
| x_ContCheck | BOOL | TRUE: enable continously readout of errors |
| t_CheckCycle | TIME | Interval of the continously readout; Attention: this value must be higher than 0, if the value is lower the readout doesn't work anymore. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Error | BOOL | TRUE: Fb has an error |
| x_ListDone | BOOL | TRUE: List of errors was created successully and can be used |
| x_DriveError | BOOL | TRUE: fb has an error |
| x_DriveWarning | BOOL | TRUE: Drive has one or more warnings. |
| x_Active | BOOL | TRUE: Fb is active and waits for an error of the error FALSE: when error list was created successfully |
| w_ErrorID | WORD | detail information abaut the errors of the Fb, for more information please read error list of fb |
| a_ErrorList | INT_32_BMARRAY | struct in which all configuration parameters are written. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| _Axis | AXIS_REF | axis reference |

TB_FIFO
With TB_FIFO (first in, first out), data records are saved sequentially and can be read out again in the same order at a later time. Up to 256 data records can be saved.
When x_Enable = TRUE, the module is activated. Successful activation is signaled with TRUE at the x_Active output. From this point, data records can be saved and read. A data record consists of one to four data words.
Saving data:
The data record active at di_InVal0..3 is saved with the positive edge at input x_Put. If the data record was accepted, this is reported with TRUE at the x_PutDone output for one cycle. If the data record could not be saved (FIFO full), x_PutDone remains FALSE and an error is output. Up to 256 data records can be saved.
Reading data:
With a positive edge at the x_Get input, the oldest data set is read, output at di_OutVal0..3 and deleted internally. This means that a read data record cannot be read out a second time. Successful output is indicated with TRUE at the x_GetDone output for one cycle. If no data records could be read (FIFO empty), x_GetDone remains FALSE and an error is output.
Deleting FIFO:
When the enable is cancelled (x_Enable = FALSE), the FIFO is deleted and all saved data records are deleted.
Acknowledging errors:
Errors are deleted automatically via a valid command. If, for example, a data record is saved after an error -2 (FIFO empty), x_Error becomes FALSE and i_Error becomes 0.
Empfohlene Task: Event / Cyclic
Verwendete Bibliotheken: -
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: Enabling of the module and deleting of the FIFO. Successful enabling is indicated at x_Active. |
| x_Get | BOOL | With the positive edge, the oldest data record is output at di_OutVal0..3. Successful output is indicated at x_PutDone. |
| x_Put | BOOL | With the positive edge, the data record is accepted at di_InVal0..3. Successful acceptance is indicated at x_PutDone. |
| di_InVal0 | DINT | First data word of the data record entered in the FIFO. |
| di_InVal1 | DINT | Second data word of the data record entered in the FIFO. |
| di_InVal2 | DINT | Third data word of the data record entered in the FIFO. |
| di_InVal3 | DINT | Fourth data word of the data record entered in the FIFO. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module active. Data records can be written and read. |
| x_GetDone | BOOL | TRUE: Indicates that the data output at di_OutVal0..3 is valid for one cycle. |
| x_PutDone | BOOL | TRUE: Indicates that the data active at di_InVal0..3 is accepted for one cycle. |
| di_OutVal0 | DINT | First data word of the data record read out of the FIFO. |
| di_OutVal1 | DINT | Second data word of the data record read out of the FIFO. FALSE: when error list was created successfully |
| di_OutVal2 | DINT | Third data word of the data record read out of the FIFO. |
| di_OutVal3 | DINT | Fourth data word of the data record read out of the FIFO. |
| i_Elements | INT | Number of data records currently saved in FIFO. |
| x_Error | BOOL | TRUE: An error was identified. |
| i_Error | INT | Current error number. See table above. |
Ein-/Ausgänge
| none |

TB_FIFO
With TB_FIFO (first in, first out), data records are saved sequentially and can be read out again in the same order at a later time. Up to 256 data records can be saved.
When x_Enable = TRUE, the module is activated. Successful activation is signaled with TRUE at the x_Active output. From this point, data records can be saved and read. A data record consists of one to four data words.
Saving data:
The data record active at di_InVal0..3 is saved with the positive edge at input x_Put. If the data record was accepted, this is reported with TRUE at the x_PutDone output for one cycle. If the data record could not be saved (FIFO full), x_PutDone remains FALSE and an error is output. Up to 256 data records can be saved.
Reading data:
With a positive edge at the x_Get input, the oldest data set is read, output at di_OutVal0..3 and deleted internally. This means that a read data record cannot be read out a second time. Successful output is indicated with TRUE at the x_GetDone output for one cycle. If no data records could be read (FIFO empty), x_GetDone remains FALSE and an error is output.
Deleting FIFO:
When the enable is cancelled (x_Enable = FALSE), the FIFO is deleted and all saved data records are deleted.
Acknowledging errors:
Errors are deleted automatically via a valid command. If, for example, a data record is saved after an error -2 (FIFO empty), x_Error becomes FALSE and i_Error becomes 0.
Empfohlene Task: Event / Cyclic
Verwendete Bibliotheken: -
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: Enabling of the module and deleting of the FIFO. Successful enabling is indicated at x_Active. |
| x_Get | BOOL | With the positive edge, the oldest data record is output at di_OutVal0..3. Successful output is indicated at x_PutDone. |
| x_Put | BOOL | With the positive edge, the data record is accepted at di_InVal0..3. Successful acceptance is indicated at x_PutDone. |
| di_InVal0 | DINT | First data word of the data record entered in the FIFO. |
| di_InVal1 | DINT | Second data word of the data record entered in the FIFO. |
| di_InVal2 | DINT | Third data word of the data record entered in the FIFO. |
| di_InVal3 | DINT | Fourth data word of the data record entered in the FIFO. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module active. Data records can be written and read. |
| x_GetDone | BOOL | TRUE: Indicates that the data output at di_OutVal0..3 is valid for one cycle. |
| x_PutDone | BOOL | TRUE: Indicates that the data active at di_InVal0..3 is accepted for one cycle. |
| di_OutVal0 | DINT | First data word of the data record read out of the FIFO. |
| di_OutVal1 | DINT | Second data word of the data record read out of the FIFO. FALSE: when error list was created successfully |
| di_OutVal2 | DINT | Third data word of the data record read out of the FIFO. |
| di_OutVal3 | DINT | Fourth data word of the data record read out of the FIFO. |
| i_Elements | INT | Number of data records currently saved in FIFO. |
| x_Error | BOOL | TRUE: An error was identified. |
| i_Error | INT | Current error number. See table above. |
Ein-/Ausgänge
| none |

TB_FilterReal
The function block TB_FilterReal implements a low-pass filter with a programmable time constant (T) for REAL values. In each cycle, the block calculates the filtered value based on the current input value and the previous filtered value. The time constant T determines how quickly the filter responds to changes in the input value. The filtered value is provided at the output Y.
The FB is suitable for attenuating high-frequency input values and generating smoothed output values. The choice of the time constant T influences the filter's response speed. A larger T value results in a slower response to changes.
Empfohlene Task: Cyclic/Event
Verwendete Bibliotheken: none
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| X | REAL | Value to be filtered. |
| T | TIME | Time constant of the low-pass filter. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| Y | REAL | Filtered value. |
Ein-/Ausgänge
| none |

TB_FilterReal
The function block TB_FilterReal implements a low-pass filter with a programmable time constant (T) for REAL values. In each cycle, the block calculates the filtered value based on the current input value and the previous filtered value. The time constant T determines how quickly the filter responds to changes in the input value. The filtered value is provided at the output Y.
The FB is suitable for attenuating high-frequency input values and generating smoothed output values. The choice of the time constant T influences the filter's response speed. A larger T value results in a slower response to changes.
Empfohlene Task: Cyclic/Event
Verwendete Bibliotheken: none
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| X | REAL | Value to be filtered. |
| T | TIME | Time constant of the low-pass filter. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| Y | REAL | Filtered value. |
Ein-/Ausgänge
| none |

TB_NormCamCreate
This module creates the data point table of the standard cams for use in technology modules such as TB_SyncLin, TB_SyncRot and TB_CamStretch.
The cam data points for the technology modules are saved in the data point table.
The table provides space for 32 cams with 512 data points each. The first 16 spots are reserved. Spots 17 to 32 can be filled with user cams. Modules with CamId input (e.g. TB_CamStretch) can process the user cams. See description of the corresponding modules.
Empfohlene Task: Cold start/Warm start or Cyclic
Verwendete Bibliotheken: TECH_TYPES_xxbd05 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: Creation of the data point table. Creation occurs in one cycle. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Done | BOOL | TRUE: The data point table is created and can be used. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| a_CamTable | CAM_TABLE | Data point table. |

TB_NormCamCreate
This module creates the data point table of the standard cams for use in technology modules such as TB_SyncLin, TB_SyncRot and TB_CamStretch.
The cam data points for the technology modules are saved in the data point table.
The table provides space for 32 cams with 512 data points each. The first 16 spots are reserved. Spots 17 to 32 can be filled with user cams. Modules with CamId input (e.g. TB_CamStretch) can process the user cams. See description of the corresponding modules.
Empfohlene Task: Cold start/Warm start or Cyclic
Verwendete Bibliotheken: TECH_TYPES_xxbd05 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: Creation of the data point table. Creation occurs in one cycle. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Done | BOOL | TRUE: The data point table is created and can be used. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| a_CamTable | CAM_TABLE | Data point table. |

TB_PosAdd
This module generates cyclical setpoint positions in user units and can execute additional positioning in conjunction with technology modules such as TB_SyncRot or TB_SyncLin.
The module generates setpoint positions based on a master position. The movement starts from a rest as soon as the master position (di_xPos) is the same as the start position (di_xOffs). The movement of the axis (di_yFact) is executed while the master path covers di_xFact. A velocity profile without a velocity plateau is generated.
Empfohlene Task: Event
Verwendete Bibliotheken: ARITHMETIC_xxbd00 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: Enabling of the module. |
| di_xPos | DINT | Current master position in user units. |
| di_xOffs | DINT | Start position of the master axis for movement in user units. |
| di_xFact | DINT | Path of the master axis for movement in user units. |
| di_yFact | DINT | Travel range of the axis in user units. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module is active and waits until the master position reaches the start position di_xOffs. |
| x_CamActive | BOOL | TRUE: Movement execution is started. The axis movement is dependent on the master movement. |
| di_yPos | DINT | Setpoint position of the axis in 1/100th user units. This position can be connected directly to the di_yPosAdd input of the technology module TB_SyncLin or TB_SyncRot, for example. |
Ein-/Ausgänge
| none |

TB_PosAdd
This module generates cyclical setpoint positions in user units and can execute additional positioning in conjunction with technology modules such as TB_SyncRot or TB_SyncLin.
The module generates setpoint positions based on a master position. The movement starts from a rest as soon as the master position (di_xPos) is the same as the start position (di_xOffs). The movement of the axis (di_yFact) is executed while the master path covers di_xFact. A velocity profile without a velocity plateau is generated.
Empfohlene Task: Event
Verwendete Bibliotheken: ARITHMETIC_xxbd00 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: Enabling of the module. |
| di_xPos | DINT | Current master position in user units. |
| di_xOffs | DINT | Start position of the master axis for movement in user units. |
| di_xFact | DINT | Path of the master axis for movement in user units. |
| di_yFact | DINT | Travel range of the axis in user units. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module is active and waits until the master position reaches the start position di_xOffs. |
| x_CamActive | BOOL | TRUE: Movement execution is started. The axis movement is dependent on the master movement. |
| di_yPos | DINT | Setpoint position of the axis in 1/100th user units. This position can be connected directly to the di_yPosAdd input of the technology module TB_SyncLin or TB_SyncRot, for example. |
Ein-/Ausgänge
| none |

TB_ReadGCodeBuffer
This function block is used to read the G-Code buffer of the MC_MovePath. The G-Code commands are sorted in ascending order, starting with the rently active command. The table is updated automatically by changing the ArrayIndex of the G-Code Buffer.
Empfohlene Task: Event
Verwendete Bibliotheken: MC_SYS_40bd09 or higherMOTION_CONTROL_40bd11 or higher;herMOTION_TYPES_40bd11 or higherTECH_TYPES_40bd12 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: Release of the function block, this starts the reading of the G-code buffer. |
| i_GetGCodeLines | INT | Number of required G-Code lines [1..20] |
| i_CurrentGCodeDisplayBuffer | INT | Current step/index of G-code buffer |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: fb is doing and readout the G-code buffer FALSE: fb is in Standby |
| x_Error | BOOL | TRUE: TRUE: fb has an error |
| w_ErrorID | WORD | If x_Error = TRUE this out output shows a detailled error information number. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| a_GCodeDisplay | MC_GCodeDisplayString_BMARRAY | MovePath G-Code buffer |
| a_GCodeBuffer | a_GCodeBufferStringArray | G-Code array |

TB_ReadGCodeBuffer
This function block is used to read the G-Code buffer of the MC_MovePath. The G-Code commands are sorted in ascending order, starting with the rently active command. The table is updated automatically by changing the ArrayIndex of the G-Code Buffer.
Empfohlene Task: Event
Verwendete Bibliotheken: MC_SYS_40bd09 or higherMOTION_CONTROL_40bd11 or higher;herMOTION_TYPES_40bd11 or higherTECH_TYPES_40bd12 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: Release of the function block, this starts the reading of the G-code buffer. |
| i_GetGCodeLines | INT | Number of required G-Code lines [1..20] |
| i_CurrentGCodeDisplayBuffer | INT | Current step/index of G-code buffer |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: fb is doing and readout the G-code buffer FALSE: fb is in Standby |
| x_Error | BOOL | TRUE: TRUE: fb has an error |
| w_ErrorID | WORD | If x_Error = TRUE this out output shows a detailled error information number. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| a_GCodeDisplay | MC_GCodeDisplayString_BMARRAY | MovePath G-Code buffer |
| a_GCodeBuffer | a_GCodeBufferStringArray | G-Code array |

TB_RtcDateToString
The function block TB_RtcDateToString converts the RTC date from HEX to a string.
The output is in two formats:
Empfohlene Task: Cyclic/Event
Verwendete Bibliotheken: none
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| dw_PSB02_RTC_Date | DWORD | Input value containing the date in RTC format (hexadecimal). |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| s_RTC_String_DE | STRNG | Output value containing the date in the format DD.MM.YYYY (German format). |
| s_RTC_String_EN | STRNG | Output value containing the date in the format YYYY-MM-DD (international format). |
Ein-/Ausgänge
| none |

TB_RtcDateToString
The function block TB_RtcDateToString converts the RTC date from HEX to a string.
The output is in two formats:
Empfohlene Task: Cyclic/Event
Verwendete Bibliotheken: none
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| dw_PSB02_RTC_Date | DWORD | Input value containing the date in RTC format (hexadecimal). |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| s_RTC_String_DE | STRNG | Output value containing the date in the format DD.MM.YYYY (German format). |
| s_RTC_String_EN | STRNG | Output value containing the date in the format YYYY-MM-DD (international format). |
Ein-/Ausgänge
| none |

TB_RtcTimeToString
The function block TB_RtcTimeToString converts the received RTC time (in HEX format) into a HH:MM:SS format. Optionally, a display in 12h format is possible, in this case the AM/PM suffix is added accordingly.
Empfohlene Task: Cyclic/Event
Verwendete Bibliotheken: none
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_IsAMPM | BOOL | Indicates whether the time is to be displayed in 12h format (TRUE) or not (FALSE). If yes, the AM/PM suffix is added accordingly. |
| dw_PSB02_RTC_Time | DWORD | Input value containing the time in RTC format (hexadecimal). |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| s_RTC_String | STRNG | Output value containing the converted time in HH:MM:SS format, if x_IsAMPM is set to TRUE, the AM/PM suffix is added. |
Ein-/Ausgänge
| none |

TB_RtcTimeToString
The function block TB_RtcTimeToString converts the received RTC time (in HEX format) into a HH:MM:SS format. Optionally, a display in 12h format is possible, in this case the AM/PM suffix is added accordingly.
Empfohlene Task: Cyclic/Event
Verwendete Bibliotheken: none
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_IsAMPM | BOOL | Indicates whether the time is to be displayed in 12h format (TRUE) or not (FALSE). If yes, the AM/PM suffix is added accordingly. |
| dw_PSB02_RTC_Time | DWORD | Input value containing the time in RTC format (hexadecimal). |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| s_RTC_String | STRNG | Output value containing the converted time in HH:MM:SS format, if x_IsAMPM is set to TRUE, the AM/PM suffix is added. |
Ein-/Ausgänge
| none |

TB_Select_PT1
The function block TB_Select_PT1 is used to select between two input values (r_InValue_1 and r_InValue_2) based on the switch x_Switch. When x_Switch is set to FALSE, the value of r_InValue_1 is selected; otherwise, the value of r_InValue_2 is selected. The selected value is then processed through a PT1 transfer element with time constants t_Time_1 or t_Time_2 (depending on the selection) and the gain factor r_Multiplier.
The function block monitors the value transfer and sets the status signals x_Busy and x_Done accordingly. When the transfer is active (i.e., the difference between the output and input values is greater than 0.25), x_Busy is set to TRUE. When the target value is reached (i.e., x_Switch is active, and the difference between the output and input values is less than or equal to 0.25), x_Done is set to TRUE.
The function block can be enabled or disabled with the input x_Enable. When x_Enable is set to FALSE, all outputs are reset, and the function block is inactive.
Note: If the value of r_Multiplier is less than or equal to 0, the gain factor is set to 1 to ensure correct functionality.
Empfohlene Task: Cyclic/Event
Verwendete Bibliotheken: none
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | Toggles the function block on or off. When set to FALSE, all outputs are reset. |
| x_Switch | BOOL | Switch for selecting the input value. FALSE selects InValue_1, TRUE selects InValue_2. |
| r_InValue_1 | REAL | First input value that can be selected. |
| r_InValue_2 | REAL | Second input value that can be selected. |
| t_Time_1 | TIME | Time constant for the PT1 transfer element when InValue_1 is selected. |
| t_Time_2 | TIME | Time constant for the PT1 transfer element when InValue_2 is selected. |
| r_Multiplier | REAL | Proportional or gain factor for the PT1 transfer element. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| r_OutValue | REAL | Output value after processing through the PT1 transfer element. |
| x_Active | BOOL | Indicates whether the function block is active. |
| x_Busy | BOOL | Indicates that a value transfer is active when the absolute difference between the output and input values is greater than 0.25. |
| x_Done | BOOL | Indicates that the target value has been reached when x_Switch is active, and the difference between the output and input values is less than or equal to 0.25. |
Ein-/Ausgänge
| none |

TB_Select_PT1
The function block TB_Select_PT1 is used to select between two input values (r_InValue_1 and r_InValue_2) based on the switch x_Switch. When x_Switch is set to FALSE, the value of r_InValue_1 is selected; otherwise, the value of r_InValue_2 is selected. The selected value is then processed through a PT1 transfer element with time constants t_Time_1 or t_Time_2 (depending on the selection) and the gain factor r_Multiplier.
The function block monitors the value transfer and sets the status signals x_Busy and x_Done accordingly. When the transfer is active (i.e., the difference between the output and input values is greater than 0.25), x_Busy is set to TRUE. When the target value is reached (i.e., x_Switch is active, and the difference between the output and input values is less than or equal to 0.25), x_Done is set to TRUE.
The function block can be enabled or disabled with the input x_Enable. When x_Enable is set to FALSE, all outputs are reset, and the function block is inactive.
Note: If the value of r_Multiplier is less than or equal to 0, the gain factor is set to 1 to ensure correct functionality.
Empfohlene Task: Cyclic/Event
Verwendete Bibliotheken: none
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | Toggles the function block on or off. When set to FALSE, all outputs are reset. |
| x_Switch | BOOL | Switch for selecting the input value. FALSE selects InValue_1, TRUE selects InValue_2. |
| r_InValue_1 | REAL | First input value that can be selected. |
| r_InValue_2 | REAL | Second input value that can be selected. |
| t_Time_1 | TIME | Time constant for the PT1 transfer element when InValue_1 is selected. |
| t_Time_2 | TIME | Time constant for the PT1 transfer element when InValue_2 is selected. |
| r_Multiplier | REAL | Proportional or gain factor for the PT1 transfer element. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| r_OutValue | REAL | Output value after processing through the PT1 transfer element. |
| x_Active | BOOL | Indicates whether the function block is active. |
| x_Busy | BOOL | Indicates that a value transfer is active when the absolute difference between the output and input values is greater than 0.25. |
| x_Done | BOOL | Indicates that the target value has been reached when x_Switch is active, and the difference between the output and input values is less than or equal to 0.25. |
Ein-/Ausgänge
| none |

TB_ShiftReg
TB_ShiftReg makes available a shift register with which product tracking can be implemented. Four DINT variables can be shifted. The shift register can contain up to 256 slots.
When x_Enable = TRUE, the module is activated. All data is deleted here (set to 0). Successful activation is signaled with TRUE at the x_Active output. From this point, data records can be saved and read. A data record consists of one to four data words.
Saving data:
The data record active at di_InVal0..3 is saved with the positive edge at input x_Put at position us_Position. If the data record was accepted, this is reported with TRUE at the x_PutDone output for one cycle.
Reading data:
With a positive edge at input x_Get, the data record at position us_Position is output at di_OutVal0..3. Successful output is indicated with TRUE at the x_GetDone output for one cycle.
Deleting FIFO:
With a positive edge at the x_Clock input, all data records are shifted to the next position.
Acknowledging errors:
When the enable is cancelled (x_Enable = FALSE), the shift register is deleted and all saved data records are deleted.
Empfohlene Task: Event / Cyclic
Verwendete Bibliotheken: -
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: Enabling of the module and deleting of the shift register. Successful enabling is indicated at x_Active. |
| x_Get | BOOL | With the positive edge, the data record at position us_Position is output at di_OutVal0..3. Successful output is indicated at x_PutDone. |
| x_Put | BOOL | With the positive edge, the data record at di_InVal0..3 is accepted at the us_Position position. Successful acceptance is indicated at x_PutDone. |
| di_InVal0 | DINT | First data word of the data record entered in the FIFO. |
| di_InVal1 | DINT | Second data word of the data record entered in the FIFO. |
| di_InVal2 | DINT | Third data word of the data record entered in the FIFO. |
| di_InVal3 | DINT | Fourth data word of the data record entered in the FIFO. |
| us_Position | USINT | Writing/reading position. |
| x_Clock | BOOL | With a positive edge, all slots are shifted by one position. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module active. Data records can be written and read. |
| x_GetDone | BOOL | TRUE: Indicates that the data output at di_OutVal0..3 is valid for one cycle. |
| x_PutDone | BOOL | TRUE: Indicates that the data active at di_InVal0..3 is accepted for one cycle. |
| di_OutVal0 | DINT | First data word of the data record read out of the shift register. |
| di_OutVal1 | DINT | Second data word of the data record read out of the shift register. |
| di_OutVal2 | DINT | Third data word of the data record read out of the shift register. |
| di_OutVal3 | DINT | Fourth data word of the data record read out of the shift register. |
Ein-/Ausgänge
| none |

TB_ShiftReg
TB_ShiftReg makes available a shift register with which product tracking can be implemented. Four DINT variables can be shifted. The shift register can contain up to 256 slots.
When x_Enable = TRUE, the module is activated. All data is deleted here (set to 0). Successful activation is signaled with TRUE at the x_Active output. From this point, data records can be saved and read. A data record consists of one to four data words.
Saving data:
The data record active at di_InVal0..3 is saved with the positive edge at input x_Put at position us_Position. If the data record was accepted, this is reported with TRUE at the x_PutDone output for one cycle.
Reading data:
With a positive edge at input x_Get, the data record at position us_Position is output at di_OutVal0..3. Successful output is indicated with TRUE at the x_GetDone output for one cycle.
Deleting FIFO:
With a positive edge at the x_Clock input, all data records are shifted to the next position.
Acknowledging errors:
When the enable is cancelled (x_Enable = FALSE), the shift register is deleted and all saved data records are deleted.
Empfohlene Task: Event / Cyclic
Verwendete Bibliotheken: -
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: Enabling of the module and deleting of the shift register. Successful enabling is indicated at x_Active. |
| x_Get | BOOL | With the positive edge, the data record at position us_Position is output at di_OutVal0..3. Successful output is indicated at x_PutDone. |
| x_Put | BOOL | With the positive edge, the data record at di_InVal0..3 is accepted at the us_Position position. Successful acceptance is indicated at x_PutDone. |
| di_InVal0 | DINT | First data word of the data record entered in the FIFO. |
| di_InVal1 | DINT | Second data word of the data record entered in the FIFO. |
| di_InVal2 | DINT | Third data word of the data record entered in the FIFO. |
| di_InVal3 | DINT | Fourth data word of the data record entered in the FIFO. |
| us_Position | USINT | Writing/reading position. |
| x_Clock | BOOL | With a positive edge, all slots are shifted by one position. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module active. Data records can be written and read. |
| x_GetDone | BOOL | TRUE: Indicates that the data output at di_OutVal0..3 is valid for one cycle. |
| x_PutDone | BOOL | TRUE: Indicates that the data active at di_InVal0..3 is accepted for one cycle. |
| di_OutVal0 | DINT | First data word of the data record read out of the shift register. |
| di_OutVal1 | DINT | Second data word of the data record read out of the shift register. |
| di_OutVal2 | DINT | Third data word of the data record read out of the shift register. |
| di_OutVal3 | DINT | Fourth data word of the data record read out of the shift register. |
Ein-/Ausgänge
| none |

TB_SlipCtrl
In feeding systems, e.g. film feeding, slipping can occur due to faulty friction. This slippage is compensated for using the TB_SlipCtrl function module. For this purpose the actual velocity value of the encoder of the feed motor is compared to the actual velocity value of an additional encoder, which is situated directly on the material, e.g. film, via an encoder wheel.
Due to the highly suited control algorithm, it is possible to compensate for slippage up to approx. 50%. This occurs without any persistent control deviation.
The maximum influence regarding velocity can be limited with di_CtrlLim. Using the di_SlipPerc output, the current slippage can be monitored and, if necessary, responded to if the slippage is excessive, e.g. torn film or material backup.
The figure below shows how the function block behaves when the material speed (e.g. encoder wheel) is slower than the feed.
Then the di_Vel output is compensated in that its value is increased by the same amount, so that the material feed remains constant.
Empfohlene Task: Event
Verwendete Bibliotheken: ARITHMETIC_xxbd00 or greater
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE:Activation of slippage control, output of the corrected velocity setpoint di_Vel = di_SetVel + correction. FALSE:Deactivation of slippage control; di_Vel = di_SetVel is output Control can be activated and deactivated any time during operation/while the drive is running. |
| di_SetVel | DINT | Velocity setpoint of the feed drive. The units of di_SetVel and di_ActVel must be the same. This is generally user units/Ts or e.g. 1/100th user units/Ts for upstream technology modules. Ts is the cycle time of the setpoint event task. |
| di_ActVel | DINT | Velocity actual value of additional encoder. The units of di_SetVel and di_ActVel must be the same. This is generally user units/Ts or e.g. 1/100th user units/Ts for upstream technology modules. Ts is the cycle time of the setpoint event task. |
| di_CtrlLim | DINT | Limit of velocity correction value in percent. If this input is not used, the default value 50 (%) is in effect, i.e. di_Vel is thus max. di_SetVel * 1.5. |
| i_Kp | INT | Proportional increase in slippage control. If the input is not used, the default value of 1 is in effect. The optimum value for Kp is 1. |
| u_SmoothNum | UINT | Smoothing of compensation. The value corresponds to the number of values over which smoothing occurs. If the input is not used, the default value of 20 is in effect, i.e. smoothing occurs over 20 values. |
| i_T_Cycle | INT | Call interval of the event task in which TB_SlipCtrl is called up; in ms. Valid values are 1 ms, 2 ms, 4 ms and 8 ms. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE:Slippage control active. FALSE:Slippage control not active. |
| di_Vel | DINT | Corrected setpoint velocity in the same unit as di_SetVel and di_ActVel! Ts is the cycle time of the setpoint event task. |
| di_SlipPerc | DINT | Current slippage in percent. Value used for display and/or monitoring. |
| di_CompPerc | DINT | Current compensation in percent. Value used for display and/or monitoring. |
| di_SlipUnits | DINT | Current slippage in units or 1/xth units. Value used for display, monitoring or as a measurement value for optimization. |
Ein-/Ausgänge
| none |

TB_SlipCtrl
In feeding systems, e.g. film feeding, slipping can occur due to faulty friction. This slippage is compensated for using the TB_SlipCtrl function module. For this purpose the actual velocity value of the encoder of the feed motor is compared to the actual velocity value of an additional encoder, which is situated directly on the material, e.g. film, via an encoder wheel.
Due to the highly suited control algorithm, it is possible to compensate for slippage up to approx. 50%. This occurs without any persistent control deviation.
The maximum influence regarding velocity can be limited with di_CtrlLim. Using the di_SlipPerc output, the current slippage can be monitored and, if necessary, responded to if the slippage is excessive, e.g. torn film or material backup.
The figure below shows how the function block behaves when the material speed (e.g. encoder wheel) is slower than the feed.
Then the di_Vel output is compensated in that its value is increased by the same amount, so that the material feed remains constant.
Empfohlene Task: Event
Verwendete Bibliotheken: ARITHMETIC_xxbd00 or greater
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE:Activation of slippage control, output of the corrected velocity setpoint di_Vel = di_SetVel + correction. FALSE:Deactivation of slippage control; di_Vel = di_SetVel is output Control can be activated and deactivated any time during operation/while the drive is running. |
| di_SetVel | DINT | Velocity setpoint of the feed drive. The units of di_SetVel and di_ActVel must be the same. This is generally user units/Ts or e.g. 1/100th user units/Ts for upstream technology modules. Ts is the cycle time of the setpoint event task. |
| di_ActVel | DINT | Velocity actual value of additional encoder. The units of di_SetVel and di_ActVel must be the same. This is generally user units/Ts or e.g. 1/100th user units/Ts for upstream technology modules. Ts is the cycle time of the setpoint event task. |
| di_CtrlLim | DINT | Limit of velocity correction value in percent. If this input is not used, the default value 50 (%) is in effect, i.e. di_Vel is thus max. di_SetVel * 1.5. |
| i_Kp | INT | Proportional increase in slippage control. If the input is not used, the default value of 1 is in effect. The optimum value for Kp is 1. |
| u_SmoothNum | UINT | Smoothing of compensation. The value corresponds to the number of values over which smoothing occurs. If the input is not used, the default value of 20 is in effect, i.e. smoothing occurs over 20 values. |
| i_T_Cycle | INT | Call interval of the event task in which TB_SlipCtrl is called up; in ms. Valid values are 1 ms, 2 ms, 4 ms and 8 ms. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE:Slippage control active. FALSE:Slippage control not active. |
| di_Vel | DINT | Corrected setpoint velocity in the same unit as di_SetVel and di_ActVel! Ts is the cycle time of the setpoint event task. |
| di_SlipPerc | DINT | Current slippage in percent. Value used for display and/or monitoring. |
| di_CompPerc | DINT | Current compensation in percent. Value used for display and/or monitoring. |
| di_SlipUnits | DINT | Current slippage in units or 1/xth units. Value used for display, monitoring or as a measurement value for optimization. |
Ein-/Ausgänge
| none |

TB_StateMonitor_IAX
This block can be used to monitor and log the states of a state machine (CASE) in a POU
Eingänge
| Marking: | Datatype: | Description: |
|---|---|---|
| ud_TimeInState | UDINT | This input receives the timeout time value in ms, which a state can stay in until the output x_Timeout is set. If the value is 0, no timeout monitoring is carried out. |
| i_State | INT | The state of the state machine is linked here. |
| s_State | STRING | The state name can be specified here. |
| s_POU_Name | STRING | This input is relevant for user logging. So that you can differentiate in the logging entries when using multiple FB instances, where the logging entry comes from, it can be assigned to a POU. |
| x_EnableUsrLog | BOOL | This activates the user logging described above on the PCC. (see general description) |
Ausgänge
| Marking: | Datatype: | Description: |
|---|---|---|
| x_Timeout | BOOL | Is set as soon as the state has exceeded the limit that can be parameterized with the "ud_TimeInState" input in milliseconds |
| ud_TimeInState | UDINT | Displays the time currently spent in the state in ms |
| i_CurrentIndex | INT | The currently used index of the _StatusTrace array is specified here. |
Ein-/Ausgänge
| Marking: | Datatype: | Description: |
|---|---|---|
| _StatusTrace | STATE_TRACE_DATA_ARRAY (in TECH_TYPES) | This array has a size of 128 fields and the following logging entries of the individual states are recorded here: » i_State: The state in which was logged » s_State: The name of the state as STIRNG » ud_TimeInState: The milliseconds spent in this state |
TB_StateMonitor_IAX
This block can be used to monitor and log the states of a state machine (CASE) in a POU
Eingänge
| Marking: | Datatype: | Description: |
|---|---|---|
| ud_TimeInState | UDINT | This input receives the timeout time value in ms, which a state can stay in until the output x_Timeout is set. If the value is 0, no timeout monitoring is carried out. |
| i_State | INT | The state of the state machine is linked here. |
| s_State | STRING | The state name can be specified here. |
| s_POU_Name | STRING | This input is relevant for user logging. So that you can differentiate in the logging entries when using multiple FB instances, where the logging entry comes from, it can be assigned to a POU. |
| x_EnableUsrLog | BOOL | This activates the user logging described above on the PCC. (see general description) |
Ausgänge
| Marking: | Datatype: | Description: |
|---|---|---|
| x_Timeout | BOOL | Is set as soon as the state has exceeded the limit that can be parameterized with the "ud_TimeInState" input in milliseconds |
| ud_TimeInState | UDINT | Displays the time currently spent in the state in ms |
| i_CurrentIndex | INT | The currently used index of the _StatusTrace array is specified here. |
Ein-/Ausgänge
| Marking: | Datatype: | Description: |
|---|---|---|
| _StatusTrace | STATE_TRACE_DATA_ARRAY (in TECH_TYPES) | This array has a size of 128 fields and the following logging entries of the individual states are recorded here: » i_State: The state in which was logged » s_State: The name of the state as STIRNG » ud_TimeInState: The milliseconds spent in this state |
TB_SyncCam_Init
With this module, the synchronous movement of the TB_SyncLin und TB_SyncRot technology modules can be replaced. By default, a straight line is used so that the axis moves in sync with the master with regard to both angle and velocity.
The following conditions are to be complied with for user synchronization cams.
-The slope at the beginning and end must be the same.
-The curve at the beginning and end must be zero.
-The cam must consist of 512 data points
The cam must be normalized to 0 to 16,777,216 in the x- and y-directions.
x-direction:
512 data points for the x-positions [0]0, [1]32,768, [2]65,536, …, [511]16,744,448 are specified, and the accompanying y-value is saved in the _SyncCam table. The x-value is not saved.
y-direction:
The y-value for the first x-position is _SyncCam[0] = 0. The value is always 0. The last value of the cam would be the 513th value, i.e. _SyncCam[512] = 16,777,216. Since the cam is only defined up to _SyncCam[511], however, the points are to be normalized in such a way that the 513th value is 16,777,216. For a simple straight line, _SyncCam[511] is thus 16,744,448.
When using the user synchronization cam, note that the SEP may occur at the earliest at the end of the user synchronization cam, as otherwise a jerk or impact could result upon reversing. The movement after the user synchronization cam up to the SEP occurs with a straight line.
Empfohlene Task: Cyclic, one-time execution during program start or change of cam
Verwendete Bibliotheken: TECH_TYPES_xxbd05 or greater
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: The user synchronization cam is initialized and prepared for use with TB_SyncRot and TB_SyncLin. |
| di_SX_Cam | DINT | Scale of the normalized cam in x-direction in user master units. |
| di_SY_Cam | DINT | Scale of the normalized cam in y-direction in user units. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Ok | BOOL | TRUE: User synchronization cam available. |
| i_Result | INT | Message number of the module. See error table. |
| s_ResTxt | STRING | Message text of the module. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| _SyncCam | CAM_POINTS | Data points of the normalized user synchronization cam. |
| _SyncDat | TB_SYNC_TYPE | Initialization parameter for the TB_SyncRot and TB_SyncLin modules. |

TB_SyncCam_Init
With this module, the synchronous movement of the TB_SyncLin und TB_SyncRot technology modules can be replaced. By default, a straight line is used so that the axis moves in sync with the master with regard to both angle and velocity.
The following conditions are to be complied with for user synchronization cams.
-The slope at the beginning and end must be the same.
-The curve at the beginning and end must be zero.
-The cam must consist of 512 data points
The cam must be normalized to 0 to 16,777,216 in the x- and y-directions.
x-direction:
512 data points for the x-positions [0]0, [1]32,768, [2]65,536, …, [511]16,744,448 are specified, and the accompanying y-value is saved in the _SyncCam table. The x-value is not saved.
y-direction:
The y-value for the first x-position is _SyncCam[0] = 0. The value is always 0. The last value of the cam would be the 513th value, i.e. _SyncCam[512] = 16,777,216. Since the cam is only defined up to _SyncCam[511], however, the points are to be normalized in such a way that the 513th value is 16,777,216. For a simple straight line, _SyncCam[511] is thus 16,744,448.
When using the user synchronization cam, note that the SEP may occur at the earliest at the end of the user synchronization cam, as otherwise a jerk or impact could result upon reversing. The movement after the user synchronization cam up to the SEP occurs with a straight line.
Empfohlene Task: Cyclic, one-time execution during program start or change of cam
Verwendete Bibliotheken: TECH_TYPES_xxbd05 or greater
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: The user synchronization cam is initialized and prepared for use with TB_SyncRot and TB_SyncLin. |
| di_SX_Cam | DINT | Scale of the normalized cam in x-direction in user master units. |
| di_SY_Cam | DINT | Scale of the normalized cam in y-direction in user units. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Ok | BOOL | TRUE: User synchronization cam available. |
| i_Result | INT | Message number of the module. See error table. |
| s_ResTxt | STRING | Message text of the module. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| _SyncCam | CAM_POINTS | Data points of the normalized user synchronization cam. |
| _SyncDat | TB_SYNC_TYPE | Initialization parameter for the TB_SyncRot and TB_SyncLin modules. |

TB_TimeToTravel
To compensate for or pre-control dead times, it is necessary to calculate the path covered by an axis during a specified time in advance. The TB_TimeToTravel function calculates this path (UDINT type). In conjunction with the TB_MasterEngine function module, the path can also be calculated exactly during the acceleration and braking phases.
The function calculates the travel range in units covered by an axis during a specified time.
Real master axis:
If a real master axis is used, for example, only the current velocity is available. Since no information on the duration of the acceleration is available, the calculation is only precise for constant operation; an error occurs during acceleration. Only the di_VelAct_s input can be connected.
Virtual master axis:
Since the velocity to be reached and the level and duration of acceleration are known when a virtual master axis is used (TB_MasterEngine function module), calculation of the travel range occurs without incident. All inputs must be used; they are available at the TB_MasterEngine function module.
Empfohlene Task: Event
Verwendete Bibliotheken: -
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| u_Time_ms | UINT | Time in ms for which the path is calculated in units. Maximum times up to 5,000 ms are possible. If a larger value is connected, it is limited to 5,000 ms internally. |
| ud_TimeAcc_ms | UDINT | Remaining acceleration time of the virtual master in ms (TB_MasterEngine function module output). |
| di_VelSet_s | DINT | Setpoint velocity of the virtual master in units/s (TB_MasterEngine function module output). |
| di_VelAct_s | DINT | Actual velocity of the real or virtual master in units/s (TB_MasterEngine function module output). |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| TB_TimeToTravel | DINT | Calculated path in units covered by the axis in the specified time u_Time_ms. |
Ein-/Ausgänge
| none |

TB_TimeToTravel
To compensate for or pre-control dead times, it is necessary to calculate the path covered by an axis during a specified time in advance. The TB_TimeToTravel function calculates this path (UDINT type). In conjunction with the TB_MasterEngine function module, the path can also be calculated exactly during the acceleration and braking phases.
The function calculates the travel range in units covered by an axis during a specified time.
Real master axis:
If a real master axis is used, for example, only the current velocity is available. Since no information on the duration of the acceleration is available, the calculation is only precise for constant operation; an error occurs during acceleration. Only the di_VelAct_s input can be connected.
Virtual master axis:
Since the velocity to be reached and the level and duration of acceleration are known when a virtual master axis is used (TB_MasterEngine function module), calculation of the travel range occurs without incident. All inputs must be used; they are available at the TB_MasterEngine function module.
Empfohlene Task: Event
Verwendete Bibliotheken: -
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| u_Time_ms | UINT | Time in ms for which the path is calculated in units. Maximum times up to 5,000 ms are possible. If a larger value is connected, it is limited to 5,000 ms internally. |
| ud_TimeAcc_ms | UDINT | Remaining acceleration time of the virtual master in ms (TB_MasterEngine function module output). |
| di_VelSet_s | DINT | Setpoint velocity of the virtual master in units/s (TB_MasterEngine function module output). |
| di_VelAct_s | DINT | Actual velocity of the real or virtual master in units/s (TB_MasterEngine function module output). |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| TB_TimeToTravel | DINT | Calculated path in units covered by the axis in the specified time u_Time_ms. |
Ein-/Ausgänge
| none |

XAND
The function XAND performs a logical OR-AND operation on the operands associated with the two input signals, IN1 and IN2.
The output signal will be in the "1" state (high) if either the first and second input signals both have the "1" state or both input signals have the "0" state. Otherwise, the output will be in the "0" state (low).
Empfohlene Task: Cyclic/Event
Verwendete Bibliotheken: none
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| IN1 | BOOL | First input value. |
| IN2 | BOOL | Second input value. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| OUT | BOOL | Output value. |
Ein-/Ausgänge
| none |

XAND
The function XAND performs a logical OR-AND operation on the operands associated with the two input signals, IN1 and IN2.
The output signal will be in the "1" state (high) if either the first and second input signals both have the "1" state or both input signals have the "0" state. Otherwise, the output will be in the "0" state (low).
Empfohlene Task: Cyclic/Event
Verwendete Bibliotheken: none
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| IN1 | BOOL | First input value. |
| IN2 | BOOL | Second input value. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| OUT | BOOL | Output value. |
Ein-/Ausgänge
| none |
