
3-33
3 Operation and Configuration
CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
3-5 Outp
ut Con
tr
o
l
3
3-5-2 C
o
mpar
ison Mode
z
Specifying Comparison Data
In Comparison Mode every Counter can be assigned up to a maximum of 32 Comparison data. A
comparison data item contains 5 double words:
• Comparison Value (CV) (can be set between
−
2,147,483,648 and 2,147,483,647 for a Linear
Counter and between 0 and 4,294,967,295 for a Circular Counter)
• Output Set Pattern for the positive counting direction (+Set Pattern CV'n'), specifying which Out-
puts must be Set on reaching that CV in the positive counting direction (0 = No Change, 1 = Set
Output)
• Output Reset Pattern for the positive counting direction (+Reset Pattern CV'n'), specifying which
Outputs must be Reset on reaching that CV in the positive counting direction (0 = No Change, 1 =
Reset Output)
• Output Set Pattern for the negative counting direction (
−
Set Pattern CV'n'), specifying which Out-
puts must be Set on reaching that CV in the negative counting direction (0 = No Change, 1 = Set
Output)
• Output Reset Pattern for the negative counting direction (
−
Reset Pattern CV'n'), specifying
which Outputs must be Reset on reaching that CV in the negative counting direction (0 = No
Change, 1 = Reset Output)
To configure a Counter in Comparison Mode for every Comparison Value that you want to use the
comparison data must be set. Each data-item is specified using the structure data type shown next.
In order to use structure data types for comparison data, register the structure data type for High-
speed Counter Units beforehand on the CPU/Expansion Racks screen in Configuration and Setup
of Sysmac Studio. For the exact memory location of the CV-Data, refer to 4-2-1 Memory Mapping.
Configuration and Operation in Comparison Mode
Counter
setting
Structure data type
name
Member
Name
Data type
Function
Linear
Counter
_sCJCT021_Ex_CmpLin
CmpVal
Comparison
Value
DINT
The target value set for compari-
son
AddSetPat
+Set Pattern
DWORD
Output pattern setting when com-
parison conditions are met
Bit 00: Digital Output 0
Bit 01: Digital Output 1
Bit 02 to 31: Internal output 2 to
31
AddRstPat
+Reset Pattern
DWORD
SubSetPat
−
Set Pattern
DWORD
SubRstPat
−
Reset Pattern
DWORD
Circular
Counter
_sCJCT021_Ex_CmpRing CmpVal
Comparison
Value
UDINT
The target value set for compari-
son
AddSetPat
+Set Pattern
DWORD
Output pattern setting when com-
parison conditions are met
Bit 00: Digital Output 0
Bit 01: Digital Output 1
Bit 02 to 31: Internal output 2 to
31
AddRstPat
+Reset Pattern
DWORD
SubSetPat
−
Set Pattern
DWORD
SubRstPat
−
Reset Pattern
DWORD
Содержание CJ1W-CT021
Страница 10: ...Manual Structure 8 CJ series High speed Counter Units Operation Manual for NJ series CPU Unit W492...
Страница 38: ...Revision History 36 CJ series High speed Counter Units Operation Manual for NJ series CPU Unit W492...
Страница 190: ...Appendicies A 18 CJ series High speed Counter Units Operation Manual for NJ series CPU Unit W492...
Страница 191: ...Index 1 CJ series High speed Counter Units Operation Manual for NJ series CPU Unit W492 I Index...
Страница 194: ...Index 4 CJ series High speed Counter Units Operation Manual for NJ series CPU Unit W492 Index...
Страница 195: ......