Function BlockMC_ReadActPosPLCopen motion icon

Description

The MC_ReadActPos function block reads the actual position of the axis.

MC_ReadActPos

Figure 7-130: MC_ReadActPos

Arguments

For more detail on how inputs and outputs work, refer to PLCopen Function Blocks - General Rules

Input

Enable Description Request to read the axis's actual position
Keeps continuously to read the actual position every PLCClosed"Programmable Logic Controller" A Programmable Logic Controller, PLC, or Programmable Controller is a digital computer used for automation of industrial processes, such as control of machinery on factory assembly lines. Used to synchronize the flow of inputs from (physical) sensors and events with the flow of outputs to actuators and events cycle, as long as the Enable remains high
Data type BOOL
Range 0, 1
Unit N/A
Default
Axis Description Name of a declared instance of the AXIS_REF library function. For more details, About Axis Name and Number)
Data type AXIS_REF
Range [1,256]
Unit N/A
Default

Output

Valid Description Indicates the value at the Position output is available
Data type BOOL
Busy Description Indicates this function block is executing
Data type BOOL
Error Description Indicates an invalid input
Data type BOOL
ErrorID Description Indicates the error if Error output is set to TRUE. See table in PLCopen Function Block ErrorID Output
Data type INT
Position Description Actual position of the axis.
Unit User unit
Data type LREAL

Example

Structured Text

            (* MC_ReadActPos S
            T example *)
Inst_MC_ReadActPos( TRUE, Axis1 );
//Inst_MC_ReadActPos is an instance of MC_ReadActPos function block

ActualPos := Inst_MC_ReadActPos.Position; 
//store Position output into a user defined variable

Ladder Diagram

MC_ReadActPos: LD example

Go back to the top of the page [Top]