Kendrion Kuhnke Automation GmbH
Counter2, Counter/Posi2
29
17 May 2021
Counter 1 Options
The module provides you with various options of how to operate Counter 1. The module uses control bit
"SetOptions_1" (refer to Counter 1 Control) to set the options which are retained until the settings are
changed the next time.
To set up the module choose the options as appropriate and accept by setting control bit
"SetOptions_1" to a rising edge. The module will confirm by returning
"OptionsSet_1=TRUE". When "SetOptions_1" becomes FALSE, the module responds by sending
"OptionsSet_1=FALSE" to indicate that it is ready for the next setup cycle.
Variable
Data
type
Value Explanation
Enable_Compare_1
BOOL
0
Disables the reference value function
1
Enables the reference value function
SelectEncoder_1
BOOL
0
A, B, Ref and detection of direction
1
Event counter at A
B=0 down
B=1 up
SetResolution_1
BOOL
If SelectEncoder=1 only (event counter)
0
Rising and falling edges
1
Rising edges only
ControlOutput_1
BOOL
0
Output_0_0 is a digital output
1
Reference value function controls
Output_0_0.
OnErrorForceOutputsOff_1
(Release 3 or higher)
BOOL
0
All digital and analogue outputs keep
refreshing after a module error.
1
All digital and analogue outputs turn 0 after a
module error.
Counter 1 Control
The state of the control variables controls when and how counters and references are enabled or disabled.
Set the appropriate variable to start the set and reset functions.
The associated status variable indicates that a function is running.
After a reset of the control variable, the counter module also resets the associated status variable.
Variable
Data type
Valu
e
Explanation
SetOptions_1
BOOL
0/1
Accepts Counter 1 Options
ResetReferenced_1
BOOL
0/1
Resets status bit "Referenced_1"
ResetCompared_1
BOOL
0/1
Resets status bit "Compared_1"
ResetCaptured_1
BOOL
0/1
Resets status bit "Captured_1"
EnableCounter_1
BOOL
0
Counter disabled
1
Counter enabled
EnableReferencing_1
BOOL
0
Referencing disabled
1
Referencing enabled
SetCounter_1
BOOL
0/1
Sets the counter to the preset value
SetCompare_1
BOOL
0/1
Sets the reference value
SetPreset_1
BOOL
0/1
Sets the preset value
SetMax_1
BOOL
0/1
Sets the final counter value