TB_Detect_Rd

Darstellung in FBD

General Information

The function block detects the position and delivers a puls per each round of motor. The detection starts when the fb is enabled. As startposition is the actual position set at the moment when the is enabled.


If the motors stops it has to be send to the fb via the input "x_Stand_Still".

Recommended Task: EVENT
Libraries used: none

InOut Parameter

none

Input Parameter

Marking: Data type: Description:
x_Enable BOOL FALSE: disable the fb TRUE: enable the fb and set the actual position as start position for a complete turn.
x_Direction BOOL FALSE: drive turns in positive direction (positive speed) TRUE: drive turns in negative direction (negative speed).
x_Stand_Still BOOL FALSE: drive moves TRUE: drive moves not (speed = 0).
ud_Inc_Res UDINT increments for a complete turn, for example 65535.
ud_Actual_Pos UDINT Actual position value of the drive (for example from 0 to 65535).

Output Parameter

Marking: Data type: Description:
x_Error BOOL LH-edge: a complete turn of the motor was detected.
x_Round_Trig BOOL FALSE: fb has no error TRUE: fb has error, for more informations see "w_Error_Info".
w_Error_info WORD bitcoded detaillled description of the errors, see table.
ud_Round_Pos UDINT rest of the way to a complete turn.
w_Error_Info Description:
Bit 0 increments of a whole turn (ud_Inc_Res) = 0
Bit 15 no technology license at PLC platform