Omron CJ1W-CT021 Operation Manuals page 113

For nj-series cpu unit. high-speed counter units.
Hide thumbs Also See for CJ1W-CT021:
Table of Contents

Advertisement

Configuration and Operation in Comparison Mode
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.
Counter
Structure data type
setting
name
Linear
_sCJCT021_Ex_CmpLin
Counter
Circular
_sCJCT021_Ex_CmpRing CmpVal
Counter
CJ-series High-speed Counter Units Operation Manual for NJ-series CPU Unit(W492)
Member
Name
CmpVal
Comparison
Value
AddSetPat
+Set Pattern
AddRstPat
+Reset Pattern
−Set Pattern
SubSetPat
−Reset Pattern
SubRstPat
Comparison
Value
AddSetPat
+Set Pattern
AddRstPat
+Reset Pattern
−Set Pattern
SubSetPat
−Reset Pattern
SubRstPat
3 Operation and Configuration
Data type
DINT
The target value set for compari-
son
DWORD
Output pattern setting when com-
parison conditions are met
DWORD
Bit 00: Digital Output 0
DWORD
Bit 01: Digital Output 1
DWORD
Bit 02 to 31: Internal output 2 to
31
UDINT
The target value set for compari-
son
DWORD
Output pattern setting when com-
parison conditions are met
DWORD
Bit 00: Digital Output 0
DWORD
Bit 01: Digital Output 1
DWORD
Bit 02 to 31: Internal output 2 to
31
3
Function
3-33

Advertisement

Table of Contents
loading

Table of Contents