MC_ReadParameter_SML (FB)ΒΆ

FUNCTION_BLOCK FINAL MC_ReadParameter_SML

Reads the value of a SoftMotion or axis specific parameter. For the list of all SoftMotion parameter numbers see Axis_REF_SML. The value of parameters is converted to LREAL.

To read an axis specific parameter, the axis specific parameter number must be negated. For CANOpen based parameter, the axis specific parameter number is built from the object number 16#ABCD (2 Bytes) and the subindex 16#EF (1 Byte): 16#ABCDEF. Example: read object 16#6070, subindex 0: ParameterNumber:= -16#607000.

Note

Axis specific parameters are interpreted as unsigned values and converted to LREAL.

InOut:

Scope

Name

Type

Comment

Inout

Axis

AXIS_REF_SML

Reference to the axis

Input

Enable

BOOL

Get value is updated continuously while enabled

ParameterNumber

DINT

Number of the parameter

Output

Valid

BOOL

The value is valid

Busy

BOOL

The FB is not finished and new output values are to be expected

Error

BOOL

An error occurred

ErrorID

SML_ERROR

The error number

Value

LREAL

The value of the parameter, converted to LREAL