9 encoder (smc_encoder), Encoder (smc_encoder) – Lenze PLC Designer PLC-Designer (R2-x) SoftMotion User Manual

Page 45

Advertising
background image

DMS 5.2 EN 03/2011 TD17

L

45

L-force | PLC Designer - SoftMotion

The SoftMotion drive interface

SM_DriveBasic.lib and automatic code generation

3.2.9

ENCODER (SMC_Encoder)

The control configuration serves to implement and configure encoders into an axis group.

The created data structure of SMC_Encoder_REF type must be processed by an instance of

the SMC_ENCODER POU. This outputs an AXIS_REF data structure which can serve as input

for all other function blocks (e.g. MC_CamIn, MC_GearIn, MC_TouchProbe) as soon as the

bValid output confirms the validity of the data.

Inputs/outputs (VAR_IN_OUT)
encref: SMC_Encoder_REF: VAR_IN_OUT
Pointer to the operating data of the encoder.

Inputs (VAR_INPUT)
dwEncoderValue: DWORD
Actual value of the encoder
bSet: BOOL
Set the value at the EncoderValue input to the SetValue input.
fSetValue: DWORD
Position value to be accepted.

Outputs (VAR_OUTPUT)
bValid: BOOL
TRUE indicates that the data is valid.
bError : BOOL
TRUE indicates that an error has occurred in the function block.
nErrorID: INT
Error number
Axis : AXIS_REF
The POU writes the correspondingly scaled position data of the encoder axis into this axis

data structure.

Advertising