Digital Switch Points
CODESYS SoftMotion provides various options for creating digital switch points. This section provides an overview of the respective advantages and disadvantages.
Application example
Digital switch points are required, for example, to switch on a glue gun depending on the axis position. In the following example, the glue gun should apply adhesive to a product from position 90 to position 120.

A glue gun has a delay between switching on and applying glue. The same applies to switching off. An on/off compensation is therefore required so that the glue gun is switched on 50 ms before position 90 and switched off 50 ms before position 120.

Overview of function blocks
Function Block | Multiple switch points | On/Off Compensation | Forecast | High Precision (time resolution higher than cycle time) | Data Basis | Note |
---|---|---|---|---|---|---|
|
|
| Set position or actual position | Useful when higher time precision is required. In addition to this function block, a high-precision digital output card is required for high-precision operation. This combination makes it possible to switch outputs with high time precision even at higher cycle times. For more information about using the function block, see the following: example Using MC_DigitalCamSwitch_HighPrecision. | ||
|
| Set position or actual position | Useful if a separate version of the | |||
|
| Set position or actual position | Useful if a cycle-precise time resolution is sufficient. | |||
| Set position or actual position | These function blocks are retained for reasons of compatibility only. For current and future projects, the other more advanced function blocks should be used. | ||||
| Set position or actual position |
1 Exact. The data from the forecast is used.
2 The forecast must be set by means of the SMC_SetForecast
function block. For more information about the forecast, see the following: Forecast.
3 Only by extrapolation