MCA_Indexing (FB)
FUNCTION_BLOCK MCA_Indexing
This function block will, upon a rising edge on Execute, do a number of relative or absolute moves, listed in a table (Array of MCA_Pos_Ref).
The function block will position the axis to a complete stop at target position and continue with the next move from the table automatically.
- InOut:
Scope
Name
Type
Comment
Input
ExecuteBOOLStarts the function block at rising edge
pPositionsPOINTER TO MCA_Pos_Ref
POS_REF Reference to Structure or array with relative move distances listed. Typical type of Positions: LREAL, The array needs to have at least (TableIndex + MovesToDo-1) elements
MovesToDoWORDProvide number of moves, not more then entries in Table
TableIndexWORDIndex to an array of MCA_Pos_Ref, points to the movement to be performed on rising edge of Execute, start with 1 for the first entry
Output
DoneBOOLShows the status of the function block. Done = TRUE if the execution is finished
BusyBOOLThe function block is not finished
ActiveBOOLIndicates that the function block has control on the axis
CommandAbortedBOOLCommand is aborted by another command from other PLCopen function block
ErrorBOOLSignals that error has occurred within function block
ErrorIDError identification. For error details refer to Enumeration ERROR_ID
MovesPendingWORDIndicates the number of moves still to execute
IndexNoWORDIndex executing or last index completed, starting with “1”
Inout
AxisReference to axis
Structure: