SolarEncoderIO (FB)
FUNCTION_BLOCK SolarEncoderIO EXTENDS AbbLConCA
- Function block to easily integrate, with any S500 I/O card, incremental encoders (A, B) plus Inductive sensor (Z) as positioning sensors for solar trackers
Configuration -> Devices -> IO Bus -> DC522 -> DC522 IO Mapping -> Fast counter -> 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
EnableCounterBOOLFALSE
2: Enable the counter function of the module
SetStartBOOLFALSE
3: Set current counter value
SetStartValueREAL0
4: 32 bit start counter value
EnableCalibBOOLFALSE
5: enabling calibrating process
EnableSyncBOOLFALSE
6: enabling synchronizing process
MeasuringStepREAL0.1758
7: Measuring Step
ZPulseBOOLFALSE
8: encoder’s reference position Z reached
Inout
CounterInARRAY [0..9] OF BYTE
9: Array of BYTE for input of Configuration fast counter
CounterOutARRAY [0..17] OF BYTE
10: Array of BYTE for output of Configuration fast counter
PosActREAL11: Current counter 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
Methods:
D_AbortAction
A_StartAction
B_CyclicAction
C_CleaningAction
E_ResetAction
Structure: