CD522FreqScan_PLUS
(FB)
FUNCTION_BLOCK CD522FreqScan_PLUS EXTENDS AbbLConCA
Function block to access all IO-Values for the frequency measurement of CD522. This FB is valid to be used with mode 15. Maximum input frequency 5 kHz.
- 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 (Input Z0 or Z1)
EnCnt
BOOL
FALSE
Enable (TRUE) or disable (FALSE) the function of the module
En0
BOOL
FALSE
Enables low pulse for measurement
En1
BOOL
FALSE
Enables high pulse for measurement
EnFreq
BOOL
FALSE
Enables frequency (TRUE) / time measurement mode (FALSE). Result in Freq/Rpm (TRUE) or Dur (FALSE). Maximum input frequency 5 kHz
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
New
BOOL
FALSE
New value available
Dur
DWORD
0
Duration (Time in micro seconds)
Freq
WORD
0
Frequency
Rpm
DWORD
0
Rotation per minute
WarnHighFreq
BOOL
FALSE
Warning: Frequency is to high ( > 5.2 kHz)