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
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