MC_StepAbsSwitch

../_images/b92d1f1c9be209770a331390002f3081

Function Block MC_StepAbsSwitch

This Function Block performs a homing function by searching for an absolute positioned external physical switch. (An Absolute Switch has two “Off” (or “On”) areas – see example). For central Motion Control implementation: The signal of the Absolute Switch has to be written to the variable “absRefSwitch” of the data type CMC_AXIS_IO.

Note

Inside the operation area the limit switches have to be logically FALSE and outside the borders the signal of the corresponding limit switch has to be logically TRUE.

If needed the signal from the sensor must be inverted before it is connected to an element the AXIS_IO data type.

../_images/d52d5cc12c0444350a33139001e0b6fc

This physical layout has the risk that homing is started in the wrong direction (escaping the switch). To support such case, it implements a special behavior when Limit Switches are found (or the AbsSwitch itself is “On” at Execute):

  • Axis State is set to Homing,
  • The homing is commanded in the most likely direction were the sensor can be found. In this example (-),
  • The velocity is defined by the input,
  • Both time and distance limits can cause an error if exceeded,
  • If any LimitSwitch is found during Homing (any of them), then a special process is started in the opposite direction, the AbsSwitch is searched to switch off (or “On” depending on SwitchMode setting). The Edge (passed by), and homing process is restarted in the original direction and with the same conditions. This ensures that the end conditions are always same,
  • If the SwitchMode is either MC_SwitchNegative or MC_SwitchPositive, then the special process is also started in opposite direction depending from the switch state at “Execute”,
  • The direction changes only when the specified Velocity is reached (InVelocity),
  • This Function Block does not modify the actual position,
  • This Function Block does not leave the Homing State when done.
  • This Function Block can only be used once for a homing sequence.
../_images/975458e62c04467c0a33139001ccfd32
../_images/fe3981c82c0448600a33139000e71401

An overlapping switch configuration is also possible. This has same the behavior as working on the limit switches:

../_images/de068c4f2c0457ae0a33139001ce4ca9

If the input direction is set to a fixed direction (MC_Positive or MC_Negative), then the initial switch state is ignored (used for example in rotary axis where only one sense of rotation is allowed):

../_images/8c86456a2c045e510a33139001c7323a

Note

With an overlapping switch configuration either MC_EdgeOn or MC_EdgeOff can be used for the input SwitchMode. This depends on the switching behaviour of the absolute switch and the used option for the input Direction.

See the following chapter to check if this Function Block is supported by the used axis implementation: Overview

For this Function Block there is a visualization in the Library MC_Blocks_AC500_V11.

See the following chapter for a list of available data types: Overview