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
Enable
BOOL
FALSE
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
Busy
BOOL
FALSE
Operation is running (while output Error is FALSE)
AbbLConCA
Error
BOOL
FALSE
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
CntNum
WORD
0
0 or 1, use of counter 0 or counter 1
EnCnt
BOOL
FALSE
Enable (TRUE) or disable (FALSE) the counter function of the module
EnTouch
BOOL
FALSE
Enable (TRUE) or disable (FALSE) the touch/catch function of the module
EdgeTouch
BOOL
FALSE
Select positive (TRUE) or negative (FALSE) edge for touch
EnRpi
BOOL
FALSE
Enable TRUE) reference point indication function of the module
Reset
BOOL
FALSE
Reset current counter value
SetStart
BOOL
FALSE
Set start counter value
SetEnd
BOOL
FALSE
Set end counter value
StartValue
DINT
0
32 bit start counter value
EndValue
DINT
0
32 bit end counter value
AdrIn
POINTER TO WORD
0
Address of process image input. See ../Structs/CD522In for more information about structure
AdrOut
POINTER TO WORD
0
Address of process image output. See ../Structs/CD522Out for more information about structure
Output
ErrorID
ERROR_ID.NO_ERROR
Error code description
Act
DINT
0
32 bit current counter value
Cf
BOOL
FALSE
Carry Flag is set when end counter value is reached
RdyTouch
BOOL
FALSE
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
RdyRpi
BOOL
FALSE
Set to TRUE when RPI was executed
Ofl
BOOL
FALSE
Set to TRUE when counter overflow (Passing value: 16#80000000)
SetIn
BOOL
FALSE
Set signal detected
ResetIn
BOOL
FALSE
Reset signal detected
CntTouch
DINT
0
32 bit touch counter value