
6.5.2 SFB 47 - COUNT - Counter controlling
The SFB 47 is a specially developed block for compact CPUs for controlling of the coun-
ters. The SFB is to be called with the corresponding instance DB. Here the parameters of
the SFB are stored. With the SFB COUNT (SFB 47) you have following functional
options:
n
Start/Stop the counter via software gate
SW_GATE
n
Enable/control digital output DO
n
Read the status bit
n
Read the actual count and latch value
n
Request to read/write internal counter registers
Name
Data type
Address
(Instance
DB)
Default value
Comment
LADDR
WORD
0.0
300h
This parameter is not evaluated. Always the internal
I/O periphery is addressed.
CHANNEL
INT
2.0
0
Channel number
SW_GATE
BOOL
4.0
FALSE
Enables the Software gate
CTRL_DO
BOOL
4.1
FALSE
Enables the output
False: Standard Digital Output
SET_DO
BOOL
4.2
FALSE
Parameter is not evaluated
JOB_REQ
BOOL
4.3
FALSE
Initiates the job (edge 0-1)
JOB_ID
WORD
6.0
0
Job ID
JOB_VAL
DINT
8.0
0
Value for write jobs
STS_GATE
BOOL
12.0
FALSE
Status of the internal gate
STS_STRT
BOOL
12.1
FALSE
Status of the hardware gate
STS_LTCH
BOOL
12.2
FALSE
Status of the latch input
STS_DO
BOOL
12.3
FALSE
Status of the output
STS_C_DN
BOOL
12.4
FALSE
Status of the down-count
Always indicates the last direction of count. After
the first SFB call
STS_C_DN
is set FALSE.
STS_C_UP
BOOL
12.5
FALSE
Status of the up-count
Always indicates the last direction of count. After
the first SFB call
STS_C_UP
is set TRUE.
COUNTVAL
DINT
14.0
0
Actual count value
LATCHVAL
DINT
18.0
0
Actual latch value
JOB_DONE
BOOL
22.0
TRUE
New job can be started
JOB_ERR
BOOL
22.1
FALSE
Job error
JOB_STAT
WORD
24.0
0
Job error ID
Description
Parameters
VIPA System 300S
+
Deployment I/O periphery
Counter > SFB 47 - COUNT - Counter controlling
HB140 | CPU-SC | 312-5BE23 | en | 18-45
90