To detect an encoder signal with the Incremental Encoder Input object, the object must be enabled and initialized as described in the following procedure. The object can be coupled to a velocity sink (for example, a logical encoder) in the application.
Initialization of the Encoder Input
Step |
Action |
---|---|
1 |
Set the WorkingMode parameter of the parent bus coupler to real / 1. |
2 |
Perform a Sercos phase up. |
3 |
Set the OutputsActiveSet parameter of the parent bus coupler to on / 1. |
4 |
Optional: Couple the Incremental Encoder Input object to a consuming encoder. |
The full functionality of the encoder input module is enabled as soon as the startup procedure is finished.
Coupling of the Incremental Encoder Input Object and the Logical Encoder
The coupling of the Incremental Encoder Input object can be done with the FC_SetMasterEncoder() SystemInterface function as follows:
diRetSetMasterEnc := FC_SetMasterEncoder(
i_stLEncId := LE_LogicalEncoder.stLogicalAddress,
i_stMasterId := IME_EncIn.stLogicalAddress);
After this call, the logical encoder LE_LogicalEncoder and the Incremental Encoder Input object are coupled via velocity.