SolarEncoderCD522 (FB)
FUNCTION_BLOCK SolarEncoderCD522 EXTENDS AbbLConCA
Function Block to easily integrate, with the CD522 card, incremental encoders (A, B, Z) as positioning sensors for solar trackers. Configuration -> Devices -> IO Bus -> CD522 -> CD522 IO Mapping -> Map variable for position sensors
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
EnableBOOLFALSE
A rising edge (Enable = TRUE) starts the operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. A falling edge (Enable = FALSE) aborts the operation. During Aborting the Busy is still TRUE. Afterward all outputs are reset.
AbbLConCA
Output
BusyBOOLFALSE
Operation is running (while output Error is FALSE)
AbbLConCA
ErrorBOOLFALSE
Operation is stopped with error (while output Busy is FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE. The output ErrorID gives more details about the error.
AbbLConCA
Input
CounterNumWORD0
2: counter 0 or counter 1 is to be used
EnableCounterBOOLFALSE
3: enabling counter function of the CD522 module
SetStartBOOLFALSE
4: Set current counter value
SetStartValueREAL0
5: 32 bit start counter value
EnableCalibBOOLFALSE
6: enabling calibrating process
EnableSyncBOOLFALSE
7: enabling synchronizing process
MeasuringStepREAL0
8: measuring step
Inout
CounterInARRAY [0..11] OF WORD
9: array of WORD for input of Configuration fast counter
CounterOutARRAY [0..15] OF WORD
10: array of WORD for output of Configuration fast counter
PosActREAL11: 32 bit current position value
ZValueREAL12: position value of the encoder’s reference point (Z).
Output
ErrorIDNO_ERROR
3: error number
RdySetBOOLFALSE
4: ready message of calibrating process
RdyCalibBOOLFALSE
5: ready message of calibrating process
RdySyncBOOLFALSE
6: ready message of synchronizing process
ZPulseBOOLFALSE
7: encoder’s reference position Z reached
Methods:
D_AbortAction
A_StartAction
B_CyclicAction
C_CleaningAction
E_ResetAction
Structure: