CD522Encoder32Bit (FB)
FUNCTION_BLOCK CD522Encoder32Bit EXTENDS AbbLConCA
Function block to access all IO-Values for the 32-Bit-Counter of CD522. This FB is valid to be used with mode 11, 12 and 13
- 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
CntNumWORD0
0 or 1, use of counter 0 or counter 1
EnCntBOOLFALSE
Enable (TRUE) or disable (FALSE) the counter function of the module
EnTouchBOOLFALSE
Enable (TRUE) or disable (FALSE) the touch/catch function of the module
EdgeTouchBOOLFALSE
Select positive (TRUE) or negative (FALSE) edge for touch
EnRpiBOOLFALSE
Enable TRUE) reference point indication function of the module
ResetBOOLFALSE
Reset current counter value
SetStartBOOLFALSE
Set start counter value
SetEndBOOLFALSE
Set end counter value
StartValueDINT0
32 bit start counter value
EndValueDINT0
32 bit end counter value
AdrInPOINTER TO WORD
0
Address of process image input. See ../Structs/CD522In for more information about structure
AdrOutPOINTER TO WORD
0
Address of process image output. See ../Structs/CD522Out for more information about structure
Output
ErrorIDERROR_ID.NO_ERROR
Error code description
ActDINT0
32 bit current counter value
CfBOOLFALSE
Carry Flag is set when end counter value is reached
RdyTouchBOOLFALSE
Set to TRUE when new touch value is available. To delete RdyTouch set EnTouch to FALSE. To allow a new Touch/Catch, set EnTouch to TRUE again
RdyRpiBOOLFALSE
Set to TRUE when RPI was executed
OflBOOLFALSE
Set to TRUE when counter overflow (Passing value: 16#80000000)
SetInBOOLFALSE
Set signal detected
ResetInBOOLFALSE
Reset signal detected
CntTouchDINT0
32 bit touch counter value