Samsung MAX-DT96 User manual

NX70/NX700 Series High-Speed Counter Modules
(4CH) (NX70-HSC4 and NX-HSC4)
User Manual
Important User
Information
Solid state equipment has operational characteristics differing from
those of electromechanical equipment. Because of these differences,
and also because of the wide variety of uses for solid state equipment,
all persons responsible for applying this equipment must satisfy
themselves that each intended application of this equipment is
acceptable.
In no event will Rockwell Samsung Automation be responsible or
liable for indirect or consequential damages resulting from the use or
application of this equipment.
The examples and diagrams in this manual are included solely for
illustrative purposes. Because of the many variables and requirements
associated with any particular installation, Rockwell Samsung
Automation cannot assume responsibility or liability for actual use
based on the examples and diagrams.
No patent liability is assumed by Rockwell Samsung Automation. with
respect to use of information, circuits, equipment, or software
described in this manual.
Reproduction of the contents of this manual, in whole or in part,
without written permission of Rockwell Samsung Automation. is
prohibited.
Throughout this manual we use notes to make you aware of safety
considerations.
WARNING
IMPORTANT
ATTENTION
Identifies information about practices or
circumstances which may lead to serious personal
injury or death, property damage, or economic loss.
Identifies information that is critical for successful
application and understanding of the product.
Identifies information about practices or
circumstances that can lead to minor personal injury,
property damage, economic loss, or product
malfunction. However, depending on circumstances,
failure to follow the directions accompanying this
symbol may also lead to serious consequences.
Contents
1. High-Speed Counter Unit (4CH) Specifications .......... 9
Performance Specifications........................................................................... 9
I/O Contact Points......................................................................................... 12
Shared Memory Areas................................................................................. 16
2. High-Speed Counter Unit (4CH) Functions ............... 23
High-Speed Counter Unit (4CH) Functions ................................................ 23
Functions and Usages of High-Speed Counter Unit ................................. 24
Configuration and Limit for High-Speed Counter Unit ............................. 28
Parts and Functions...................................................................................... 30
I/O Specifications and Connector Pin Diagram.......................................... 34
3. Configuration and Design Verification of the Unit .. 37
Slot No. and I/O Number Allocation Verification....................................... 37
Embedded Counter ...................................................................................... 46
4. General I/O Function................................................. 49
General I/O Function .................................................................................... 49
5. Input Time Constant Function.................................. 51
Input Time Constant Function..................................................................... 51
Use Input Time Constant Function ............................................................. 53
6. High-Speed Counter Function .................................. 55
High-Speed Counter Function..................................................................... 55
Count Function Available as Direction Control Mode............................... 60
Count Function Available as Individual Input Mode ................................. 62
Count Function Available as Phase Input Mode........................................ 64
3
7. Comparison Output Function ................................... 67
Comparison Output Function...................................................................... 67
Comparison Output Function with Counter ............................................... 70
Overview ....................................................................................................... 70
Time Chart .................................................................................................... 70
Mode Setting Switch.................................................................................... 71
Shared Memory Setting .............................................................................. 71
8. Interrupt Function .................................................... 75
Interrupt Function......................................................................................... 75
Interrupt Functions (External Input)............................................................ 79
Interrupt Functions (Comparison Coincidence Signal) ............................. 82
9. Sample Program ....................................................... 87
Speed Measuring ......................................................................................... 87
Fixed length Processing............................................................................... 90
Location Control by Absolute Value ........................................................... 95
Location Control by Data Table................................................................. 101
4
Safety Instructions
Please read this manual and the related documentation thoroughly
and familiarize yourself with product information, safety instructions
and other directions before installing, operating, performing
inspections and preventive maintenance. Make sure to follow the
directions correctly to ensure normal operation of the product and
your safety.
WARNING
• If this product is used in a situation that may cause
personal injury and/or significant product damage,
implement safe measures such as use of fault-safe
equipment.
• Do not use this product under any conditions
exposed to explosive gases. It may cause an
explosion.
ATTENTION
• Please fasten cables with terminal bolts.
• Do not use the product under conditions that do not
correct environmental standards.
• Make sure you connect grounding cables.
• Do not touch terminals when electric current is
flowing.
5
Installation Environment
ATTENTION
Do not install your HSC unit if any of the following
conditions are present:
• Ambient temperature outside the range of 0 to 55 ° C
(32 to 131 °F).
• Direct sunlight.
• Humidity outside the range of 30% to 85%
(non-condensing).
• Chemicals that may affect electronic parts.
• Excessive or conductive dust, or salinity.
• High voltage, strong magnetic fields, or strong
electromagnetic influences.
• Direct impact and excessive vibration.
ATTENTION
Precautions for Electrostatic
This unit may have excessive static in dry places.
Please make sure to discharge electrostatic charges by
touching a grounded metal bar before contacting the
unit.
ATTENTION
Cleansing
Never use chemicals such as thinner because they
melt, deform or discolor PCB boards
6
Compatibility Between High-Speed Counter Unit
(1CH or 2CH) and High-Performance High-Speed Counter
Unit (4CH)
• No compatibility of hardware and software
• Incompatible ladder program
Comparison between High-speed Counter Unit
(1CH or 2CH) and High-Performance High-speed Counter
Unit (4CH)
High-Speed Counter Unit
Item
Number of
channels
Highspeed
Counter
function
Max. counting
speed
NX700 (NX-HSC2)
NX700 (NX-HSC1)
N700 (CPL7620A)
NX70 (NX70-HSC1)
NX70 (NX70-HSC2)
1CH
2CH
N700 (CPL7621)
Max. 100KHz
Signed 24-bit binary
(-16,777,216 to +16,777,215)
Counting range
Min. input pulse
width
5 µs
Comparison
output
2 points, (C=P, C>P)
Input time constant function
Interrupt function
High-Performance High-Speed
Counter Unit
NX700 (NX-HSC4)
NX70 (NX70-HSC4)
4CH
Max. 200KHz
Signed 32-bit binary
(-2,147,483,648 to +2,147,483,647)
2.5 µs
4 points,
(C=P, C>P) x 2
8 points, Any settings available for
8 target values
N/A
4 µs, 8 µs, 16 µs, 32 µs(2 input unit
setting)
N/A
Max. 8 points per one unit, Interrupt
program is available at following
conditions.
Coincide with target value of HSC
External input
NOTE High-Performance counter unit (4CH) is available for following modules (models).
•
NX700 CPU Module: NX-CPU750A, NX-CPU750B, NX-CPU750C, NX-CPU750D
•
NX70 CPU Module: NX70-CPU750
Reference Manuals
NX70 System Manual
Included in the package box of NX70 CPU module (NX70-CPU750).
NX700 System Manual
Included in the package box of NX700 CPU module (NX-CPU750A,
CPU750B, CPU750C, and CPU750D).
Programming Manual II (for N700a, N700H, N700 PLC).
Included in the package box of NX700 PLC and NX700 CPU module
(NX-CPU750A, CPU750B, CPU750C, CPU750D) and NX70 CPU module
(NX-70 CPU750).
WinFPST Software User Manual
Click “HELP” on the WinFPST S/W screen or contact your local
distributor.
7
8
1
High-Speed Counter Unit (4CH)
Specifications
Performance Specifications
General Specifications
Item
Temperature
Humidity
Specifications
Operating
0 ° C to +55 ° C (32 ° F to 131 ° F)
Storage
-25 ° C to +70 ° C (-13 ° F to 158 ° F)
Operating
30 to 85% RH (Non-condensing)
Storage
30 to 85% RH (Non-condensing)
Withstand voltage
500V ac for 1 minute, between each pin <-> groundings of external connectors
(Except F and E terminals) (F and E terminals: connector shield cables)
Insulation resistance
100 MΩ or more at 500 mega V DC between each pin <-> groundings of external
connectors
(Except F and E terminals) (F and E terminals: connector shield cables)
Vibration immunity
10 to 55 Hz, 1 cycle/minute: double amplitude of 0.75 mm, 10 minutes on 3 axis
(X, Y, Z)
Shock immunity
Peak acceleration and duration 98 m/s2 or more, 4 times for each X, Y, Z direction
Noise immunity
1500Vp-p with 50ns to 1 µs pulse width (generated by noise simulator)
Ambience
No corrosive gas, no excessive dust
9
I/O Specification
Common Specifications
Item
High-speed counter unit (NX-HSC4, NX70-HSC4)
Occupied I/O points
Input 32 points, output 32 points (32SX, 32SY)
Internal Current Consumption
500 mA or less (5V DC)
Operation Indicator
32 point LED (Lit when ON)
External connection method
Connector (One MIL standard 40P connector)
Weight
Approx. 130g
Input Specifications
Item
Input
High-speed counter unit (NX-HSC4, NX70-HSC4)
Isolation method
Photocoupler
Rated input voltage
24V DC
Rated input current
Approx. 7.5 mA (at 24V DC)
Input impedance
Approx. 3.2 KΩ
Voltage range
20.4V DC to 26.4V DC
Min. ON voltage/current
19.2V DC/6 mA
Max. OFF voltage/current
5.0V DC/1.5 mA
Response
time *1
Counter
Interrupt
OFF →ON
1 µs or less
ON →OFF
2 µs or less
Input time constant
setting
N/A, 4 µs, 8 µs, 16 µs, 32 µs (2 input unit setting)
Common method
16 points/Common (+Common)
Number of counter
channels
4 CH
Counting range
32-bit signed (-2,147,483,648 to +2,147,483,647)
Max. counting speed *1
200 kHz
Input mode
3 modes (Direction control, individual input, phase input)
Min. input pulse width *1
2.5 µs
Others
Comparison output 8 points, multiplication (1, 2, 4)
Interrupt points *2
N/A, 1 point/unit, 8 points/unit (Configured by mode setting switch)
Interrupt delay
160 µs or less (NX-CPU750A, CPU750B, NX70-CPU750)
50 µs or less (NX-CPU750C, CPU750D)
*1. This value applies when the input time constant (filter) function is disabled.
*2. When using interrupts with a 1 point/unit setting, either an interrupt program from the
external input terminal (NX700: B1(X8), NX70: [ I ] B1(X8)) or an interrupt program (one
of INT16 to INT23) from comparison 0 is booted.
10
Output Specification
Item
High-speed counter unit (NX-HSC4, NX70-HSC4)
Isolation method
Photocoupler
Rated load voltage
5V to 24V DC
Rated load voltage range
Max. load current
Output
NX70: 0.1A ([ II ] A1 to A8, [ II ] B1 to B4 terminal),
0.8A ([ II ] B5 to B8 terminal)
OFF state leakage current
1 µA or less
Max. ON state voltage drop
0.5V or less
Response
time *1
OFF →ON
1 µs or less
ON →OFF
1 µs or less
Surge absorber
Zener diode
Common method
16 points/COMMON
External
power
supply
Counter
4.75V DC to 26.4V DC
NX700: 0.1A (A11 to A18, B11 to B14 terminals),
0.8A (B15 to B18 terminals)
Voltage
20.4V DC to 26.4V DC
Current
90 mA (for 24V DC)
Comparison output
NX700: 8 points (A11 to A18 terminals)
NX70: 8 points ([ II ] A1 to A8 terminal)
Function Specification
Functions
Input, Output
Counter
Comparison
output
Input time
constant
Item
Occupied I/O points
High-speed counter unit (NX-HSC4, NX70-HSC4)
32 In/32 Out
External point
16 In/16 Out
Number of channels
4CH
Counting range
32-bit signed (-2,147,483,648 to +2,147,483,647)
Counting speed
200 kHz *1
Input mode
Direction control input, individual input, phase differential input
Special functions
Multiplication (1, 2, 4)
Point
Max. 8 points
Point
16 points (2-point unit)
Constant
4, 8, 16, 32 µs
*1. This value applies when the input time constant (filter) function is disabled.
11
I/O Contact Points
NX700 High-Speed Counter Unit (NX-HSC4)
Input Contacts
External
Terminal
External
Terminal
Unit
Internal
I/O
NX700 High-Speed Counter Unit (NX-HSC4)
Functions
Input
Interrupt
Counter
Comparison
Pulse
PWM
A1
X0
-
CH0 IN-A
-
-
-
A2
X1
-
CH0 IN-B
-
-
-
A3
X2
-
CH0 Clear
-
-
-
A4
X3
-
CH0 Mask
-
-
-
A5
X4
-
CH1 IN-A
-
-
-
A6
X5
-
CH1 IN-B
-
-
-
A7
X6
-
CH1 Clear
-
-
-
A8
X7
-
CH1 Mask
-
-
-
B1
X8
Interrupt INT0
CH2 IN-A
-
-
-
B2
X9
Interrupt INT1
CH2 IN-B
-
-
-
B3
XA
Interrupt INT2
CH2 Clear
-
-
-
B4
XB
Interrupt INT3
CH2 Mask
-
-
-
B5
XC
Interrupt INT4
CH3 IN-A
-
-
-
B6
XD
Interrupt INT5
CH3 IN-B
-
-
-
B7
XE
Interrupt INT6
CH3 Clear
-
-
-
B8
XF
Interrupt INT7
CH3 Mask
-
-
-
-
X10
-
-
Comparison CMP0
-
-
-
X11
-
-
Comparison CMP1
-
-
-
X12
-
-
Comparison CMP2
-
-
-
X13
-
-
Comparison CMP3
-
-
-
X14
-
-
Comparison CMP4
-
-
-
X15
-
-
Comparison CMP5
-
-
-
X16
-
-
Comparison CMP6
-
-
-
X17
-
-
Comparison CMP7
-
-
-
X18
-
-
-
-
-
-
X19
-
-
-
-
-
-
X1A
-
-
-
-
-
-
X1B
-
-
-
-
-
-
X1C
-
-
-
-
-
-
X1D
-
-
-
-
-
-
X1E
-
-
-
-
-
-
X1F
-
-
-
-
-
- : No input allocation.
The I/O number allocations above are applied when NX700 PLC High-speed counter
unit(4CH) is installed in slot 0.
I/O number can differ depending on the installation slot.
12
Output Contacts
NX700 High-Speed Counter Unit (NX-HSC4)
Functions
External
Terminal
Output
Interrupt
Counter
Comparison
Pulse
PWM
A11
Y20
-
-
[ Comparison CMP0 ]
-
-
A12
Y21
-
-
[ Comparison CMP1 ]
-
-
A13
Y22
-
-
[ Comparison CMP2 ]
-
-
A14
Y23
-
-
[ Comparison CMP3 ]
-
-
A15
Y24
-
-
[ Comparison CMP4 ]
-
-
A16
Y25
-
-
[ Comparison CMP5 ]
-
-
A17
Y26
-
-
[ Comparison CMP6 ]
-
-
External
A18
Y27
-
-
[ Comparison CMP7 ]
-
-
Terminal
B11
Y28
-
-
-
-
-
Unit
Internal
I/O
B12
Y29
-
-
-
-
-
B13
Y2A
-
-
-
-
-
B14
Y2B
-
-
-
-
-
B15
Y2C
-
-
-
-
-
B16
Y2D
-
-
-
-
-
B17
Y2E
-
-
-
-
-
B18
Y2F
-
-
-
-
-
-
Y30
-
CH0 Soft Clear
-
-
-
-
Y31
-
CH0 Soft Mask
-
-
-
-
Y32
-
CH1 Soft Clear
-
-
-
-
Y33
-
CH1 Soft Mask
-
-
-
-
Y34
-
CH2 Soft Clear
-
-
-
-
Y35
-
CH2 Soft Mask
-
-
-
-
Y36
-
CH3 Soft Clear
-
-
-
-
Y37
-
CH3 Soft Mask
-
-
-
-
Y38
-
-
-
-
-
-
Y39
-
-
-
-
-
-
Y3A
-
-
-
-
-
-
Y3B
-
-
-
-
-
-
Y3C
-
-
-
-
-
-
Y3D
-
-
-
-
-
-
Y3E
-
-
-
-
-
-
Y3F
-
-
-
-
-
-
: No output allocation
[ ] : Indicate the connector pins on which the comparison results are directly output in order
to send to an external device. But the signal states are saved in the input contacts, X10 to X
17, so that you can monitor them with the programming software.
ATTENTION
The I/O number allocations above are applied when NX700
PLC High-speed counter unit is installed in slot 0.
I/O number can differ depending on the installation slot.
13
NX70 High-Speed Counter Unit (NX70-HSC4)
Input Contacts
External
Terminal
External
Terminal
[I]
Unit Internal I/O
NX70 High-Speed Counter Unit (NX70-HSC4)
Functions
Input
Interrupt
Counter
Comparison
Pulse
A1
X0
-
CH0 IN-A
-
-
-
A2
X1
-
CH0 IN-B
-
-
-
A3
X2
-
CH0 Clear
-
-
-
A4
X3
-
CH0 Mask
-
-
-
A5
X4
-
CH1 IN-A
-
-
-
A6
X5
-
CH1 IN-B
-
-
-
A7
X6
-
CH1 Clear
-
-
-
A8
X7
-
CH1 Mask
-
-
-
B1
X8
Interrupt INT0
CH2 IN-A
-
-
-
B2
X9
Interrupt INT1
CH2 IN-B
-
-
-
B3
XA
Interrupt INT2
CH2 Clear
-
-
-
B4
XB
Interrupt INT3
CH2 Mask
-
-
-
B5
XC
Interrupt INT4
CH3 IN-A
-
-
-
B6
XD
Interrupt INT5
CH3 IN-B
-
-
-
B7
XE
Interrupt INT6
CH3 Clear
-
-
-
B8
XF
Interrupt INT7
CH3 Mask
-
-
-
-
X10
-
-
Comparison CMP0
-
-
-
X11
-
-
Comparison CMP1
-
-
-
X12
-
-
Comparison CMP2
-
-
-
X13
-
-
Comparison CMP3
-
-
-
X14
-
-
Comparison CMP4
-
-
-
X15
-
-
Comparison CMP5
-
-
-
X16
-
-
Comparison CMP6
-
-
-
X17
-
-
Comparison CMP7
-
-
-
X18
-
-
-
-
-
-
X19
-
-
-
-
-
-
X1A
-
-
-
-
-
-
X1B
-
-
-
-
-
-
X1C
-
-
-
-
-
-
X1D
-
-
-
-
-
-
X1E
-
-
-
-
-
-
X1F
-
-
-
-
-
- : No input allocation.
The I/O number allocations above are applied when NX70 PLC High-speed counter
unit(4CH) is installed in slot 0.
I/O number can differ depending on the installation slot.
14
PWM
Output Contacts
External
Terminal
A1
External
Terminal
[ II ]
Unit Internal I/O
-
NX70 High-Speed Counter Unit (NX70-HSC4)
Functions
Output
Interrupt
Counter
Comparison
Pulse
PWM
Y20
-
-
[ Comparison CMP0 ]
-
-
A2
Y21
-
-
[ Comparison CMP1 ]
-
-
A3
Y22
-
-
[ Comparison CMP2 ]
-
-
A4
Y23
-
-
[ Comparison CMP3 ]
-
-
A5
Y24
-
-
[ Comparison CMP4 ]
-
-
A6
Y25
-
-
[ Comparison CMP5 ]
-
-
A7
Y26
-
-
[ Comparison CMP6 ]
-
-
A8
Y27
-
-
[ Comparison CMP7 ]
-
-
B1
Y28
-
-
-
-
-
B2
Y29
-
-
-
-
-
B3
Y2A
-
-
-
-
-
B4
Y2B
-
-
-
-
-
B5
Y2C
-
-
-
-
-
B6
Y2D
-
-
-
-
-
B7
Y2E
-
-
-
-
-
B8
Y2F
-
-
-
-
-
-
Y30
-
CH0 Soft Clear
-
-
-
-
Y31
-
CH0 Soft Mask
-
-
-
-
Y32
-
CH1 Soft Clear
-
-
-
-
Y33
-
CH1 Soft Mask
-
-
-
-
Y34
-
CH2 Soft Clear
-
-
-
-
Y35
-
CH2 Soft Mask
-
-
-
-
Y36
-
CH3 Soft Clear
-
-
-
-
Y37
-
CH3 Soft Mask
-
-
-
-
Y38
-
-
-
-
-
-
Y39
-
-
-
-
-
-
Y3A
-
-
-
-
-
-
Y3B
-
-
-
-
-
-
Y3C
-
-
-
-
-
-
Y3D
-
-
-
-
-
-
Y3E
-
-
-
-
-
-
Y3F
-
-
-
-
-
: No output allocation
[ ] : Indicate the connector pins on which the comparison results are directly output in
order to send to an external device. But the signal states are saved in the input contacts,
X10 to X 17, so that you can monitor them with the programming software.
ATTENTION
The I/O number allocations above are applied when NX70
PLC High-speed counter unit is installed in slot 0. I/O number
can differ depending on the installation slot.
15
Shared Memory Areas
NX700, NX70 PLC High-speed counter unit (4CH) shared memory map.
Shared Memory Map
Address
Access unit
[word]
100h, 101h
2W
Counter setting
102h, 103h
2W
Reserved
Functions
104h, 105h
2W
Comparison output setting
106h, 107h
2W
Reserved
R/W
Event
R/W
Counter functions setting
Comparison output setting
108h, 109h
2W
Counter <CH0> Current value
R/W
CH0 Counter Current value (signed 32-bit)
10Ah, 10Bh
2W
Counter <CH1> Current value
R/W
CH1 Counter Current value (signed 32-bit)
10Ch, 10Dh
2W
Counter <CH2> Current value
R/W
CH2 Counter Current value (signed 32-bit)
R/W
CH3 Counter Current value (signed 32-bit)
10Eh, 10Fh
2W
Counter <CH3> Current value
110h to 11Fh
2W
Reserved
120h, 121h
2W
Comparison output Set value
MEM0
R/W
Comparison with counter current value
(signed 32-bit)
122h, 123h
2W
Comparison output Set value
MEM1
R/W
Comparison with counter current value
(signed 32-bit)
124h, 125h
2W
Comparison output Set value
MEM2
R/W
Comparison with counter current value
(signed 32-bit)
126h, 127h
2W
Comparison output Set value
MEM3
R/W
Comparison with counter current value
(signed 32-bit)
128h, 129h
2W
Comparison output Set value
MEM4
R/W
Comparison with counter current value
(signed 32-bit)
12Ah, 12Bh
2W
Comparison output Set value
MEM5
R/W
Comparison with counter current value
(signed 32-bit)
12Ch, 12Dh
2W
Comparison output Set value
MEM6
R/W
Comparison with counter current value
(signed 32-bit)
12Eh, 12Fh
2W
Comparison output Set value
MEM7
R/W
Comparison with counter current value
(signed 32-bit)
130h to 137h
2W
Reserved
R/W
Interrupt Input Point Setting
R/W
Input time constant setting for input X0 to
XF
138h, 139h
2W
Interrupt Setting
13Ah, 13Bh
2W
Reserved
13Ch, 13Dh
2W
Input time constant setting
13Eh, 13Fh
2W
Reserved
140h to 15Fh
2W
Reserved
NOTE R/W: Read and write. R: Read only.
16
Shared Memory Area Description
Below is a description of NX700, NX70 PLC high-speed counter (4CH)
unit shared memory.
100h, 101h
Counter functions setting
Address: 100h 101h
Setting of each
b31~
counter CH operation b28
mode with shared
memory settings.
Please configure the
counter function
modes according to
the table on the right.
b27~
b24
b23~
b20
b19~
b16
b15~
b12
b11~
b8
b7~
b4
b3~
b0
Counter setting
Counter CH0 setting (used/unused)
Counter CH0 setting (input mode)
Counter CH1 setting (used/unused)
Counter CH1 setting (input mode)
Counter CH2 setting (used/unused)
Counter CH2 setting (input mode)
Counter CH3 setting (used/unused)
Counter CH3 setting (input mode)
Setting (Input Mode).. Effective only for terminal input
Set value
(HEX)
Functions
Terminal input mode
0
Direction control *2
1
Individual input
Multiplication
Set value
(HEX)
Functions
0
Used
(Terminal input)
N/A
2
3
Setting (Function)
Phase input
4
1
1 multiplication
2
2 multiplications
3
4 multiplications
4
5
5
6
6
7
7
8
8
9
9
Invalid *1
A
Counter
Invalid *1
A
B
B
C
C
D
D
E
E
F
F
Unused *2
*1: Do not use this setting.
*2: Initial values on power input are set as direction control for input mode and unused for function setting.
Shared Memory Area Setting Example
Setting
item
Shared memory
address
Setting example
Setting range
For each channel (CH0 to CH3), 8 bits are
allocated.
100h to 101h
H20 : Phase input (1 multiplication)
H0 : Direction control
16 15
32
F
F
CH3
F
F
CH2
F
H00 : Direction control
H10 : Individual input
H0 : Used
Counter
Setting range for each channel
0
F
CH1
0
0
CH0
H30 : Phase input (2 multiplications)
H40 : Phase input (4 multiplications)
HFF : Unused
17
102h, 103h
Reserved
104h, 105h
Comparison output setting
Address: 104h, 105h
Select the counter
b31~
channel whose
b28
current value will be
compared with the
comparison set value
and the output logic
for each comparison
output points, CMP0
to CMP7.
b27~
b24
b23~
b20
b19~
b16
b15~
b12
b11~
b8
b7~
b4
b3~
b0
Comparison output point setting
Comparison output point CMP0 setting
Comparison output point CMP1 setting
Comparison output point CMP2 setting
Comparison output point CMP3 setting
Comparison output point CMP4 setting
Comparison output point CMP5 setting
Comparison output point CMP6 setting
Comparison output point CMP7 setting
Comparison Output Setting
Set value
(HEX)
Functions
Comparison
output functions
Counter CH to
be compared
Output logic
0
CH0
1
ON when current value < set value
2
3
CH2
CH3
Used
4
CH1
CH0
5
ON when current value ≥ set value
6
7
CH1
CH2
CH3
8
9
A
B
Invalid *1
Invalid *1
Unused *2
-
C
D
E
F
*1: Do not use this setting.
*2: Initial value on power input is set to Unused.
Shared Memory Area Setting Example
Setting
item
Shared memory
address
Setting example
Setting range
For comparison output 8 points (CMP0 to
CMP7), 4 bits are allocated for each.
H0: Negative logic output counter CH0
Comparis
on output
setting
104h to 105h
32
16 15
F
F
F
F
0
F
F
F
0
CMP7 CMP6 CMP5 CMP4 CMP3 CMP2 CMP1 CMP0
18
Setting range for each channel
ON when current value < set value
1) H0 : CH0
2) H1 : CH1
3) H2 : CH2
4) H3 : CH3
ON when current value ≥ set value
1) H4 : CH0
2) H5 : CH1
3) H6 : CH2
4) H7 : CH3
5) HF : Unused
106h, 107h
108h to 10Fh
Reserved
Counter <CHx> Current value
N
Current value of each counter is stored in shared memory as
described below.
N
Use F150 and P150 instructions (reading data from highperformance units) to read the current value by 2 word unit.
Address: 108h 109h
Counter CH0 Current value
K-2,147,483,648 to K+2,147,483,647
Address: 10Ah 10Bh
Counter CH1 Current value
K-2,147,483,648 to K+2,147,483,647
Address: 10Ch 10Dh
Counter CH2 Current value
K-2,147,483,648 to K+2,147,483,647
Address: 10Eh 10Fh
Counter CH3 Current value
N
K-2,147,483,648 to K+2,147,483,647
110h to 11Fh
Reserved
120h to 12Fh
Comparison output set value
Set the comparison output set value to be compared with counter
current value.
Address: 120h 121h
Comparison output Set value
(for CMP0)
MEM0
K-2,147,483,648 to K+2,147,483,647
Address: 122h 123h
Comparison output Set value
(for CMP1)
MEM1
Comparison output Set value
(for CMP2)
MEM2
Comparison output Set value
(for CMP3)
MEM3
Comparison output Set value
(for CMP4)
MEM4
Comparison output Set value
(for CMP5)
MEM5
Comparison output Set value
(for CMP6)
MEM6
Comparison output Set value
(for CMP7)
MEM7
K-2,147,483,648 to K+2,147,483,647
Address: 124h 125h
K-2,147,483,648 to K+2,147,483,647
Address: 126h 127h
K-2,147,483,648 to K+2,147,483,647
Address: 128h 129h
K-2,147,483,648 to K+2,147,483,647
Address: 12Ah 12Bh
K-2,147,483,648 to K+2,147,483,647
Address: 12Ch 12Dh
K-2,147,483,648 to K+2,147,483,647
Address: 12Eh 12Fh
K-2,147,483,648 to K+2,147,483,647
19
130h to 137h
138h, 139h
N
Reserved
Interrupt Setting
Set interrupt function mode according to the table below.
Address: 138h, 139h
b31~
b28
Interrupt setting
b27~
b24
b23~
b20
b19~
b16
b15~
b12
b11~
b8
b7~
b4
b3~
b0
INT0 Interrupt setting
INT1 Interrupt setting
INT2 Interrupt setting
INT3 Interrupt setting
INT4 Interrupt setting
INT5 Interrupt setting
INT6 Interrupt setting
INT7 Interrupt setting
Functions
Set
value
(HEX)
Interrupt
Function
0
Connection point
Interrupt condition
Comparison output function *1
1
(CMP0 to CMP7)
Used
2
Input terminal (X8 to XF)
3
Coincidence output
off →on
on →off *2
4
5
6
7
8
Invalid *3
Invalid *3
Invalid *3
Unused *4
-
-
9
A
B
C
D
E
F
*1: Each of INT0 to INT7 corresponds to each of CMP0 to CMP7.
<Ex> When Set Value 1 is selected for INT0 interrupt setting, interrupt generates on
coincidence output (EQ0) at CMP0.
*2: When you selected this setting, make sure you run interrupt clear after setting.
*3: Do not use this setting.
*4: Initial value on power input is set to unused.
Shared Memory Area Setting Example
Setting
item
Shared memory
address
Setting example
Setting range
For interrupt programs (INT0 to INT7),
4 bits are allocated for each program.
H1 : High-speed counter coincidence output
Interrupt
138h to 139h
32
16 15
F
INT7
20
F
F
F
INT6 INT5 INT4
0
F
F
F
1
INT3
INT2 INT1 INT0
Interrupt setting range
H1 : High-speed counter coincidence
output
H2 : External input off →on
H3 : External input on →off
HF : Unused
13Ah, 13Bh
Reserved
13Ch, 13Dh
Input time constant setting
N
Set the input time constant for 8 external input terminal groups with
shared memory settings.
N
Input time constant is set for external input terminal, so function
allocation for each of input X0 to XF settings are also valid.
(Counter input, interrupt input)
Address: 13Ch, 13Dh
Input time
b31~ b27~ b23~
constant setting b28
b24
b20
b19~
b16
b15~
b12
b11~
b8
b7~
b4
b3~
b0
Input time constant settings for X0 and X1
Input time constant settings for X2 and X3
Input time constant settings for X4 and X5
Input time constant settings for X6 and X7
Input time constant settings for X8 and X9
Input time constant settings for XA and XB
Input time constant settings for XC and XD
Input time constant settings for XE and XF
Input Time Constant Setting
Set
value
(HEX)
Functions
Input time
constant
4 µs
0
1
2
Effective pulse width
Used
8 µs
16 µs
32 µs
3
4
5
6
7
8
9
Invalid *1
Invalid *1
Unused *2
-
A
B
C
D
E
F
*1: Do not use this setting.
*2: Initial value on power input is set to unused.
21
Shared Memory Area Setting Example
Setting
item
Shared memory
address
Setting example
Setting range
For inputs (X0, X1 to XE, XF), 4 bits are
allocated for each input.
Input
time
constant
H2 : 16 µs
13Ch to 13Dh
N
32
16 15
F
F
F
F
F
F
2
XF
XE
XD
XC
XB
XA
X9
X8
X7
X6
X5
X4
X3
X2
X1
X0
13Eh, 13Fh
Reserved
140h to 15Fh
Reserved
H0 : 4 µs
H1 : 8 µs
H2 : 16 µs
H2 : 32 µs
HF : Unused
This area is reserved for pulse I/O unit shared memory, and
therefore is not used by high-speed counter unit.
Address
22
0
F
Input time constant setting range
Access unit
[word]
Functions
R/W
Event
R/W
Pulse output form setting
140h, 141h
2W
PLS/PWM Setting
142h, 143h
2W
PLS/PWM Plug
144h to 147h
2W
Reserved
148h, 149h
2W
PLS0/PWM0
frequency setting
R/W
Output frequency setting
14Ah, 14Bh
2W
PLS1/PWM1
frequency setting
R/W
Output frequency setting
14Ch, 14Dh
2W
PLS2/PWM2
frequency setting
R/W
Output frequency setting
14Eh, 14Fh
2W
PLS3/PWM3
frequency setting
R/W
Output frequency setting
150h to 157h
2W
Reserved
158h, 159h
2W
PWM0 Duty Setting
R/W
PWM Duty Setting
R
Pulse output form
monitor
15Ah, 15Bh
2W
PWM1 Duty Setting
R/W
PWM Duty Setting
15Ch, 15Dh
2W
PWM2 Duty Setting
R/W
PWM Duty Setting
15Eh, 15Fh
2W
PWM3 Duty Setting
R/W
PWM Duty Setting
23
2
High-Speed Counter Unit (4CH)
Functions
High-Speed Counter Unit (4CH) Functions
NX700, NX70 PLC high-speed counter unit is a special unit for fast
counter feature, which also provides a variety of functions. Main
features of high-speed counter unit include the following.
HSC provides various functions as follows:
HSC
HSC
NX-HSC4
NX70-HSC4
It operates as mixed I/O unit.
General I/O Function
(See "Chapter 4")
Input Time Constant
A
Set the effective pulse width of input
Function
signal.
(See "Chapter 5")
B
A B
1
20
B
A
1
20
NX700 PLC
High-Speed Counter
Unit (NX-HSC4)
Count pulse number.
Counter Function
(See "Chapter 6")
1
10
Compare pulse number and set
value and output the results.
Comparison Output
Function
(See "Chapter 7")
10
1
Generate interrupt signal.
Interrupt Function
(See "Chapter 8")
Pulse output.
Pulse Output Function
PWM output.
PWM Output Function.
•
•±
NX70 PLC
High-Speed Counter
Unit(NX70-HSC4)
Pulse output and PWM output is only available to pulse I/O unit.
Be careful that this function is NOT available for advanced high-speed
counter unit (4CH).
System Configuration Without Losses
Unit I/O terminals that are not allocated to any function can be used for
general I/O terminal, which enables a single high-speed counter unit to
be used both for counter function and sensor Input, providing system
configuration without system resource loss.
Interrupt Function
Interrupt control for general external input, and support for interrupt
control by counter and set value coincidence.
Four 0.8A Outputs
23
Functions of High-Speed Counter Unit
N
N
Each function can be operated by shared memory settings.
But, interrupt mode setting is selected with mode setting switch on
the bottom of the unit.
The factory default is set to OFF (no interrupt functions) for
switches, and the unit runs as usual I/O unit on power input.
General I/O Functions
N High-speed counter unit can be used as 32In/32Out mixed I/O unit
with its default setting without mode setting switch or shared
memory configuration.
But, I/O is initially allocated for 16 points for each, actually it will be
used as 16In/16Out mixed I/O unit.
N I/O allocation changes depending on unit installation slot.
(EX) When unit is installed in slot 0, occupied I/O will be WX0 to
WX1, WY2 to WY3, and the actual allocation for terminal will be
WX0 and WY2.
N Function I/O will set as priority when using functions, but for areas
without function allocation, they will be used for general I/O.
Input Time Constant Functions
N Effective pulse width for input signals form I/O connector can be set
by this function.
Input signal whose pulse width is smaller than the effective pulse
width is considered as noise.
N Effective pulse width can be set by four constants, two point unit for
I/O connector, as described below.
Effective Pulse Max. count
Width (Wµs)
speed
Setting
Unit
External input terminal
NX700 High-Speed
Counter Unit
NX70 High-Speed
Counter Unit
No setting
200 kHz
4
125 kHz
Group 1 A1, A2 (Input allocation X0, X1) [ I ] A1, A2 (Input allocation X0, X1)
8
62.5 kHz
Group 2 A3, A4 (Input allocation X2, X3) [ I ] A3, A4 (Input allocation X2, X3)
16
31.2 kHz
Group 3 A5, A6 (Input allocation X4, X5) [ I ] A5, A6 (Input allocation X4, X5)
32
15.6 kHz
Group 4 A7, A8 (Input allocation X6, X7) [ I ] A7, A8 (Input allocation X6, X7)
Group 5 B1, B2 (Input allocation X8, X9) [ I ] B1, B2 (Input allocation X8, X9)
W or more W or more
Group 6 B3, B4 (Input allocation XA, XB) [ I ] B3, B4 (Input allocation XA, XB)
Group 7 B5, B6 (Input allocation XC, XD) [ I ] B5, B6 (Input allocation XC, XD)
Group 8 B7, B8 (Input allocation XE, XF) [ I ] B7, B8 (Input allocation XE, XF)
N
Input time constant function prevents input errors caused by noise,
by setting the effective pulse width of input signals. See "Chapter 5"
for detailed setting for input time constant.
Signals outside the effective pulse width are
considered as input error (noise).
X0 (Terminal block input)
X0 (Signal after time
constant setting)
24
Be careful that the default is set to no time constant
setting.
ATTENTION
Interrupt Function
The mode setting switch determines the function mode described
below on power input.
N
Numbers of interrupt
Available
programs that can be
interrupt points
set by the program
Mode
Unit operation
A
No interrupt
function unit
0
-
B
Interrupt function
unit
8
Corresponding to INT0
to 7 or INT8 to 15
*1
C
Interrupt
generation
Special unit
1
Corresponding to INT16
to 23
*1
Interrupt input *3
I/O connector (X8 to XF)
Comparison coincidence signal
(EQ0 to EQ7)
*2
I/O Connector (X8)
Comparison coincidence signal
(EQ0)
*2
*1: Corresponding interrupt number differs depending on the unit installation location.
*2: Internal signal for comparison function. Generated when counter current value and
comparison value coincide.
*3: Input signal for interrupt generation is selectable. (I/O connector or comparison
coincidence signal)
Example of ladder instruction and interrupt input signal corresponding
Mode B
A
HSC
HSC
NX-HSC4
INT0 ←X8, or EQ0
INT1 ←X9, or EQ1
INT2 ←XA, or EQ2
INT3 ←XB, or EQ3
INT4 ←XC, or EQ4
INT5 ←X8, or EQ5
INT6 ←XD, or EQ6
INT7 ←XE, or EQ7
NX70-HSC4
B
A B A B
1
1
1
10
INT16 ←X8, or EQ0
1
External terminal
•±
•
input during using
interrupt function NX70 PLC
(X8 to XF)
High-speed
NX700 PLC
counter unit
High-speed
(NX70-HSC4)
counter unit
(NX-HSC4)
20
Mode C
10
20
Interrupt generates on edge input.
Comparison coincidence
off
on
on
off
External terminal input
No coincidence
No coincidence
Comparison coincidence signal input
25
High-speed Counter Function
HSC has four high-speed counter channels. There are three input
modes for counting. Input mode can be set for each CH.
Direction control
Counter value changes with pulse string and direction signals.
ta
tb
tc
td
on
IN.A off
IN.B
n
Count number
n+1
n+2
n+1
n
n-1
ta, tb, tc, td ≥ 2.5 µs *1
Individual input
Count value changes with each input signal at CW and CCW.
ta
tb
tc
on
IN.A off
IN.B
n
Count number
n+1
n+2
n+1
n
n-1
ta, tb, tc ≥ 2.5 µs *1
Phase differential
Count value changes with the phase differential input on encoder and
others.
ta tb tc td
on
IN.A off
IN.B
Count number
n
n+1
n+2
n+1
*1: Value for when input time constant (filter) is set to None.
26
n
ta, tb, tc, td ≥ 2.5 µs *1
IMPORTANT
About multiplication
There are three types of multiplication for phase differential
input mode as following.
IN.A
1 multiplication
IN.B
n+2
A
IN.A
2 multiplication
IN.B
n
Count number
n+1
n+2
n+3
n+4
CH0 IN.A
IN.B
Clear
Mask
CH1 IN.A
IN.B
Clear
Mask
IN.A
4 multiplication
IN.B
NX70-HSC4
HSC
Count number
n+1
HSC
NX-HSC4
n
B
CH2 IN.A
IN.B
Clear
Mask
1
1
20
A B A B
CH3 IN.A
IN.B
Clear
Mask
20
1
10
10
1
•
Count number
•±
n n+1 n+2 n+3 n+4 n+5 n+6 n+7 n+8 n+9
NX70 PLC
High-Speed
Counter Unit
(NX70-HSC4)
NX700 PLC
High-Speed
Counter Unit
(NX-HSC4)
Comparison Output Function
N
High-speed counter unit has 8 points of comparison output.
(CMP0 to CMP7)
N
Counter current value and comparison set value is compared, and
the comparison results are output.
Comparison output set value is set by shared memory.
(MEM0 to MEM7)
(Counter current value) < (Comparison output set value) →
Comparison output: OFF
(Counter current value) ≥ (Comparison output set value) →
Comparison output: ON
HSC
NX-HSC4
Comparison output
set value (MEMx)
B
Coincidence
1
HSC
A
Comparison
Output
(CMP0 to 7)
NX70-HSC4
1
A B A B
Counter current
value
1
10
10
1
Pulse I/O
Comparison
output (CMPx)
Coincidence
signal (EQx)
OFF
ON
No coincidence
Coincidence
Comparison output ON/OFF can also be set as reverse operation.
EQx is an internal processing signal that is not sent outside.
20
20
•
NX700 PLC
High-Speed
Counter Unit
(NX-HSC4)
•±
NX70 PLC
High-Speed
Counter Unit
(NX70-HSC4)
27
Configuration and Limit for High-Speed
Counter Unit
Configuration Limit with Current Consumption
Internal current consumption for HSC unit is shown below (at 5V).
Be careful when configuring system, not to exceed the total capacity
limit, considering the consumption of other units.
PLC Model
Name
Catalog
number
Current consumption
(5V power)
NX700 PLC
High-Performance
high-speed counter
unit (4CH)
NX-HSC4
450 mA
NX70 PLC
High-Performance
high-speed counter
unit (4CH)
NX70-HSC4
400 mA
Remarks
Mounting of High-Speed Counter Unit
N
For NX700 PLC
HSC unit can be mounted at any location on CPU backplane or
expansion backplane.
But it cannot be mounted on power supply unit or CPU unit slots.
There is no limit to the number of HSC mounting for NX700 PLC.
N
For NX70 PLC
HSC unit can be mounted at any location on the basic backplane.
But it cannot be mounted on power supply unit or CPU unit slots.
There is no limit to the number of HSC mounting for NX70 PLC.
(Example of NX700 PLC)
Basic backplane
Mountable at any location
High-speed counter unit
Expansion backplane
NOTE
HSC unit can be used for only the following CPU modules (models).
NX700 CPU Module: NX-CPU750A, NX-CPU750B, NX-CPU750C, NX-CPU750D
NX70 CPU Module: NX70-CPU750
28
Interrupt Points
When used as interrupt unit, maximum 2 units can provide eight
points each. Other units can use only one point (C mode) for interrupt.
N
Interrupt Functions Available and Interrupt Generation
Special Unit
Interrupt Function Available
HSC unit set to mode B is used as interrupt unit and provides 8
interrupts per each unit.
Be careful that only two mode B units can be used for one CPU
unit.
Interrupt Generation Special Unit
HSC unit set to mode C is used as interrupt generation special unit,
and provides one interrupt per one unit.
Be careful that only 8 interrupt generation special units can be
used per one CPU unit.
N
Interrupt function with multiple high-speed counter units
Mode B INT0 to INT7
Mode B INT8 to INT15
Mode C INT16
Mode C INT17
Max. 2 B-mode units, can be used per
one CPU unit.
Max. 8 C-mode units, can be used per
one CPU unit.
Mode C INT18
NX-HSC4
NX-HSC4
NX-HSC4
NX-HSC4
NX-HSC4
POWER
NX 700
COM
RS232C
NOTE
TOOL
RS232C
SAMSUNG
Slot No. →
0
1
2
3
4
There can be any combination of HSC unit modes,
but when B mode and C mode are used together, be
careful that the interrupt points are available up to
INT23.
29
Parts and Functions
Parts and Functions
®ÿ
7
F
27
2F
A
1
®ÿ
HSC4
0
8
20
28
HSC4
NX-HSC4
B
NX70-HSC4
0
8
20
28
7
F
27
2F
1
®Ë
A B
20
B
A
®È
1
10
10
1
•ı
®Î
®Í
2
1
20
ON
•
NX700 PLC
High-Speed Counter Unit
(NX-HSC4)
•±
Bottom of Unit
NX70 PLC
High-Speed Counter Unit
(NX70-HSC4)
Parts and Functions
Status LED
Turns on showing the I/O status at the terminal blocks.
See "Status LED" on page 32 for details.
I/O Connector (NX700 PLC)
Relays output signals to high-speed counter unit.
See "Terminal Diagram" on page 34 for details.
Input Connector (NX70 PLC), [ I ]
Relays input signals from an external device to the high-speed
counter unit. See "Terminal Diagram" on page 34.
Output Connector (NX70 PLC), [ II ]
Relays output signals from the high-speed counter unit to an
external device. See "Terminal Diagram" on page 34.
Mode Setting Switch
Set the interrupt mode of the unit. Available modes are as follows:
N No Interrupt Function
N Interrupt Function (8 Interrupt Points)
N Interrupt Generation Special Unit (1 Interrupt Point)
See "Interrupt Function" in Chapter 8 for details.
ATTENTION
30
Operation mode setting switch turns effective only on
power input.
Mode Setting Switch
Interrupt function setting with mode setting switch on the bottom of
the unit.
Mode Setting
Switch
Mode
2
1
Event
1
2
OFF
OFF
B
ON
OFF
Interrupt function (INT0 to INT7)
C
OFF
ON
Interrupt generation special unit (INT0)
D
ON
ON
Unused (Reserved)
A
ON
Switch No
No interrupt function
Mode A (SW1 →OFF, SW2 →OFF)
No interrupt function
2
1
N
Interrupt function is not available at this setting.
ON
Mode B (SW1 →ON, SW2 →OFF)
Interrupt function (8 interrupt points)
2
1
N
Max. 8 interrupt points are available per one unit.
(INT0 to INT7)
N
In this mode, 8 interrupt points (INT0 to INT7) are automatically
set regardless of ON/OFF setting of interrupt function
ON
Mode C (SW1 →OFF, SW2 →ON)
Interrupt generation special unit (1 interrupt point)
2
1
ON
N
Only one valid interrupt per one unit. (INT0 *1)
N
INT1 to INT7 is invalid regardless of interrupt setting.
*1: INT0 indicates the interrupt location on the unit.
Interrupt program numbers INT 16 to 23 are available for
sequence program setting.
Mode D (SW1 →ON, SW2 →ON)
Reserved
2
1
N
Do not use this setting.
ON
IMPORTANT
See "Interrupt Points" on page 29
31
Status LED
Unit LED indicates the I/O status at the terminals. Refer to the table
below.
NX700 high-speed counter unit allocation table (NX-HSC4)
0
A1
A2
A3
A4
A5
A6
A7
A8
7
8
B1
B2
B3
B4
B5
B6
B7
B8
F
20 A11 A12 A13 A14 A15 A16 A17 A18 27
28 B11 B12 B13 B14 B15 B16 B17 B18 2F
[Unit LED Indicator Window]
NX700 high-speed counter unit (NX-HSC4)
LED
Functions
Input Interrupt Counter Comparison Pulse PWM
LED
Functions
Output Interrupt Counter Comparison Pulse PWM
A1
X0
-
CH0 IN-A
-
-
-
A11
Y20
-
-
[ CMP0 ]
-
-
A2
X1
-
CH0 IN-B
-
-
-
A12
Y21
-
-
[ CMP1 ]
-
-
A3
X2
-
CH0 Clear
-
-
-
A13
Y22
-
-
[ CMP2 ]
-
-
A4
X3
-
CH0 Mask
-
-
-
A14
Y23
-
-
[ CMP3 ]
-
-
A5
X4
-
CH1 IN-A
-
-
-
A15
Y24
-
-
[ CMP4 ]
-
-
A6
X5
-
CH1 IN-B
-
-
-
A16
Y25
-
-
[ CMP5 ]
-
-
A7
X6
-
CH1 Clear
-
-
-
A17
Y26
-
-
[ CMP6 ]
-
-
A8
X7
-
CH1 Mask
-
-
-
A18
Y27
-
-
[ CMP7 ]
-
-
B1
X8
INT0
CH2 IN-A
-
-
-
B11
Y28
-
-
-
-
-
B2
X9
INT1
CH2 IN-B
-
-
-
B12
Y29
-
-
-
-
-
B3
XA
INT2
CH2 Clear
-
-
-
B13
Y2A
-
-
-
-
-
B4
XB
INT3
CH2 Mask
-
-
-
B14
Y2B
-
-
-
-
-
B5
XC
INT4
CH3 IN-A
-
-
-
B15
Y2C
-
-
-
-
-
B6
XD
INT5
CH3 IN-B
-
-
-
B16
Y2D
-
-
-
-
-
B7
XE
INT6
CH3 Clear
-
-
-
B17
Y2E
-
-
-
-
-
B8
XF
INT7
CH3 Mask
-
-
-
B18
Y2F
-
-
-
-
-
- marks: No output allocation
[ ] marks: Indicate the connector pins on which the comparison results are directly
output in order to send to an external device. But the signal states are saved in the
input contacts, X10 to X 17, so that you can monitor them with the programming
software.
ATTENTION
32
• LED indicators may show vibrations when there are highspeed I/O signals, but it does not indicate any
malfunctions on the unit.
• The numbers described above are I/O numbers with highspeed counter unit mounted in slot 0.
I/O number can differ depending on the installation slot.
NX70 high-speed counter unit allocation table (NX70-HSC4)
[I]
0
A1
A2
A3
A4
A5
A6
A7
A8
7
8
B1
B2
B3
B4
B5
B6
B7
B8
F
20
A1
A2
A3
A4
A5
A6
A7
A8
27
28
B1
B2
B3
B4
B5
B6
B7
B8
2F
[ II ]
[Unit LED Indicator Window]
NX70 high-speed counter unit (NX70-HSC4)
Functions
LED
[I]
Input Interrupt Counter
Functions
Compa
Pulse PWM
rison
LED
Output Interrupt Counter Comparison Pulse PWM
A1
X0
-
CH0 IN-A
-
-
-
A1
Y20
-
-
[CMP0]
-
-
A2
X1
-
CH0 IN-B
-
-
-
A2
Y21
-
-
[CMP1]
-
-
A3
X2
-
CH0 Clear
-
-
-
A3
Y22
-
-
[CMP2]
-
-
A4
X3
-
CH0 Mask
-
-
-
A4
Y23
-
-
[CMP3]
-
-
A5
X4
-
CH1 IN-A
-
-
-
A5
Y24
-
-
[CMP4]
-
-
A6
X5
-
CH1 IN-B
-
-
-
A6
Y25
-
-
[CMP5]
-
-
A7
X6
-
CH1 Clear
-
-
-
A7
Y26
-
-
[CMP6]
-
-
A8
Y27
-
-
[CMP7]
-
-
B1
Y28
-
-
-
-
-
A8
X7
-
CH1 Mask
-
-
-
B1
X8
INT0
CH2 IN-A
-
-
-
B2
X9
INT1
CH2 IN-B
-
-
-
B2
Y29
-
-
-
-
-
B3
XA
INT2
CH2 Clear
-
-
-
B3
Y2A
-
-
-
-
-
B4
XB
INT3
CH2 Mask
-
-
-
B4
Y2B
-
-
-
-
-
B5
XC
INT4
CH3 IN-A
-
-
-
B5
Y2C
-
-
-
-
-
B6
XD
INT5
CH3 IN-B
-
-
-
B6
Y2D
-
-
-
-
-
B7
XE
INT6
CH3 Clear
-
-
-
B7
Y2E
-
-
-
-
-
B8
XF
INT7
CH3 Mask
-
-
-
B8
Y2F
-
-
-
-
-
[ II ]
- marks: No output allocation
[ ] marks: Indicate the connector pins on which the comparison results are
directly output in order to send to an external device. But the signal
states are saved in the input contacts, X10 to X 17, so that you can
monitor them with the programming software.
ATTENTION
• LED indicators may show vibrations when there are
high-speed I/O signals, but it does not indicate any
malfunctions on the unit.
• The numbers described above are I/O numbers with
high-speed counter unit mounted in slot 0.
I/O number can differ depending on the installation
slot.
33
I/O Specifications and Connector Pin Diagram
Terminal Diagram
1
2
3
4
5
6
7
8
9
10
L
L
L
L
L
L
L
L
11
12
13
14
15
16
17
18
19
20
A
B
0
8
1
9
2
A
3
B
4
C
5
D
6
E
7
F
+COM
+COM
+COM
+COM
20
21
22
23
24
28
29
2A
2B
2C
25
2D
26
2E
27
2F
+
+
OV
OV
1
2
3
4
5
Input part
6
A
B
0
8
B
A
0V
0V
+
+
2F
27
7
1
1
10
8
2
1
9
2
9
9
3
2
A
3
L
10
4
11
12
13
14
15
16
17
18
L
5
B
4
C
5
D
6
E
7
F
+COM
+COM
+COM
+COM
L
6
L
7
L
8
L
9
Output part
10
L
[I]
Input part
19
20
2C
4
2B
8
3
2A
26
25
24
23
22
L
2
10
1
29
21
28
20
34
8
7
6
5
4
3
L
L
L
L
L
L
2
L
1
L
[ II ]
Output part
[ NX70 High-Speed Counter Unit (NX70-HSC4) ]
[ NX700 High-Speed Counter Unit (NX-HSC4) ]
NOTE
9
9
L
L
2D
5
7
L
2E
6
6
L
L
7
5
L
L
L
3
8
4
10
4 (+ COM) points, 2 (+) points, and 2 (0V) points are internally connected,
respectively.
Internal Circuit Diagram
Input Part
Input indicator
LED
Input terminal
Internal Circuit
24V DC
COM terminal
Output Part
Output
indicator
LED
Terminal
Internal Circuit
Output terminal
~
Terminal
35
36
3
Configuration and Design Verification
of the Unit
Slot No. and I/O Number Allocation
Verification
Occupied I/O Area
As with other I/O units, NX70, NX700 HSC units also use the allocation
for input (X)/output (Y).
NX70, NX700 HSC units occupy 32 input (X0 to X1F) and 32 output
(Y20 to Y3F) points. Occupied I/O area configuration is as follows:
EX) When HSC unit is installed in slot 0
HSC
NX-HSC4
HSC
A
1
NX70-HSC4
B
64 occupied points
32 points input
32 points output
1
A B
20
B
A
1
10
10
1
From them, 16 points are
allocated for input
connector and 16 points
for output connector.
20
•
NX700 PLC High-Speed
Counter Unit (NX-HSC4)
•±
Input: X0 to X1F(WX0 to WX1),
Output: Y20 to Y3F(WY2 to WY3)
NX70 PLC High-Speed
Counter Unit (NX70-HSC4)
37
High-Speed Counter Unit I/O Allocation Table
Input Allocation, NX700 High-Speed Counter Unit (NX-HSC4)
External
Terminal
External
Terminal
Unit
Internal
I/O
Functions
Input
Interrupt
Counter
Comparison
Pulse
PWM
A1
X0
-
CH0 IN-A
-
-
-
A2
X1
-
CH0 IN-B
-
-
-
A3
X2
-
CH0 Clear
-
-
-
A4
X3
-
CH0 Mask
-
-
-
A5
X4
-
CH1 IN-A
-
-
-
A6
X5
-
CH1 IN-B
-
-
-
A7
X6
-
CH1 Clear
-
-
-
A8
X7
-
CH1 Mask
-
-
-
B1
X8
Interrupt INT0
CH2 IN-A
-
-
-
B2
X9
Interrupt INT1
CH2 IN-B
-
-
-
B3
XA
Interrupt INT2
CH2 Clear
-
-
-
B4
XB
Interrupt INT3
CH2 Mask
-
-
-
B5
XC
Interrupt INT4
CH3 IN-A
-
-
-
B6
XD
Interrupt INT5
CH3 IN-B
-
-
-
B7
XE
Interrupt INT6
CH3 Clear
-
-
-
B8
XF
Interrupt INT7
CH3 Mask
-
-
-
-
X10
-
-
Comparison CMP0
-
-
-
X11
-
-
Comparison CMP1
-
-
-
X12
-
-
Comparison CMP2
-
-
-
X13
-
-
Comparison CMP3
-
-
-
X14
-
-
Comparison CMP4
-
-
-
X15
-
-
Comparison CMP5
-
-
-
X16
-
-
Comparison CMP6
-
-
-
X17
-
-
Comparison CMP7
-
-
-
X18
-
-
-
-
-
-
X19
-
-
-
-
-
-
X1A
-
-
-
-
-
-
X1B
-
-
-
-
-
-
X1C
-
-
-
-
-
-
X1D
-
-
-
-
-
-
X1E
-
-
-
-
-
-
X1F
-
-
-
-
-
- : No input allocation.
The I/O number allocations above are applied when NX700 PLC High-speed counter
unit(4CH) is installed in slot 0.
I/O number can differ depending on the installation slot.
38
Input Allocation, NX70 High-Speed Counter Unit (NX70-HSC4)
External
Terminal
External
Terminal
[I]
Unit Internal I/O
Functions
Input
Interrupt
Counter
Comparison
Pulse
PWM
A1
X0
-
CH0 IN-A
-
-
-
A2
X1
-
CH0 IN-B
-
-
-
A3
X2
-
CH0 Clear
-
-
-
A4
X3
-
CH0 Mask
-
-
-
A5
X4
-
CH1 IN-A
-
-
-
A6
X5
-
CH1 IN-B
-
-
-
A7
X6
-
CH1 Clear
-
-
-
A8
X7
-
CH1 Mask
-
-
-
B1
X8
Interrupt INT0
CH2 IN-A
-
-
-
B2
X9
Interrupt INT1
CH2 IN-B
-
-
-
B3
XA
Interrupt INT2
CH2 Clear
-
-
-
B4
XB
Interrupt INT3
CH2 Mask
-
-
-
B5
XC
Interrupt INT4
CH3 IN-A
-
-
-
B6
XD
Interrupt INT5
CH3 IN-B
-
-
-
B7
XE
Interrupt INT6
CH3 Clear
-
-
-
B8
XF
Interrupt INT7
CH3 Mask
-
-
-
-
X10
-
-
Comparison CMP0
-
-
-
X11
-
-
Comparison CMP1
-
-
-
X12
-
-
Comparison CMP2
-
-
-
X13
-
-
Comparison CMP3
-
-
-
X14
-
-
Comparison CMP4
-
-
-
X15
-
-
Comparison CMP5
-
-
-
X16
-
-
Comparison CMP6
-
-
-
X17
-
-
Comparison CMP7
-
-
-
X18
-
-
-
-
-
-
X19
-
-
-
-
-
-
X1A
-
-
-
-
-
-
X1B
-
-
-
-
-
-
X1C
-
-
-
-
-
-
X1D
-
-
-
-
-
-
X1E
-
-
-
-
-
-
X1F
-
-
-
-
-
- : No input allocation.
The I/O number allocations above are applied when NX700 PLC High-speed counter
unit(4CH) is installed in slot 0.
I/O number can differ depending on the installation slot.
39
Detailed Descriptions on Occupied I/O points
External Input
X0 to XF .............................. Input
Operated as input.
It can be monitored as input even though
interrupt and counter functions are in use.
INT0 to INT7 ........................Interrupt Function
Input interrupt signal.
Generates interrupt signal from the input at I/O
connector, and run the interrupt program of the
ladder program. This is available only when the
connection point is set to input terminal in shared
memory interrupt setting.
CHx IN-A, CHx IN-B .............Counter Function
Input count signal of counting operation.
Count signal input is IN-A, IN-B.
There are three input modes: 1) Direction control
2) Individual input and 3) Phase input.
CHx Clear .............................Counter Function
Input when counter current value is to be cleared.
Count current value is cleared to zero (0) with this
input.
CHx Mask ............................Counter Function
Pause counter.
When this input turns on, counter is paused.
Internal input
X10 to X1F ...........................Input
This is for monitoring signals from each function,
such as comparison output.
CMP0 to CMP7 ....................Comparison Output Function
The comparison result of comparison output set
value in shared memory and counter current
value can be monitored by X10 to X17.
(Counter current value) < (Comparison output set
value) →Comparison output: OFF
(Counter current value) ≥ (Comparison output set
value) →Comparison output: ON
Comparison output ON/OFF can also be set as
reverse operation.
40
Output Allocation, NX700 High-Speed Counter Unit (NX-HSC4)
Functions
External
Terminal
Output
Interrupt
Counter
Pulse
PWM
A11
Y20
-
-
[ Comparison CMP0 ]
-
-
A12
Y21
-
-
[ Comparison CMP1 ]
-
-
A13
Y22
-
-
[ Comparison CMP2 ]
-
-
A14
Y23
-
-
[ Comparison CMP3 ]
-
-
A15
Y24
-
-
[ Comparison CMP4 ]
-
-
A16
Y25
-
-
[ Comparison CMP5 ]
-
-
A17
Y26
-
-
[ Comparison CMP6 ]
-
-
External
A18
Y27
-
-
[ Comparison CMP7 ]
-
-
Terminal
B11
Y28
-
-
-
-
-
B12
Y29
-
-
-
-
-
B13
Y2A
-
-
-
-
-
B14
Y2B
-
-
-
-
-
Unit
Internal
I/O
Comparison
B15
Y2C
-
-
-
-
-
B16
Y2D
-
-
-
-
-
B17
Y2E
-
-
-
-
-
B18
Y2F
-
-
Y30
-
CH0 Soft Clear
-
Y31
-
CH0 Soft Mask
-
-
-
-
Y32
-
CH1 Soft Clear
-
-
-
-
Y33
-
CH1 Soft Mask
-
-
-
-
Y34
-
CH2 Soft Clear
-
-
-
-
Y35
-
CH2 Soft Mask
-
-
-
-
Y36
-
CH3 Soft Clear
-
-
-
-
Y37
-
CH3 Soft Mask
-
Y38
-
-
-
Y39
-
-
-
Y3A
-
-
-
Y3B
-
-
-
Y3C
-
-
Y3D
-
-
Y3E
-
Y3F
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- : No output allocation
[ ] : Indicate the connector pins on which the comparison results are directly output in
order to send to an external device. But the signal states are saved in the input
contacts, X10 to X 17, so that you can monitor them with the programming software.
ATTENTION
The I/O number allocations above are applied when NX700
PLC High-speed counter unit(4CH) is installed in slot 0. I/O
number can differ depending on the installation slot.
41
Output Allocation, NX70 High-Speed Counter Unit (NX70-HSC4)
External
Terminal
External
Terminal
[ II ]
Unit Internal I/O
Functions
Output
Interrupt
Counter
Comparison
Pulse
PWM
A1
Y20
-
-
[ Comparison CMP0 ]
-
-
A2
Y21
-
-
[ Comparison CMP1 ]
-
-
A3
Y22
-
-
[ Comparison CMP2 ]
-
-
A4
Y23
-
-
[ Comparison CMP3 ]
-
-
A5
Y24
-
-
[ Comparison CMP4 ]
-
-
A6
Y25
-
-
[ Comparison CMP5 ]
-
-
A7
Y26
-
-
[ Comparison CMP6 ]
-
-
A8
Y27
-
-
[ Comparison CMP7 ]
-
-
B1
Y28
-
-
-
-
-
B2
Y29
-
-
-
-
-
B3
Y2A
-
-
-
-
-
B4
Y2B
-
-
-
-
-
B5
Y2C
-
-
-
-
-
B6
Y2D
-
-
-
-
-
B7
Y2E
-
-
-
-
-
B8
Y2F
-
-
-
-
-
-
Y30
-
CH0 Soft Clear
-
-
-
-
Y31
-
CH0 Soft Mask
-
-
-
-
Y32
-
CH1 Soft Clear
-
-
-
-
Y33
-
CH1 Soft Mask
-
-
-
-
Y34
-
CH2 Soft Clear
-
-
-
-
Y35
-
CH2 Soft Mask
-
-
-
-
Y36
-
CH3 Soft Clear
-
-
-
-
Y37
-
CH3 Soft Mask
-
-
-
-
Y38
-
-
-
-
-
-
Y39
-
-
-
-
-
-
Y3A
-
-
-
-
-
-
Y3B
-
-
-
-
-
-
Y3C
-
-
-
-
-
-
Y3D
-
-
-
-
-
-
Y3E
-
-
-
-
-
-
Y3F
-
-
-
-
-
- : No output allocation
[ ] : Indicate the connector pins on which the comparison results are directly output in
order to send to an external device. But the signal states are saved in the input
contacts, X10 to X 17, so that you can monitor them with the programming software.
ATTENTION
42
The I/O number allocations above are applied when NX700
PLC High-speed counter unit(4CH) is installed in slot 0. I/O
number can differ depending on the installation slot.
Detailed Descriptions on Occupied I/O Points
External Output
Y20 to Y2F ..........................Output
Operated as output.
But, if there is high-performance output allocation,
high-performance output is sent to I/O connector.
It can be used as internal relay when not being
used for external output.
CMP0 to CMP7 ...................Comparison Output Function
Comparison result output that has been calculated
by comparison output functions.
This output is directly allocated to external output
terminal (NX700: A11 to A18,
NX70: [ II ] A1 to A8), and its output (Y) (Y20 to
Y27) can be used for PLS direction or internal
relay. Comparison output can be monitored by
internal input (X) with same name.
Internal Output
Y30 to Y3F ..........................Output
This output is a controlling signal for each
functions such as counter function.
It can be used as internal relay when not allocated
to any function.
CHx Soft Clear ....................Counter Function
Output when counter current value is to be
cleared.
Counter current value is cleared to zero (0) by this
output (Y30, Y32, Y34, Y36).
CHx Soft Mask ....................Counter Function
Output for counter pause.
When this output (Y31, Y33, Y35, Y37) turns on,
counter is paused.
43
Verification of Allocated I/O Number and Slot No.
N
I/O number and slot number is necessary for programming.
N
I/O number changes with backplane installation location. Make sure
it is same with design.
N
For I/O allocation, See "I/O Number Allocation" in Chapter 3 of each
PLC system manual.
I/O Number Allocation Verification
Check the occupied I/O area of the entire unit with HSC unit.
EX] When HSC unit is installed next to CPU backplane I/O unit x 2.
For NX700 PLC
High-speed counter unit
Slot No.
0
1
2
3
4
CPU backplane
X0 X40 X60
to to
to
X3F X5F X7F
Y100 Y110
to
to
Y10F Y11F
Y80
to
Y9F
EX] When HSC unit is installed next to CPU backplane I/O unit x 4.
For NX70 PLC
High-speed counter unit
Slot No.
0
X0
to
X1F
44
1
2
X20 Y40
to to
X3F Y5F
3
4
Y60 X80
to
to
Y7F X9F
Y100
to
Y11F
Verification of Slot No.
When mounted on CPU backplane
The first slot on the right of CPU is 0, and the others are numbered as
their location order.
High-speed counter unit
Slot No.
0
1
2
3
4
CPU backplane
When mounted on expansion backplane
Set the slot on the right of power supply unit on expansion backplane
as No. 16.
High-speed
counter unit
Slot No.
CPU backplane
0
1
2
3
4
Slot No.
16
17
18
19
20
21
Expansion backplane
45
Embedded Counter
Embedded Counter Functions
Embedded Counter Functions
N
N
N
N
Input pulse counting functions is embedded in the HSC unit.
Counted values are stored in the shared memory areas of each
channel.
Stored values can be read by a program, so current value can be
checked.
With comparison functions, external output can be set according to
count value.
High-Speed
Counter
Shared
Memory
The values can be read with ladder programs.
Current
Value
Interrupt signal is generated when counter
current value coincides with set value.
NX-HSC4
A B
1
1
20
20
Pulse string input
Embedded Counter Operation
N
N
N
Count value is set to zero (0) on power off.
Count value (current value) stored in shared memory can be read
with user program instructions (F150/P150).
Count value (current value) can be modified with user program
instructions (F151/P151).
Count Range of the Counter
-2,147,483,648 to +2,147,483,647
(signed 32bit)
When current value exceeds max.
(min.), it returns to min. (max.)
without error. In this case no error
occurs.
Max. Value=
Min. Value=
Shared Memory Address for Storing Counter Value
Share Memory Address (heximal)
46
CH0
108h, 109h
CH1
10Ah, 10Bh
CH2
10Ch, 10Dh
CH3
10Eh, 10Fh
Event
Current value
count
Signed 32bit
-2,147,483,648 to +2,147,483,647
Read Current Value
Use high-performance instructions (F150/P150) to read the count value
(current value) from the shared memory of HSC unit.
About Instructions F150 (READ) . P150 (PREAD)
Data reading instruction from shared memory of special unit.
R0
[ F150
READ,
K0,
H108,
K2
DT100 ]------------- Reading Shared Memory
Assign HSC unit in slot No.0
Read 2 words of counter value data 108h to 109h of CH0
Store into data register DT100 to DT101
Description
Read 2 words of counter current value data of CH0, stored in shared
memory of HSC unit mounted in slot 0, and store the data in DT100 to
DT101 of CPU unit.
About Assigned Address
Data (current value) is stored as 32bit data.
Share Memory Address (heximal)
CH0
108h, 109h
CH1
10Ah, 10Bh
CH2
10Ch, 10Dh
CH3
10Eh, 10Fh
Event
Current value
count
Signed 32bit
-2,147,483,648 to +2,147,483,647
Program Example
When reading the counter current value to a certain data register
(DT200)
R0
[ F150
READ, K0, H108, K2, DT200 ]
47
Current Value Input
Use high-performance instructions (F151/P151) to enter the count
value (current value) into the shared memory of HSC unit.
About Instructions F151 (WRT) . P151 (PWRT)
Data input instruction into shared memory of special unit.
R0
[ F151
WRT,
K0,
DT100,
K2,
H108-------------- Shared Memory Input
Assign HSC unit in slot No.0
Input 2 words of data from register DT100 to DT01
into HSC shared memory 108h to 109h.
Description
Store 2 words of data from CPU unit DT100 to DT101 into counter
current value data stored in HSC unit shared memory.
About Assigned Address
Data (current value) is stored as 32bit data.
Share Memory Address (heximal)
CH0
108h, 109h
CH1
10Ah, 10Bh
CH2
10Ch, 10Dh
CH3
10Eh, 10Fh
Event
Current value
count
Signed 32bit
-2,147,483,648 to +2,147,483,647
Program example
When entering zero (0) into counter current value
R0
48
[ F1 DMV,
K0,
[ F151 WRT,
K0,
DT100 ]
DT100,
K2, H108 ]
4
General I/O Function
General I/O Function
What is General I/O Function?
N
General I/O function means the general I/O, represented by input
and output units.
HSC has high-performance functions like counter function, but I/O
without allocations for high-performance functions is used for
general I/O functions.
N
When used along with input time constant functions, it can be used
as I/O with input time constant functions, which provides highperformance I/O with stronger noise immunity.
External Input External Output
X0 to XF
Y20 to Y2F
NX-HSC4
A B
N
1
1
20
20
The I/O number allocations above are applied when HSC unit is
installed in slot 0.
How to use General I/O Function?
All I/O of HSC unit can be used for general I/O function. But when highperformance functions are allocated, is high-performance functions
allocated, such as high-speed counter function, the allocated functions
have higher priority.
Using Method
N
Special settings such as mode setting switch or shared memory
settings are not needed for general I/O unit usage.
Use with initial setting.
49
N
When HSC unit is installed in slot 0, input X0 to XF and output Y20
to Y2F can be used for external I/O contacts.
IMPORTANT
50
Terminals not allocated for functions can be used for general
I/O, which provides system configuration without losses,
including counter functions and sensor input only with a
single HSC unit.
5
Input Time Constant Function
Input Time Constant Function
What is Input Time Constant Function?
N
Setting the effective pulse width for the input signals from external
input terminal. Input signal whose pulse width is smaller than the
effective pulse width are considered as noise.
N
Time constant can be selected from the following, and width signals
over the set value are recognized as signals.
1) 4 µs
2) 8 µs
3) 16 µs
4) 32 µs
N
Time constant can be set individually for each of 8 external input
terminal groups.
1)
External input
terminal
A1, A2
Input
allocation
X0, X1
1)
External input
terminal [ I ]
A1, A2
Input
allocation
X0, X1
2)
A3, A4
X2, X3
2)
A3, A4
X2, X3
3)
A5, A6
4)
A7, A8
X4, X5
3)
A5, A6
X4, X5
X6, X7
4)
A7, A8
X6, X7
5)
B1, B2
X8, X9
5)
B1, B2
X8, X9
6)
B3, B4
XA, XB
6)
B3, B4
XA, XB
7)
B5, B6
XC, XD
7)
B5, B6
XC, XD
8)
B7, B8
XE, XF
8)
B7, B8
XE, XF
(NX700 High-Speed Counter Unit NX-HSC4)
(NX70 High-Speed Counter Unit NX70-HSC4)
NX-HSC4
It is considered as error (noise) because it is
outside the effective pulse width.
A B
1
1
20
20
Terminal input signal
Signals after time
constant setting
set time constant
(Signal output delays as time constant)
51
Input constant functions can be used along with interrupt
and counter functions.
IMPORTANT
Input Time Constant Functions
N
To use input time constant functions, shared memory setting is
needed.
Using Method
N
Set input constant for 8 external input terminal groups by setting
shared memory.
N
Input time constant is set for external output terminal, so function
allocation for each of input X0 to XF settings are also valid. (Counter
input, interrupt input)
Address: 13Ch 13Dh
Input time
b31~ b27~ b23~
constant setting b28
b24
b20
b19~
b16
b15~
b12
b11~
b8
b7~
b4
b3~
b0
Input time constant settings for X0 and X1
Input time constant settings for X2 and X3
Input time constant settings for X4 and X5
Input time constant settings for X6 and X7
Input time constant settings for X8 and X9
Input time constant settings for XA and XB
Input time constant settings for XC and XD
Input time constant settings for XE and XF
Input Time Constant Setting
Set value
(HEX)
Functions
Input time constant
Effective pulse width
0
1
2
4 µs
Used
3
8 µs
16 µs
32 µs
4
5
6
7
8
9
Invalid *1
Invalid *1
A
B
C
D
E
F
Unused *2
*1: Do not use this setting.
*2: Initial value on power input is set to unused.
52
-
ATTENTION
Make sure to access shared memory by 2 word unit.
Use Input Time Constant Function
Overview
Ignored as noise
Install HSC unit in
slot No. 0
Terminal input
signal
After time constant
processing
NX-HSC4
A B
X0
1
1
20
20
Ignored as noise
X1
Terminal input
signal
After time constant
processing
Set time constant for X0, X1 input, and ignore signals outside the
width as noise.
Mode Setting Switch
Set mode A when interrupt is unused.
Mode A (SW1 →OFF, SW2 →OFF)
No interrupt function
2
1
Interrupt function is not available at this setting.
ON
Input time constant function can be used regardless of the use status
(used or unused) of interrupt function.
Shared Memory Setting
Time constant setting
Set input time constant.
In the example, X0, X1 time constant of 16 µs is set for X0 and X1
input. Therefore, enter 「FFFFFFF2」 into shared memory address 13Ch
and 13Dh.
Shared memory 13Ch, 13Dh settings
(bit) 32
External input
XF, XE
16 15
XD, XC
XB, XA
X9, X8
0
X7, X6
X5, X4
X3, X2
X1, X0
Set value
F
F
F
F
F
F
F
2
Settings
Unused
Unused
Unused
Unused
Unused
Unused
Unused
16 µs
NOTE See "Shared Memory Areas" in Chapter 1 for shared memory addresses.
53
Sample Program
Enter 「FFFFFFF2」 into the time constant setting area of shared
memory (13Ch, 13Dh), and set 16 µs time constant for X0 and X1 input.
R9013
[ F1 DMV,
[ F151
HFFFFFFF2,
WRT,
K0,
DT100 ] ---------------------------- Preparing data input
Data setting in DT100 to DT101
DT100,
K2,
Assign HSC unit in slot No.0
H13C ] ------------- Shared memory input
Enter 「FFFFFFF2」into addresses 13Ch
and 13Dh to set 16 µs sec time constant
for X0 and X1 input.
Input 2 words of data from register DT100 to DT101
into HSC shared memory 13Ch to 13Dh.
54
6
High-Speed Counter Function
High-Speed Counter Function
What is Counter Function?
N
Counter function counts the input pulse number and reflect it into
the current value. Also, it set the offset value by recording data into
the current value.
N
HSC unit has 4 channels of 2 phase input counter. There are three
types of 2 phase input mode as follows.
1) Direction Control Mode
2) Individual Input Mode
3) Phase Input Mode
Input pulse
Shared
memory
The count value of pulse number is stored
in the shared memory as current value.
Counter
Current
value
NX-HSC4
A B
1
1
20
20
Count input pulses
55
Setting Counter Function
N
To use counter function, shared memory setting is needed.
N
Besides shared memory setting, counter can be masked or cleared
with counter control signal.
Step
. Shared Memory Setting
Set the operation mode for each counter CH in the shared memory
settings. Set the counter functions mode as shown in the table below.
Address: 100h 101h
Counter
setting
b31~
b28
b27~
b24
b23~
b20
b19~
b16
b15~
b12
b11~
b8
b7~
b4
b3~
b0
Counter CH0 setting (used/unused)
Counter CH0 setting (input mode)
Counter CH1 setting (used/unused)
Counter CH1 setting (input mode)
Counter CH2 setting (used/unused)
Counter CH2 setting (input mode)
Counter CH3 setting (used/unused)
Counter CH3 setting (input mode)
Setting (Input Mode)...Effective only for
terminal input
Functions
Set value
(HEX)
Terminal input mode
0
Direction control *3
1
Individual input
Multiplication
N/A
Phase input
4
Set value
(HEX)
Functions
0
Used
(Terminal input)
1
1 multiplication
2
2 multiplications
3
4 multiplications
4
2
3
Setting (Function)
5
5
6
6
7
7
8
8
9
9
A
Invalid *2
A
B
B
C
C
D
D
E
E
F
F
Counter
Used (Internal
connection) *1
Invalid *2
Unused *3
*1: Do not use this setting.
*2: Initial values on power input are set as direction control for input mode and unused for
function setting.
ATTENTION
56
Make sure to access shared memory by 2 word unit.
Step
. Counter Control Signal
N
Counter functions can set mask or clear with counter control signal.
N
There are two types of counter control signals as follows: Control
by external input terminal and Control by programming. Both
allow counter control.
Control by external input terminal
Control Signals (External input terminal)
External terminal
NX700
NX70
A3
Input
allocation
A3
X2
A4
A4
X3
A7
A7
X6
A8
A8
X7
B3
XA
B4
XB
B7
B7
XE
B8
B8
XF
B3
[I]
B4
Function
Subject
counter
CH0
CH1
CH2
CH3
Control
events
Remarks
Clear
Count current value is cleared to 0 with input ON.
Mask
Count is paused with input ON.
Clear
Count current value is cleared to 0 with input ON.
Mask
Count is paused with input ON.
Clear
Count current value is cleared to 0 with input ON.
Mask
Count is paused with input ON.
Clear
Count current value is cleared to 0 with input ON.
Mask
Count is paused with input ON.
Control by programming
Control Signals (Internal output terminal)
Output
allocation
Y30
Y31
Y32
Y33
Y34
Y35
Y36
Y37
Function
Subject counter
CH0
CH1
CH2
CH3
ATTENTION
Control events
Remarks
Clear
Count current value is cleared to 0 with output ON.
Mask
Count is paused with output ON.
Clear
Count current value is cleared to 0 with output ON.
Mask
Count is paused with output ON.
Clear
Count current value is cleared to 0 with output ON.
Mask
Count is paused with output ON.
Clear
Count current value is cleared to 0 with output ON.
Mask
Count is paused with output ON.
Be careful that when counter output is internally connected,
the control input (by external terminal) from I/O connector is
ignored.
57
Read Counter Current Value
N
Current value of each counter is stored in shared memory as
described below.
N
Use F150 and P150 instructions (reading data from highperformance units) to read the current value by 2 word unit.
Address: 108h 109h
Counter CH0 Current value
K-2,147,483,648 to K+2,147,483,647
Address: 10Ah 10Bh
Counter CH1 Current value
K-2,147,483,648 to K+2,147,483,647
Address: 10Ch 10Dh
Counter CH2 Current value
K-2,147,483,648 to K+2,147,483,647
Address: 10Eh 10Fh
Counter CH3 Current value
K-2,147,483,648 to K+2,147,483,647
Ex
N
Following is an example of storing the current value from counter
CH0 to DT0, using F150 instruction.
R0
[ F150
READ,
K0,
H108,
K2,
DT0 ] ---------- Reading shared memory
Assign HSC unit in slot No.0
Read 2 words of current value data at CH0 108h to 109h
to data register DT0 to DT1.
58
Current Value Input
N
Current value of each counter is stored in shared memory as
described below.
N
Enter current value by 2 word unit, using F151, P151 instruction
(data writing at high-performance unit).
Address: 108h 109h
Counter CH0 Current value
K-2,147,483,648 to K+2,147,483,647
Address 10Ah 10Bh
Counter CH1 Current value
K-2,147,483,648 to K+2,147,483,647
Address : 10Ch 10Dh
Counter CH2 Current value
K-2,147,483,648 to K+2,147,483,647
Address : 10Eh 10Fh
Counter CH3 Current value
IMPORTANT
K-2,147,483,648 to K+2,147,483,647
Counter offset value can be set by counter current value
input.
Ex
Following is an example of entering the stored input data at DT20 as
counter CH0 current value, using F151 instruction.
R0
[ F1
[ F151
DMV,
WRT,
K6400,
K0,
DT20 ]------------------------------ Data setting
DT20,
K2,
H108 ]--------------- Shared Memory Input
Assign HSC unit in slot No.0
Input 2 words of data from register DT20 to DT21
into HSC shared memory 108h to 109h.
59
Count Function Available as Direction
Control Mode
Overview
Install HSC unit in slot 0
Pulse string input
NX-HSC4
A B
(CH0 IN-A)
X0
1
1
20
20
Direction control signal input
(CH0 IN-B)
X1
Occupied I/O areas WX0
0V (24V DC)
WX1
WY2
WY3
Clear instruction
Mask instruction
(CH0 clear)
X2
(CH0 Mask)
X3
Input pulse string in X0 and direction control signal in X1 and measure
the count number.
Counter current value is cleared with X2 clear instruction, and count
operation is paused with X3 mask instruction.
Time Chart
Count value changes according to the input status of each signal is
illustrated below. Count value changes at the pulse input edge rise
time.
CH0 IN-A (X0)
CH0 IN-B (X1)
CH0 Clear (X2)
CH0 Mask (X3)
Count value
Count stops while
mask signal is ON.
Count increases with X0
pulse edge rising and
direction control OFF.
Reset count value with
clear signal ON.
60
Count decreases
with direction
control ON.
Count increases with
direction control OFF.
Mode Setting Switch
Set to Mode A when counter function is in use without interrupt
function.
Mode A (SW1 →OFF, SW2 →OFF)
No interrupt function
2
1
Interrupt function is not available at this setting.
ON
Count function can be used regardless of the use status (ON/OFF) of
interrupt function.
Shared Memory Setting
Counter setting
Setting the operation mode for each counter CH.
In the example, pulse string is input to X0 and direction control signal
to X1, and counter function is used in direction control mode. Enter
「FFFFFF10」 to shared memory addresses 100h and 101h.
Shared memory 100h, 101h settings
16 15
(bit) 32
External input
Counter
number
XD
XC
X9
Input
mode
Functions
setting
X5
Input
mode
Functions
setting
F
F
F
F
CH3
Setting item
Set value
Settings
Unused
0
X8
X4
X1
Input
mode
Functions
setting
Input
mode
F
F
0
0
Unused
Direction
control
Terminal
Input
CH2
Unused
Unused
CH1
Unused
Unused
X0
CH0
Functions
setting
Sample Program
Enter 「FFFFFF00」 in shared memory address counter setting area
(100h, 101h), and enter pulse string in X0, direction control in X1,
and therefore set the counter function to direction control mode.
R9013
[ F1 DMV,
[ F151 WRT,
HFFFFFF00,
K0,
DT100 ]-----------------------
DT100,
Preparing data input
Data setting for DT100 to DT101
K2,
H100 ]------------ Shared memory input
Enter pulse string to X0 and direction
control signal in X1 and enter
Assign HSC unit in slot No.0
「FFFFFF00」 in addresses 100h and 101h
to use counter function in direction
control mode.
Input 2 words of data from register DT100 to DT101
into HSC shared memory 100h to 101h.
61
Count Function Available as Individual
Input Mode
Overview
Install HSC unit in slot 0
Increase pulse input
NX-HSC4
A B
(CH0 IN-A)
X0
(CH0 IN-B)
X1
1
1
20
20
Decrease pulse input
Occupied I/O areas WX0
WX1
WY2
WY3
0V (24V DC)
Clear instruction
(CH0 clear)
X2
(CH0 Mask)
X3
Mask instruction
Input increase pulse in X0 and decrease pulse in X1 and measure the
count number.
Counter current value is cleared with X2 clear instruction, and count operation
is paused with X3 mask instruction.
Time Chart
Count value changes according to the input status of each signal as
illustrated below.
Count value changes at the edge rise time of each signal.
CH0 IN-A (X0)
CH0 IN-B (X1)
CH0 Clear (X2)
CH0 Mask (X3)
Count value
Count stops while
mask signal is ON.
Count increases with X0
input edge rising.
Reset count value with
clear signal ON
62
Count decreases
with X1 input.
Count increases with X0
input.
Mode Setting Switch
Set to 「Mode A」 when counter function is in use without interrupt
function.
Mode A (SW1 →OFF, SW2 →OFF)
No interrupt function
2
1
Interrupt function is not available at this setting.
ON
Count function can be used regardless of the use status (ON/OFF) of
interrupt function.
Shared Memory Setting
Counter setting
Setting the operation mode for each counter CH.
In the example, increase pulse string is input to X0 and decrease pulse
string to X1, and counter function is used in individual input mode.
Enter 「FFFFFF00」 to shared memory addresses 100h and 101h.
Shared memory 100h, 101h settings
(bit) 32
External input
Counter
number
16 15
XD
XC
X9
Input
mode
Functions
setting
X5
Input
mode
Functions
setting
F
F
F
F
CH3
Setting item
Set value
Settings
Unused
0
X8
X4
X1
Input
mode
Functions
setting
Input
mode
F
F
1
0
Unused
Individual
Input
Terminal
Input
CH2
Unused
Unused
CH1
Unused
Unused
X0
CH0
Functions
setting
Sample Program
Enter 「FFFFFF20」 in shared memory address counter setting area
(100h, 101h), and enter increase pulse string in X0, decrease pulse
string in X1, and therefore set the counter function to individual input
mode.
R9013
[ F1 DMV,
[ F151 WRT,
HFFFFFF10,
K0,
DT100 ]------------------------- Preparing data input
Data setting for DT100 to DT101
DT100,
K2,
Assign HSC unit in slot No.0
H100 ]------------- Shared memory input
Enter increase pulse to X0 and decrease
pulse in X1 and enter 「FFFFFF10」 in
addresses 100h and 101h to use counter
function in individual input mode.
Input 2 words of data from register DT100 to D101
into HSC shared memory 100h to 101h.
63
Count Function Available as Phase Input
Mode
Overview
Install HSC unit in slot 0
Phase signal pulse input(on A)
NX-HSC4
A B
(CH0 IN-A)
X0
1
1
20
20
Phase signal pulse input(on B)
(CH0 IN-B)
X1
Occupied I/O areas WX0
WX1
WY2
WY3
0V (24V DC)
(CH0 clear)
X2
(CH0 Mask)
X3
Phase signal from encoder is input to X0 and X1 and measures the
count number.
Counter current value is cleared with X2 clear instruction, and count
operation is paused with X3 mask instruction.
Time Chart
Count value changes according to the input status of each signal is
illustrated below.
Count value increase with IN-A OFF and IN-B edge falling with 1
multiplication, and decrease with IN-A OFF and IN-B edge rising.
CH0 IN-A (X0)
CH0 IN-B (X1)
CH0 Clear (X2)
CH0 Mask (X3)
Count value
Count stops while
mask signal is ON.
Count increases with up Count decreases
Count increases with up
with down count
count input (IN-A OFF
count input
input (IN-A OFF and
and edge falling on B)
edge rising on B)
Reset count value with
clear signal ON
64
Mode Setting Switch
Set to Mode A when counter function is in use without interrupt
function.
Mode A (SW1 →OFF, SW2 →OFF)
No interrupt function
2
1
Interrupt function is not available at this setting.
ON
Count function can be used regardless of the use status (ON/OFF) of
interrupt function.
Shared Memory Setting
Counter setting
Setting the operation mode for each counter CH.
In the example, the phase signal from encoder is input to X0 and X1,
and counter function is used in 1 multiplication phase input mode, and
therefore enter 「FFFFFF20」 to shared memory addresses 100h and
101h.
Shared memory 100h, 101h settings
(bit) 32
External input
XD
16 15
XC
X9
Input
mode
Functions
setting
F
F
Counter
number
X5
Input
mode
Functions
setting
F
F
CH3
Setting item
Set value
Settings
Unused
0
X8
X4
X1
Input
mode
Functions
setting
Input
mode
F
F
2
0
Unused
Phase
Input
Terminal
Input
CH2
Unused
Unused
CH1
Unused
Unused
X0
CH0
Functions
setting
Sample Program
Enter 「FFFFFF00」 in shared memory address counter setting area
(100h, 101h), and enter increase pulse string in X0, decrease pulse
string in X1, and therefore set the counter function to individual input
mode.
R9013
[ F1 DMV,
HFFFFFF20,
[ F151 WRT,
K0,
DT100 ]------------------------ Preparing data input
Data setting for DT100 to DT101
DT100,
Assign HSC unit in slot No.0
K2,
H100 ]------------ Shared memory input
Enter phase signal from encoder in X0, X1
and enter「FFFFFF20」 in addresses 100h
and 101h to use counter function in 1
multiplication phase input mode.
Input 2 words of data from register DT100 to DT101
into HSC shared memory 100h to 101h.
IMPORTANT
In phase differential input mode, the input pulse
magnification can be changed with multiplication function.
See "High-speed Counter Function" on Chapter 2 for details .
65
66
7
Comparison Output Function
Comparison Output Function
What is Comparison Output Function?
N
Compare the comparison output set value and counter current
value, and the comparison result is output.
Comparison result output [CMPx]:
Comparison output set value ≤Counter current value
N
Comparison result output can be selected from either ON when
current value < set value or current value ≥ set value.
N
For HSC unit, 8 types of comparison output set values can be set,
and the comparison counter channels can also be freely selected.
Therefore, if all comparison output set values are set to a single
counter, a maximum of 8 level comparisons are available.
Comparison
output set
value (MEMx)
Coincidence
Counter
current value
Pulse I/O
Comparison
OFF
output
ON
(CMPx)
Coincidence No coincidence
signal
Coincidence
(EQx)
NX-HSC4
A B
1
1
20
20
Counter current value is compared with pre-set
comparison output set value, and the result is
output.
EQx is an internal processing signal that is not
sent outside.
Count input pulses
67
Setting Comparison Output Function
To use comparison output function, SETP 1. Shared Memory Setting
for Comparison Output Set Value and STEP 2. Shared Memory
Setting for Comparison Output Point are needed.
Step
. Shared Memory Setting for Comparison Output Set Value
Set the comparison output set value to be compared with counter
current value.
Address: 120h 121h
Comparison output set
value (for CMP0)
MEM0
Comparison output set
value (for CMP1)
MEM1
Comparison output set
value (for CMP2)
MEM2
Comparison output set
value (for CMP3)
MEM3
Comparison output set
value (for CMP4)
MEM4
Comparison output set
value (for CMP5)
MEM5
Comparison output set
value (for CMP6)
MEM6
Comparison output set
value (for CMP7)
MEM7
K-2,147,483,648 to K+2,147,483,647
Address: 122h 123h
K-2,147,483,648 to K+2,147,483,647
Address: 124h 125h
K-2,147,483,648 to K+2,147,483,647
Address: 126h 127h
K-2,147,483,648 to K+2,147,483,647
Address: 128h 129h
K-2,147,483,648 to K+2,147,483,647
Address: 12Ah 12Bh
K-2,147,483,648 to K+2,147,483,647
Address: 12Ch 12Dh
K-2,147,483,648 to K+2,147,483,647
Address: 12Eh 12Fh
ATTENTION
K-2,147,483,648 to K+2,147,483,647
Make sure to access shared memory by 2 word unit.
NOTE See "Shared Memory Areas" in Chapter 1 for shared memory addresses.
68
Step . Shared Memory Setting for Comparison Output
Point
Select the counter CH to be compared with comparison output set
value, and output logic.
Address: 104h, 105h
Comparison
output setting
b31~
b28
b27~
b24
b23~
b20
b19~
b16
b15~
b12
b11~
b8
b7~
b4
b3~
b0
Comparison output CMP0 setting
Comparison output CMP1 setting
Comparison output CMP2 setting
Comparison output CMP3 setting
Comparison output CMP4 setting
Comparison output CMP5 setting
Comparison output CMP6 setting
Comparison output CMP7 setting
Comparison Output Setting
Set
value
(HEX)
Functions
Comparison
output
function
Counter CH to be
compared
Output logic
0
CH0
1
ON when current value < set value
2
3
5
CH0
ON when current value ≥ set value
6
CH2
CH3
Used
4
CH1
7
CH1
CH2
CH3
8
9
A
B
Invalid *1
Invalid *1
Unused *2
-
C
D
E
F
*1: Do not use this setting.
*2: Initial values on power input are set as unused.
ATTENTION
• Make sure to access shared memory by 2 word unit.
• When using this setting regardless of counter function use
setting (ON/OFF), be careful that comparison output set
value and counter current value are compared.
• When setting the comparison output function, make sure
to first set shared memory for Comparison Output Set
Value. Otherwise, coincidence output is generated at the
time of data setting if the comparison output condition is
met, as in the case that counter initial value and
comparison output set value are both 0.
NOTE See "Shared Memory Areas" in Chapter 1 for shared memory addresses.
69
Comparison Output Function with Counter
Overview
Install HSC unit in slot 0
NX-HSC4
Pulse string input
A B
(CH0 IN-A)
X0
Direction control signal input
(CH0 IN-B)
X1
1
1
20
20
Occupied I/O areas WX0
WX1
WY2
WY3
0V (24V DC)
Clear instruction
Mask instruction
(CH0 clear)
X2
(CH0 Mask)
X3
Y20
Comparison
coincidence
output (CMP0)
Comparison
coincidence signal
Set
Current =
CM P0
value
value
When counter current value coincides with
set value, and the comparison result is
output on CMP0.
Counter current value is compared with pre-set comparison output set
value, and the comparison result is output. This function is available in
all counter operation modes, but in this example the counter is used in
direction control mode.
Time Chart
Count value changes according to the input status of each signal as
illustrated below.
Count increases with X0
pulse edge rising and
direction control OFF.
Count decreases with
direction control ON.
Count increases with
direction control OFF.
CH0 IN-A (X0)
CH0 IN-B (X1)
CH0 Clear (X2)
CH0 Mask (X3)
Comparison
output set value
Count stops on
mask signal ON
Count value
Reset count value
with clear signal ON.
Comparison output
point CMP0 (Y20)
Coincidence EQ0
(Internal signal)
70
CMP signal ON
when coincidence
or excess.
EQ signal ON
only on
coincidence
Mode Setting Switch
Set to Mode A when counter function is in use without interrupt
function.
Mode A (SW1 →OFF, SW2 →OFF)
No interrupt function
Interrupt function is not available at this setting.
* Count function can be used regardless of the use status (ON/OFF) of interrupt function.
Shared Memory Setting
Counter Setting
Setting the operation mode for each counter CH.
In the example, pulse string is input to X0 and direction control signal
to X1, and counter function is used in direction control mode. Enter
「FFFFFF00」 to shared memory addresses 100h and 101h.
Shared Memory 100h, 101h Settings
(bit) 32
External input
Counter
number
Setting item
XC
X9
Input
mode
Functions
setting
F
F
Unused
0
X8
X5
Input
mode
Functions
setting
F
F
CH3
Set value
Settings
16 15
XD
X4
X1
Input
mode
Functions
setting
Input
mode
F
F
0
0
Unused
Direction
Control
Terminal
Input
CH2
Unused
Unused
CH1
Unused
Unused
X0
CH0
Functions
setting
Setting the Comparison Output Set Value
Setting the comparison output set value to be compared with Counter
current value.
In the example, the comparison result is output on CMPO when
counter current value is 6. Enter 「K6(H6)」 in shared memory
addresses 120h, 121h.
Shared Memory 120h, 121h Settings
(bit) 32
Setting item
Set value
Settings
16 15
0
Comparison output set value (CMP0)
0
0
0
0
0
0
0
6
K6
71
Setting the Comparison Output Point
Select the counter channel number and output logic for each
comparison output point.
In the example, counter current value at CH0 is compared with
comparison output set value and the comparison result is output on
CMP0. Therefore, enter 「FFFFFFF4」 in shared memory addresses
104h and 105h.
Shared Memory 104h, 105h Settings
(bit) 32
Comparison input
CMP7
16 15
CMP6
CMP5
CMP4
0
CMP3
CMP2
CMP1
CMP0
Set value
F
F
F
F
F
F
F
4
Settings
Unused
Unused
Unused
Unused
Unused
Unused
Unused
CH0 Comparison *
* CMP0 is ON when current value ≥ set value
.
ATTENTION
When setting the comparison output function, make sure to
first set shared memory for Comparison Output Set Value.
Otherwise, coincidence output is generated at the time of
data setting if the comparison output condition is met, as in
the case that counter initial value and comparison output set
value are both 0.
Sample Program
Setting counter mode setting, comparison output functions in shared
memory.
72
R9013
[ F1 DMV,
Preparing data input
DT100 ]----------------------------- Data setting for DT100 to DT101
HFFFFFF00,
H100 ]----------------- Shared Memory Input
Enter pulse string to X0 and direction control
signal in X1 and enter 「FFFFFF00」in
Assign HSC unit in slot No.0
addresses 100h and 101h to use counter
function in direction control mode.
Input 2 words of data from register DT100 to DT101
[ F151 WRT,
K0,
DT100,
K2,
into HSC shared memory 100h to 101h.
R9013
[ F1 DMV,
[ F151 WRT,
Preparing data input
DT102 ]------------------------------ Data setting for DT102 to DT103
K6,
K0,
DT102,
K2,
Assign HSC unit in slot No.0
H120 ]----------------- Shared Memory Input
Enter K6 in addresses 120h and 121h,
to set the output as CMP0 when the counter
current value sets to 6.
Input 2 words of data from register DT102 to DT103
into HSC shared memory 120h to 121h.
R9013
[ F1 DMV,
HFFFFFFF4,
Preparing data input
DT104 ]------------------------------ Data setting for DT104 to DT105
H104 ]----------------- Shared Memory Input
Enter 「FFFFFFF4」 in addresses 104h and
105h to set the comparison results to output
Assign HSC unit in slot No.0
at CMP0 after comparing counter current
value of CH0 and comparison output set
Input 2 words of data from register DT104 to DT105
value.
[ F151 WRT,
K0,
DT104,
K2,
into HSC shared memory 104h to 105h.
73
74
8
Interrupt Function
Interrupt Function
What is Interrupt Function?
N
This function runs pre-set interrupt program based on the
interrupt signals generated at pulse I/O unit.
N
HSC unit can be used either interrupt unit with 8 point interrupt or
interrupt generation high-performance unit with 1 point interrupt.
N
HSC unit enables user to select the connection point (condition) that
generates interrupt signal.
①
Interrupt signal generation by I/O connector input
②
Interrupt signal generation by coincidence of counter current value
and comparison output set value
®Á Interrupt signal can
be generated by I/O
connector input
External Input
NX-HSC4
Interrupt
Program Run
A B
1
1
20
20
High-speed counter
®Ë
Current
value
Pulse string input
ATTENTION
=
Set value
Interrupt signal can be generated
when counter current value and set
value coincide.
Interrupt output by counter coincidence is generated when
the current value and comparison output set value coincide,
regardless of up or down count.
75
Setting Interrupt Function
To use interrupt function, Step . Mode Setting Switch Setting
and Step
Shared Memory Setting are needed. Mode setting
switch settings become effective on power input.
Step
Mode Setting Switch Setting
Mode setting switch is needed for interrupt function.
Select one of the following, according to the "Mode Setting Switch" in
Chapter 2.
Mode B (SW1 →ON, SW2 →OFF)
Interrupt function (8 interrupt points)
•
Max. 8 interrupt points are available per one unit. (INT0 to INT7)
•
In this mode, the unit is automatically set to 8 interrupt points
(INT0 to INT7) regardless of interrupt functions use (ON/OFF).
Mode C (SW1 →OFF, SW2 →ON)
Interrupt generation special unit (1 interrupt point)
•
Only one valid interrupt per one unit. (INT0 *1)
•
INT1 to INT7 are invalid regardless of interrupt settings.
*1: INT0 indicates the interrupt location on the unit. Numbers of
interrupt programs that can be set by the program are INT16 to 23.
IMPORTANT
Interrupt functions available and interrupt generation special unit
Interrupt functions available
N
HSC unit set to mode B is used as interrupt unit and provides 8 interrupts per
each unit.
N
Be careful that only two mode B units can be used for one CPU unit.
Interrupt generation special unit
N HSC unit set to mode C is used as interrupt generation special unit and
provides 1 interrupt per each unit.
N
Be careful that only 8 interrupt generation special units can be used per one
CPU unit.
Interrupt functions with multiple high-speed counter units
Mode B INT0 to INT7
Mode B INT8 to INT15
Max. 2 B-mode units can
be used per one CPU unit.
Mode C INT16
Mode C INT17
Mode C INT18
NX-HSC4
NX-HSC4
NX-HSC4
NX-HSC4
Max. 8 C-mode units can
be used per one CPU unit.
NX-HSC4
ATTENTION
Combination of HSC unit modes can be set freely,
but be careful that if B mode and C mode are
mixed, interrupt points can only go up to INT23.
Slot No. →
76
0
1
2
3
4
Step
Shared Memory Setting
Shared memory setting is needed along with mode switch setting.
Set interrupt function mode according to the table below.
Address: 138h 139h
Interrupt b31~ b27~ b23~
Setting b28
b24
b20
b19~
b16
b15~
b12
b11~
b8
b7~
b4
b3~
b0
INT0 Interrupt Setting
INT1 Interrupt Setting
INT2 Interrupt Setting
INT3 Interrupt Setting
INT4 Interrupt Setting
INT5 Interrupt Setting
INT6 Interrupt Setting
INT7 Interrupt Setting
Functions
Set value
(HEX)
Interrupt
function
0
1
Connection point
Interrupt condition
Comparison output function *1
(CMP0 to CMP7)
Coincidence output
Used
2
Input terminal (X8 to XF)
3
off →on
on →off *2
4
5
6
7
8
9
Invalid *3
Invalid *3
Invalid *3
Unused *4
-
-
A
B
C
D
E
F
*1: Each of INT0 to INT7 corresponds to each of CMP0 to CMP7.
<Ex> When Set Value 1 is selected for INT0 interrupt setting, interrupt generates on
coincidence output (EQ0) at CMP0
*2: Make sure to run interrupt clear instruction after this setting.
*3: Do not set the set value of H4 to HE
*4: Initial value on power input is set to unused.
ATTENTION
Make sure to access shared memory by 2 word unit.
NOTE See "Shared Memory Areas" in Chapter 1 for shared memory addresses.
77
Relations Between Interrupt Input Number and Interrupt
Program
HSC unit interrupt and interrupt program of sequence program run in
link with each other.
When interrupt is generated at unit INT0 as shown below, the interrupt
programs of INT0 to IRET of sequence program boot up.
Within Pulse I/O Unit
Within CPU Unit
INT0
INT0 Interrupt Generation
Interrupt Program
INT1 Interrupt Generation
IRET
INT2 Interrupt Generation
INT1
INT3 Interrupt Generation
Interrupt Program
INT4 Interrupt Generation
IRET
INT5 Interrupt Generation
Mode B
INT6 Interrupt Generation
INT2
INT7 Interrupt Generation
IRET
Interrupt Program
INT8 Interrupt Generation
INT3
INT9 Interrupt Generation
Interrupt Program
INT10 Interrupt Generation
IRET
INT11 Interrupt Generation
INT4
INT12 Interrupt Generation
Interrupt Program
IRET
INT13 Interrupt Generation
INT14 Interrupt Generation
INT5
INT15 Interrupt Generation
Interrupt Program
INT16 Interrupt Generation
IRET
INT17 Interrupt Generation
INT6
Interrupt Program
INT18 Interrupt Generation
Mode C
IRET
INT19 Interrupt Generation
INT20 Interrupt Generation
INT7
Interrupt Program
INT21 Interrupt Generation
IRET
INT22 Interrupt Generation
INT8
INT23 Interrupt Generation
Interrupt Program
IRET
.
.
.
.
.
INT9
Interrupt Program
IRET
.
.
.
.
.
.
.
INT23
Interrupt Program
IRET
When set to mode C, the assignable interrupt program numbers for
sequence program are INT 16 to 23.
NOTE Refer to Programming II manual for detailed description of interrupt programs.
78
Interrupt Functions (External Input)
Overview
Install HSC unit in slot No.0
32 points input unit
0V(24V DC)
32 points output unit
Interrupt
instruction Connect to
(Interrupt INT0) X8
Interlock input
NX-HSC4
A B
1
1
20
20
X40
Occupied I/O areas WX0 WX4 WY6
WX1 WX5 WY7
WY2
WY3
Y60
External output
(High-speed output by
interrupt processing)
When X8 interrupt (INTO) is entered with interlock X40 input, the Y60
output is sent out at high-speed due to interrupt processing.
Time Chart
In general processing without interrupt, the time between input and
signal output is affected by scan time. But if interrupt is processed, the
input status is not affected by scan time but delays signal for a short
time.
General Processing
Input signal (X8)
Output signal (Y60)
Output delays by scan time
Interrupt Processing
Interlock input (X40)
Interrupt input (X8)
Output signal (Y60)
Signal delays for a short time
79
Mode Setting Switch Setting
In this example, set the switch to mode B where max. 8 interrupt
points of INT0 to INT7 are available. If only one point is needed per
unit set to mode C. Be careful that in mode C, signal will set to INT 16.
Mode B (SW1 →ON, SW2 →OFF)
Interrupt function (8 interrupt points)
•
Max. 8 interrupt points are available per one unit. (INT0 to INT7)
•
In this mode, the unit is automatically set to 8 interrupt points
unit regardless of interrupt function use settings (ON/OFF).
Mode C (SW1 →OFF, SW2 →ON)
Interrupt generation special unit (1 interrupt point)
•
Only one valid interrupt per one unit. (INT0 *1)
•
INT1 to INT7 are invalid regardless of interrupt settings.
*1: INT0 indicates the interrupt location on the unit. Numbers of
interrupt programs that can be set by the sequence program are
INT16
Shared Memory Setting
Interrupt Setting
When using interrupt function, shared memory setting is needed as
well the setting of mode setting switch on the bottom of the unit. In the
example, the external input at X8 generates interrupt signal on edge
rising (off →on), so enter 「FFFFFFF2」 in shared memory addresses
138h and 139h.
Shared Memory 138h, 139h Settings
(bit) 32
External input
Counter
number
Set value
Settings
80
16 15
0
XF
XE
XD
XC
XB
XA
X9
X8
INT7
INT6
INT5
INT4
INT3
INT2
INT1
INT0
F
F
F
F
F
F
F
2
Unused
Unused
Unused
Unused
Unused
Unused
Unused
off →on
Sample Program
Enter FFFFFFFF2 into the area of interrupt setting (138h, 139h) in
shared memory addresses, and set the interrupt at external input
(off →on) of X8.
Describing programs to be run by interrupts following end instruction
and permissions to interrupts before end instruction.
This program is an example when the HSC unit is installed in slot 0.
N
R9013
[ F1 DMV,
[ F151
DT100 ]-------------------------- Preparing data input
Data setting for DT100 to DT101
HFFFFFF2,
WRT,
K0,
DT100,
K2,
Assign HSC unit in slot No.0
H138 ]----------- Shared memory input
At the time of edge rising of external
input at X8 (off →on), enter 「FFFFFFF2」
in 138h and 139h to generate interrupt.
Input 2 words of data from register DT100 to DT101
to HSC shared memory 138h and 139h.
R9013
[ ICTL,
H0,
H1 ]--------------------------------------- INTO Interrupt generation permission
TMX
Y60
0,
K5
Y60
< R >------- Reset Y60
( ED )
( INT 0 )------------ Interrupt program No.0
R9010
[ F143
IORF,
K4,
K4
X40
]---------------------------- Partial I/O refresh
Y60
< S >------- Set Y60
R9010
[ F143
IORF,
K6,
K6
]----------------------------- Partial I/O refresh
( IRET )------- End interrupt program No.0
81
Interrupt Functions (Comparison Coincidence
Signal)
Overview
Install HSC unit in slot 0
32 points input unit
32 points output unit
Pulse string input
NX-HSC4
(CH0 IN-A) X0
A B
Direction control
signal input
(CH0 IN-B) X1
1
1
20
20
0 V(24V DC)
Clear instruction
(CH0 Clear) X2
Mask instruction
(CH0 Mask) X3
Interlock input
X40
Occupied
I/O area
WX0 WX4 WY6
WX1 WX5 WY7
WY2
WY3
Comparison coincidence signal
Current
value
=
Set value
Y60
External output
(over signal)
High-speed output
by interrupt
processing
INT0
Interrupt signal is generated when
counter current value coincides
with set value.
Input pulse string in X0 and direction control signal in X1 and measure
the count number. If the counted pulse number reaches (exceeds) the
pre-setted comparison output set value, interrupt is generated at INT0.
When INT0 is generated, allocated programs from sequence program
INT0 to IRET start, and Y60 output is sent out at a high speed.
NOTE For comparison functions, See "Comparison Output Function" in Chapter 7.
82
Time Chart
Count value and output change according to the input status of each
signal as illustrated below.
Count increases with X0
pulse edge rising and
direction control OFF.
Count decreases
with direction
control ON.
Count increases with
direction control OFF.
CH0 IN-A (X0)
CH0 IN-B (X1)
CH0 Clear (X2)
CH0 Mask (X3)
Comparison
output set value
Count stops on
mask signal ON
Count value
Reset count value
with clear signal ON.
Comparison output
point CMP0 (Y20)
CMP signal ON
when coincidence
or excess.
EQ signal ON only
on coincidence
Coincidence EQ0
(Internal signal)
Interlock
input (X40)
External
output (Y60)
NOTE For signals such as clear and mask, See "Setting Counter Function" in Chapter 6.
Mode Setting Switch
In this example, set the switch to mode B where max. 8 interrupt
points of INT0 to INT7 are available. If only one point is needed per
unit set to mode C. But in mode C, signal will set to INT 16.
Mode B (SW1 →ON, SW2 →OFF)
Interrupt function (8 interrupt points)
•
Max. 8 interrupt points are available per one unit. (INT0 to INT7)
•
In this mode, 8 interrupt points (INT0 to INT7) are automatically
set regardless of ON/OFF setting of interrupt function.
Mode C (SW1 →OFF, SW2 →ON)
Interrupt generation special unit (1 interrupt point)
•
Only one valid interrupt per one unit. (INT0 *1)
•
INT1 to INT7 are invalid regardless of interrupt settings.
*1: INT0 indicates the interrupt location on the unit. Interrupt program numbers INT 16 to 23
are available for sequence program setting.
83
Shared Memory Setting
Interrupt setting
When using interrupt function, shared memory setting is needed as
well as setting of the mode setting switch on the bottom of the unit.
In this example, comparison output function generates INT0 interrupt
at CMP0. Enter 「FFFFFFF1」 in shared memory addresses 138h and
139h.
Shared Memory 138h, 139h Settings
(bit) 32
Counter
INT7
number
F
Set value
Settings
Unused
16 15
INT6
INT5
INT4
0
INT3
INT2
INT1
INT0
F
F
F
F
F
F
1
Unused
Unused
Unused
Unused
Unused
Unused
CMP0
Counter Setting
Setting the operation mode for each counter CH.
In the example, pulse string is input to X0 and direction control signal
to X1, and counter function is used in direction control mode. Enter
「FFFFFF00」 to shared memory addresses 100h and 101h.
Shared Memory 100h, 101h Settings
(bit) 32
External input
X7
X5
Input
mode
Functions
setting
F
F
Counter
number
Setting item
Unused
0
X4
X3
Input
mode
Functions
setting
F
F
CH3
Set value
Settings
16 15
X6
X2
X1
Input
mode
Functions
setting
Input
mode
Functions
setting
F
F
0
0
Unused
Direction
control
Used
CH2
Unused
Unused
CH1
Unused
Unused
X0
CH0
Setting the comparison output set value
Setting the comparison output set value to be compared with counter
current value.
In the example, the comparison result is output on CMP0 when
counter current value is 6. Enter K6(H6) in shared memory addresses
120h, 121h.
Shared Memory 120h, 121h Settings
(bit) 32
Setting item
Set value
Settings
84
16 15
0
Comparison output set value (CMP0)
0
0
0
0
0
K6
0
0
6
Setting the Comparison Output Point
Select the counter CH number to be used for comparison output
function, and output logic.
In the example, counter current value at CH0 is compared with
comparison output set value and the result is output. Therefore, enter
「FFFFFFF0」 in shared memory addresses 104h and 105h.
Shared Memory 104h, 105h Settings
(bit) 32
Comparison
CMP7
input
F
Set value
Settings
Unused
16 15
0
CMP6
CMP5
CMP4
CMP3
CMP2
CMP1
F
F
F
F
F
F
0
Unused
Direction
control
Comparision
CMPO *
Unused
Unused
Unused
Unused
CMP0
* CMPO is ON when current value ≥ set value
ATTENTION
When setting the comparison output function, make sure to
first set shared memory for Comparison Output Set Value.
Otherwise, coincidence output is generated at the time of
data setting if the comparison output condition is met, as in
the case that counter initial value and comparison output set
value are both 0.
85
Sample Program
Setting interrupt settings and counter mode settings and comparison
output functions in shared memory.
Describing programs to be run by interrupts following end instruction.
N
This program is an example when the HSC unit is installed in slot 0.
R9013
[ F1 DMV,
Preparing data input
DT100 ]----------------------- Data setting in DT100 to DT101
HFFFFFFF0,
[ F151 WRT,
DT100,
K0,
K2,
H138 ]---------
Assign HSC unit in slot No.0
Shared memory input
Enter 「FFFFFFF1」in addresses 138h
and 139h to generate interrupt function of
INT0 at CMP0.
Input 2 words of data from register DT100 to DT101
into HSC shared memory 138h to 139h.
R9013
[ F1 DMV,
Preparing data input
DT102 ]----------------------- Data setting in DT102 to DT103
HFFFFFF00,
[ F151 WRT,
K0,
DT102,
K2,
H100 ]---------- Shared memory input
Enter pulse string in X0 and direction
control signal in X1, and enter FFFFFF00
Assign HSC unit in slot No.0
in addresses 100h and 101h
to use counter functions in direction
control mode.
Input 2 words of data from register DT102 to DT103
into HSC shared memory 100h to 101h.
R9013
[ F1 DMV,
K6,
[ F151 WRT,
K0,
DT104 ]--------------------DT104,
K2,
Assign HSC unit in slot No.0
Preparing data input
Data setting in DT104 to DT105
H120 ]---------- Shared memory input
Counter current value is compared with
comparision output set value and the
result is output. Enter FFFFFF0 in shared
memory addresses 104h and 105h
Input 2 words of data from register DT104 to DT105
into HSC shared memory 120h to 121h.
R9013
[ F1 DMV,
Preparing data input
DT106 ]------------------*--- Data setting in DT106 to DT107
HFFFFFF00,
[ F151 WRT,
K0,
DT106,
K2,
Assign HSC unit in slot No.0
H104 ]---------- Shared memory input
Enter FFFFFF0 in addresses 104h and
105h to output comparison result
between CH0 counter current value and
comparison output set value.
Input 2 words of data from register DT106 to DT107
into HSC shared memory 104h to 105h.
R9013
[ ICTL,
H0,
H1 ]--------------------------------------- INT0 Interrupt generation permission
( ED )
( INT 0 )------------ Interrupt program No.0
R9010
[ F143,
IORF
K4,
X60
X40
K4 ]-------------------------------- Partial I/O refresh
Y60
<R>
--- Reset Y60
Y60
<S>
--- Set Y60
R9010
[ F143,
IORF
K6,
K6]------------------------------- Partial I/O refresh
( IRET )
86
--- End interrupt program No.0
9
Sample Program
Speed Measuring
Overview
Install HSC unit in slot 0
NX-HSC4
A B
1
1
20
20
(CH0 IN-A)
X0
(CH0 IN-B)
X1
Occupied I/O areas WX0
WX1
WY2
WY3
Count phase input from the encoder,
and calculate rotation per minute
based on the counts.
Formula for calculation of rotation per minute
Rotation per minute =
Pulse per second
Pulse per rotation
x 60 =
Pulse per secondx60 = Pulse per second 3
x
1000
50
Enter phase signal from encoder in X0 and X1, and measure count
numbers per second. Calculate rotation per minute.
In this example, the resolution of encoder is 1000 pulses/rotation.
Rotation per minute is stored in DT6 and DT7 for later checking with
monitor functions of programming tools such as WinFPST S/W.
Flow Chart
Power ON
Set values that are not likely to coincide (K-16777216)
as the target value (DT0,DT1).
1 second stand-by
Read current value (DT2,DT3)
Set initial value to 0 (DT4,DT5)
Convert to rotation (RPM) (DT6,DT7)
87
IMPORTANT
In phase differential input mode, the input pulse
magnification can change with multiplication function.
See "Chapter 2" for detail.
Mode Setting Switch Setting
Set to Mode A when interrupt function is not in use.
Mode A (SW1 →OFF, SW2 →OFF)
No interrupt function
2
1
Interrupt function is not available at this setting.
ON
* Count function can be used regardless of the use status (ON/OFF) of interrupt function.
Shared Memory Setting
Counter Setting
Setting the operation mode for each counter CH.
In the example, the phase signal from encoder is input to X0 and X1,
and counter function is used in 1 multiplication phase input mode, and
therefore enter 「FFFFFF20」 to shared memory addresses 100h and
101h.
Shared Memory 100h, 101h Settings
(bit) 32
External input
XD
X9
Input
mode
Functions
setting
F
F
Counter
number
Setting item
Unused
0
X8
X5
Input
mode
Functions
setting
F
F
CH3
Set value
Settings
16 15
XC
X4
X1
Input
mode
Functions
setting
Input
mode
F
F
2
0
Unused
Phase
input
Terminal
input
CH2
Unused
Unused
CH1
Unused
Unused
X0
CH0
Functions
setting
Counter Current Value Setting
Enter a value that does not coincide with counter current value at CH0.
In this example, enter 「K-16777216(H FF000000)」 in shared memory
addresses 108h and 109h where the current value has been stored.
Shared Memory 108h, 109h Settings
(bit) 32
Setting item
Set value
Settings
88
16 15
0
Comparison output set value (CMP0)
0
0
0
0
0
K-16777216
0
0
0
Sample Program
Enter 「FFFFFF20」 in counter setting areas (100h, 101h) of shared
memory address, and the enter phase signal from encoder in X0 and
X1, and calculate rotation per minute based on the values.
R9013
[ F1 DMV,
Preparing data input
DT0 ]-------------------------- Data setting in DT0 to DT1
HFFFFFF20,
[ F151 WRT,
K0,
DT0,
K2,
Assign HSC unit in slot No.0
H100 ]----------- Shared memory input
Enter phase signals from encoder in X0
and X1, and enter 「FFFFFF20」in
addresses 100h and 101h to use the
counter in 1 multiplication phase input
Input 2 words of data from register DT0 to DT1
into HSC shared memory 100h to 101h
R9013
[ F1 DMV,
[ F151
Preparing data input
DT0 ]-------------------- Data setting in DT0 to DT1
K-16777216,
WRT,
K0,
DT0,
K2,
Assign HSC unit in slot No.0
H108 ]----------- Shared memory input
Enter 「K-16777216」in addresses 108h
and 109h to use a value that does not
coincide with counter current value.
Input 2 words of data from register DT0 to DT1
into HSC shared memory 108h and 109h.
TO
TMX 0, K
10
0.1s Timer
---------- Set K10 to use as 1s timer.
TO
[ F150 READ,
K0,
H108,
K2,
Assign HSC unit in slot No.0
DT2 ]------------ Reading shared memory
Read counter current value from shared
memory 108h and 109h and store them in
into DT2 and DT3 in CPU
Input 2 words of data from current value h108 to h109 at CHO.
into data register DT2 to DT3 in CPU.
[ F1 DMV,
K0,
[ F151 WRT,
K0,
DT4
DT4,
Preparing data input
]------------------------- Data setting in DT4 to DT5
K2,
H108 ]---------- Shared memory input
Enter K0 in addresses 108h and 109h to
reset counter current value.
Assign HSC unit in slot No.0
Input 2 words of data from register DT4 to DT5
Multiply by 32bit
Multiply 「K3」by the read counter
current
value and store the value in CPU
DT6 ]-------------------------module DT6 and DT7.
into HSC shared memory addresses 108h to 109h.
[ F31 D*,
[ F33 D%,
DT2
DT6,
K3,
K50,
DT6 ]--------------------------- Divide by 32bit
Divide DT6 value by「 K50」 and store
the value in CPU module DT6 and DT7.
89
Fixed length Processing
Overview
Install HSC unit in slot No.0
16 points input unit
16 points output unit
0 V(24V DC)
X40
Start input
NX-HSC4
A B
X42
Emergency stop
(CH0 IN-A)
Roller
Motor
1
20
20
X0
Count phase signals
from encoder.
(CH0 IN-B)
1
X1
Occupied
I/O area
Encoder
WX0 WX4 WY5
WX1
WY2
WY3
ƒÕ
(CMP0) Y20
Cutter
Inverter (CMP1) Y21
START/STOP
High/Low Speed
Cutter operation signal Y51
Lead cable
In the example, a transfer roller with diameter of 10cm and 10cm
movement of lead cable by one rotation is used.
With this roller, slow the rotation when lead cable moves 95cm, and
stop rotation at 100cm(10 rotations).
In this example, the resolution of encoder is 500 pulses/rotation. Also,
pulse output is not used, and inverter start/stop is controlled by CMP0
signal, and high/low speed is controlled by CMP1 signal.
Time Chart
Count value and output change according to the input status of each
signal as illustrated below.
Initial value 5000
Initial value 5000
Target value 250
0
Start X40
Emergency stop(X42)
START/STOP(Y20)
(CMP0)
High/low Speed (Y21)
(CMP1)
Cutter operation (Y51)
0.5s 0.2s
90
Flow Chart
Power ON
Target value setting (K250) DT0, DT1
Start (X40)?
Record initial value (K5000) DT2, DT3
Output prevention
(No output at current value=0)
Cutter start (Y51 ON)
0.5 second stand-by
Cutter stop (Y51 OFF)
0.2 second stand-by
Mode Setting Switch Setting
Set to Mode A when interrupt function is not in use.
Mode A (SW1 →OFF, SW2 →OFF)
No Interrupt function
2
1
•
Interrupt function is not available at this setting.
ON
* Count function can be used regardless of the use status (ON/OFF) of interrupt function.
IMPORTANT
In phase differential input mode, the input pulse
magnification can change with multiplication function.
See "Parts and Functions" in Chapter 2.
91
Shared Memory Setting
Counter setting
Setting the operation mode for each counter CH.
In the example, the phase signal from encoder is input to X0 and X1,
and counter function is used in 1 multiplication phase input mode, and
therefore enter 「FFFFFF20」 to shared memory addresses 100h and
101h.
Shared Memory 100h, 101h Settings
(bit) 32
External input
XD
X9
Input
mode
Functions
setting
F
F
Counter
number
Setting item
Unused
0
X8
X5
Input
mode
Functions
setting
F
F
CH3
Set value
Settings
16 15
XC
X4
X1
Input
mode
Functions
setting
Input
mode
F
F
2
0
Unused
Phase
input
Terminal
input
CH2
Unused
Unused
CH1
Unused
Unused
X0
CH0
Functions
setting
Counter Current Value Setting
Enter 「K5000 (H1388)」 as count initial value in the shared memory
addresses 108h and 109h where the counter current value of CH0 is
stored.
Shared Memory 108h, 109h Settings
(bit) 32
Setting item
16 15
F
Set value
0
Comparison output set value (for CMP0)
F
0
0
1
3
8
8
K 5000
Settings
Setting the Comparison Output Set Value
Setting the Comparison output set value to be compared with Counter
current value.
In the example, enter 「K0 (H0)」 in shared memory addresses 120h,
121h and 「K250 (H FA)」 in 122h, 123h, to output CMP0 when counter
current value is 0 and CMP1 when 250.
Shared memory 120h, 121h settings
(bit) 32
Setting item
16 15
0
Set value
0
Comparison output set value (for CMP0)
0
0
0
0
0
0
0
K0
Settings
Shared Memory 122h, 123h Settings
(bit) 32
Setting item
Set value
Settings
92
16 15
0
Comparison output set value (for CMP2)
0
0
0
0
0
K250
0
F
A
Setting the Comparison Output Set Value
Select the counter CH number to be used for comparison output
function, and output logic.
In the example, counter current value at CH0 is compared with
comparison output set value and the result is output as CMP0 and
CMP1. Therefore, enter 「FFFFFF44」 or 「FFFFFF00」 in shared memory
addresses 104h and 105h.
Shared memory 104h, 105h settings
(bit) 32
Comparison Input
16 15
CMP6
CMP5
CMP4
CMP3
CMP2
CMP1
F
F
F
F
F
F
4
Set value
Settings
0
CMP7
CH0 *
Unused Unused Unused Unused Unused Unused
Comparison
CMP0
4
CH0 *
Comparison
* CMPO is ON when current value ≥ set value
Sample Program
In this example, counter and comparison function settings in shared
memory will be made, and button operation program will be started.
R9013
[ F1 DMV,
[ F151
Preparing data input
DT0 ] --------------------------------- Data setting in DT0 to DT1
HFFFFFF2,
WRT,
K0,
DT0,
K2,
Assign HSC unit in slot No.0
Input 2 words of data from register DT0 to DT1
H100 ] ---------------- Shared memory input
The phase signals from encoder is input
to X0, X1 and enter 「FFFFFF20」to
addresses 100h, 101h and therefore
counter function is used in 1
multiplication phase input mode.
into HSC shared memory 100h to 101h.
R9013
[ F1
DMV,
[ F1
DMV,
Preparing data input
DT2 ] ----------------------------- Data setting in DT2 to DT3
K 0,
K 250,
[F151 WRT,
K0,
DT2,
DT4 ] ------------------------------ Data setting in DT4 to DT5
K4,
H120 ] --------------------
Assign HSC unit in slot No.0
Input 4 words of data from register DT2 to DT5
Shared memory input
To output CMP0 when counter current
value reaches 0, and CMP1 when 250,
Enter 「K0」in addresses 120h and 121h,
and enter 「K250」in addresses 122h
and 123h
into HSC shared memory 120h to 123h.
R9013
[ F1 DMV,
[ F151
HFFFFFF44,
WRT,
K0,
DT6,
Preparing data input
DT6 ] ------------------------------- Data setting in DT6 to DT7
K2,
Assign HSC unit in slot No.0
Input 2 words of data from register DT6 to DT7
H104 ] ---------------- Shared memory input
To compare the counter current value and
comparison output set value at CH0, and
output the comparison result as CMP0
and CMP1, enter 「FFFFFF44」in
addresses 104h and 105h.
into HSC shared memory 104h to 105h.
93
X40
R1
X42
R0
[ ]
(DF )
T1
---- Release permission
ON from start signal to comparison
coincidence.
(DF / )
R0
R0
(DF )
1
[ F1
1
DMV,
K 5000
[F151 WRT,
DT8 ] -----------------------------
DT8,
K0,
Preparing data input
K2,
Data setting in DT8 to DT9
H108 ] -------------------- Shared memory input
As the initial counter current value, enter
「K5000」into addresses 108h and 109h.
Assign HSC unit in slot No.0
Input 2 words of data from register DT8 to DT9
into HSC shared memory 108h to 109h.
X10
T1
X42
(DF )
1
R1
R1
1
TMX 0, K5
R1
[ ]
TMX 1, K2
T0
Y51
[ ]
R9010
[F150
READ,
K0,
H108,
Comparison value coincidence oneshort signal
T0 turns ON 0.5 second after comparison
coincidence signal, and then after 0.2
---second T1 turns ON and R1 turns OFF.
Cutter operation
---- Cutter operates for 0.5 second since
comparison coincidence signal.
DT10 ]------------- Reading shared memory (Read)
Counter current value always read from
shared memory addresses 108h and
109h, and then store in DT10 and DT11.
K2,
Assign HSC unit in slot No.0
Read 2 words of data from current value 108h to 109h at CH0
store into data register DT10 to DT11.
X42
[ F1
DMV,
[ F151
Preparing data input
DT10 ]-------------------------------- Data setting in DT10 to DT11.
K-1000,
WRT,
K0,
DT10,
K2,
H108 ]--------------- Shared memory input
Enter 「K-1000」as counter current
value.
Assign HSC unit in slot No.0
Input 2 words of data from register DT10 to DT11
into HSC shared memory 108h to 109h.
Stored Value in Data Register
94
Emergency circuit breaker
Address
Event
DT2 to DT4
Target value
DT8 to DT9
Initial value
DT10 to DT11
Current value
Location Control by Absolute Value
Overview
Install HSC unit in slot No.0
0 V(24V DC)
Start input (Move to +1000)
X40
Start input (Move to -1500)
X41
Emergency stop
X42
Count phase signals
from encoder.
Motor
Encoder
Start/Stop
High/Low
Speed
NX-HSC4
A B
1
1
20
20
(CH0 IN-A) X0
(CH0 IN-B) X1
(CMP0) Y20
Inverter
16 points input unit
16 points output unit
Occupied
I/O area
WX0 WX4 WY5
WX1
WY2
WY3
(CMP1) Y21
Reverse instruction
Y50
Location is controlled by absolute value. In this example, location
changes to +1000 at X40 input and -1500 at X41 input, and then speed
decreases before 300 pulses at the stop point, and finally everything
stops. Also, pulse output is not used, and inverter start/stop is
controlled by CMP0 signal, and high/low speed is controlled by CMP1
signal.
95
Time Chart
Count value and output change according to the input status of each
signal as illustrated below.
X40 ON Target value K1000
(Current value < Target value)
X40 ON Target value K1000
(Current value > Target value)
1000
700
1300
1000
Start (X40)
Start (X40)
CMP0 operation (Y20)
CMP0 operation (Y20)
Direction (Y50)
Direction (Y50)
CMP1 Highspeed (Y21)
CMP1 Highspeed (Y21)
X41 ON Target value K-1500
(Current value < Target value)
X41 ON Target value K-1500
(Current value > Target value)
-1500
-1800
-1200
-1500
Start (X40)
Start (X40)
CMP0 operation (Y20)
CMP0 operation (Y20)
Direction (Y50)
Direction (Y50)
CMP1 Highspeed (Y21)
96
CMP1 Highspeed (Y21)
Flow Chart
Power ON
Always read current value to DT0
and DT1.
NO
X40 ON?
YES
NO
X41 ON?
R0 ON
YES
Record target value (K1000)
DT2, DT3
R1 ON
Record target value (K-1500)
DT2, DT3
Current value < Target value
NO
YES
Record deceleration point (K300)
DT2, DT3
Record deceleration point (K-300)
DT2, DT3
Reverse signal (Y50) ON
Operation signal (Y20) ON
High-speed signal (Y21) ON
NO
Operation signal (Y20) OFF
Current value Target value
High-speed signal (Y21) ON
Current value <Target value
NO
YES
YES
High-speed signal (Y21)
OFF
Comparison > coincidence
NO
YES
Operation signal (Y20) OFF
Reverse signal (Y50) OFF
IMPORTANT
In phase differential input mode, the input pulse
magnification can change with multiplication function.
See "Chapter 2" for details.
97
Mode Setting Switch Setting
Set to Mode A when interrupt function is not in use.
Mode A (SW1 →OFF, SW2 →OFF)
No interrupt function
•
Interrupt function is not available at this setting.
* Count function can be used regardless of the use status (OM/OFF) of interrupt function.
Shared Memory Setting
Counter Setting
Setting the operation mode for each counter CH.
In the example, the phase signal from encoder is input to X0 and X1,
and counter function is used in 1 multiplication phase input mode, and
therefore enter 「FFFFFF20」 to shared memory addresses 100h and
101h.
Shared Memory 100h, 101h Settings
(bit) 32
External input
Counter
number
Setting item
XD
XC
X9
CH3
X8
0
X5
CH2
X4
X1
CH1
X0
CH0
Input
mode
Functions
setting
Input
mode
Functions
setting
Input
mode
Functions
setting
F
F
F
F
F
F
2
0
Unused
Phase
input
Terminal
Input
Set value
Settings
16 15
Unused
Unused
Unused
Unused
Unused
Input
mode
Functions
setting
Setting the Comparison Output Set Value
Setting the Comparison output set value to be compared with Counter
current value.
In this example, enter 「K1000 (H 3E8)」 into shared memory
addresses 120h and 121h when X40 turns ON, and
「K-1500 (H FFFFFA24)」 into 120h and 121h when X41 ON.
Shared Memory 120h, 121h Settings (X40 ON)
(bit) 32
Setting item
16 15
0
Set value
0
Comparison output set value (for CMP0)
0
0
0
0
3
E
8
K 1000
Settings
Shared Memory 120h, 121h Settings (X41 ON)
(bit) 32
Setting item
Set value
Settings
98
16 15
0
Comparison output set value (for CMP0)
F
F
F
F
F
K-1500
A
2
4
Setting the Comparison Output Point
Select the counter CH number to be used for comparison output
function, and output logic.
In the example, counter current value at CH0 is compared with
comparison output set value, and the result is output at CMP0 and
CMP1. Therefore, enter 「FFFFFF44」 or 「FFFFFF00」 in shared
memory addresses 104h and 105h.
Shared Memory 104h, 105h Settings
16 15
(bit) 32
Comparison
CMP7
input
Set value
F
Settings
Unused
0
CMP6
CMP5
CMP4
CMP3
CMP2
CMP1
F
F
F
F
F
4
4
Unused
CH0 *
Comparison
CH0 *
Comparison
Unused
Unused
Unused
Unused
CMP0
* CMPO is ON when current value ≥ set value
Sample Program
In this example, counter and comparison function settings in shared
memory will be made, and button operation program will be started.
R9010
[ F150
READ,
K0,
H108,
K2,
Assign HSC unit in slot No.0
DT0 ]--------------- Reading shared memory (READ)
Always read counter current value from
shared memory addresses 108h and
store it into DT0 and DT1.
Read 2 words of CH0 current value data from 108h and 109h
and store into data registers DT0 to DT1 (READ)
X40
X38
X42
R0
X40 ON detection
[ ] --------- Set 「K1000 」 as target value
(DF )
R0
[ F1 DMV,
X38
X41
Preparing data input
DT2 ]--------------------------------------- Data setting in DT2 to DT3
K 1000,
X42
X41 ON detection
R1
[ ] --------- Set 「K-1500 」as target value
(DF )
R1
[ F1 DMV,
Preparing data input
DT2 ]--------------------------------------- Data setting in DT2 to DT3
K-1500,
R0
R2
Start switch ON detection
[ ] --------- With X40, X41 ON, turn R2 ON by only
one scan.
R1
R2
[ F151 WRT,
K0,
DT2,
K2,
Assign HSC unit in slot No.0
H120 ]------------------- Shared memory input
To output CMP0 when counter value
reaches the values at DT2 and DT3, enter
values into addresses 120h and 121h.
Input 2 words of data from register DT2 to DT3
into HSC shared memory 120h to 121h.
[ F61
R2
R900A
R2
R900C
DCMP,
DT 0,
32-bit data comparison
DT2 ] ------------------------------------ Compare Current value and target value
current value.
R3
[ ] --------- If target value is larger
R4
[ ] --------- If target value is smaller
99
R3
( DF )
1
32bit added
Add K300 to target value and store the
DT4 ]---------------------------- value into DT4 and DT5.
( DF/ )
[ F23 D+,
1
DT2,
[ F151 WRT,
K 300,
K0,
DT4,
K2,
H122 ]------------- Shared memory input
To set CMP0 as output when counter
current value reaches K300 less than
Assign HSC unit in slot No.0
target value, enter DT4 and DT5 values
into addresses 122h and 123h.
Input 2 words of data from register DT4 to DT5
into HSC shared memory 122h to 123h.
[ F1 DMV,
Preparing data input
Data
setting for DT6 to DT7.
DT6 ]----------------------------
HFFFFFF44,
[ F151 WRT,
K0,
DT6,
K2,
H104 ]---------------- Shared memory input
To compare the counter current value and
comparison output set value at CH0, and
Assign HSC unit in slot No.0
output the comparison result as CMP0
and CMP1, enter 「FFFFFF44」 in
Input 2 words of data from register DT6 to DT7
addresses 104h and 105h.
into HSC shared memory 104h to 105h.
R4
( DF )
[ F23 D-,
DT2,
[ F151 WRT,
32bit subtracted
Subtract K300 to target value and store
DT8 ]---------------------------- the value into DT8 and DT9.
1
( DF/ )
K 300,
K0,
DT8,
K2,
H122
Assign HSC unit in slot No.0
Input 2 words of data from register DT8 to DT9
]------------- Shared memory input
To set CMP0 as output when counter
current value reaches K300 more than
target value, enter DT8 and DT9 values
into addresses 122h and 123h.
into HSC shared memory 122h to 123h.
[ F1 DMV,
HFFFFFF00,
DT10
H104 ]------------- Shared memory input
To compare the counter current value and
comparison output set value at CH0, and
Assign HSC unit in slot No.0
output the comparison result as CMP0
and CMP1, enter 「FFFFFF00」 in
addresses 104h and 105h.
Input 2 words of data from register DT10 to DT11
[ F151 WRT,
K0,
DT10,
Preparing data input
]------------------------ Data setting in DT10 to DT11
K2,
into HSC shared memory 104h to 105h.
X10
R5
[ ]
( DF/ )
R3
R5
X42
Y50
[ ] ---- Reverse signal
Turn on the reverse signal at inverter.
( DF )
Y50
X42
[ F1
DMV,
[ F151 WRT,
HFFFFFFFF,
K0,
Emergency circuit breaker
Preparing data input
DT96 ]--------------------------- Data setting for DT96 to DT97.
DT96,
K2,
H104 ]---------- Shared memory input
Enter 「FFFFFFFF」 into addresses 104h
and 105h.
Assign HSC unit in slot No.0
Input 2 words of data from register DT96 to DT97
into HSC shared memory 104h to 105h.
100
Comparison coincidence
---- Comparison coincidence signal detection
on rising edge.
Stored value in data register
Address
Event
DT0, DT1
Current value
DT2, DT3
Target value
DT4, DT5
Deceleration point
DT8, DT9
Deceleration point
Location Control by Data Table
Overview
Install HSC unit in slot No.0
0 V(24V DC)
Start input
16 points input unit
16 points output unit
X40
NX-HSC4
Emergency stop
A B
X42
(CH0 IN-A)
Count phase signals
from encoder.
Motor
1
1
20
20
X0
(CH0 IN-B) X1
Encoder
Occupied
I/O area
(CMP0) Y20
Inverter Start/Stop
High/Low
Speed
WX0 WX4 WY5
WX1
WY2
WY3
(CMP1) Y21
Y50
Reverse instruction
In the example, location is controlled as absolute values according to
the set values in data table.
Speed decreases before 300 pulses at the stop point, and finally all
stop. Data table is organized as follows, and deceleration point value
(relative pulse value) is also registered.
Address
Set value
Event
DT10, DT11
K 300
Speed turning point
DT12, DT13
K 2000
Target value 1
DT14, DT15
K -1500
Target value 2
DT16, DT17
K -2000
Target value 3
DT18, DT19
K 3000
Target value 4
DT20, DT21
K0
Target value 5
Also, pulse output is not used, and inverter start/stop is controlled by
CMP0 signal, and high/low speed is controlled by CMP1 signal.
101
Time Chart
Count value and output change according to the input status of each
signal as illustrated below.
Deceleration starts K300 pulses prior to each target value.
2s
3000
2000
2s
0
2s
2s
-1500
-2000
Start (X40)
CMP0 operation
(Y20)
Direction (Y50)
CMP1 Highspeed (Y21)
102
Flow Chart
Power ON
Organizing operation
pattern table
Always read current values from
DT0 and DT1, and set IXDT12
value into data register target
value area.
Start?
X40 ON
NO
YES
Initialize index as 0
Enter IXDT12 value as target
value.
Current value < Target value?
NO
Enter deceleration point (K300)
DT4, DT5
YES
Enter deceleration point
(K-300)DT4,DT5
Operation signa (Y20) ON
Operation signal (Y20) ON
Reverse signal (Y50) ON
High-speed signal (Y21) ON
Current value >
Deceleration point?
NO
YES
High-speed signal (Y21) ON
Current value <
Deceleration point?
NO
YES
High-speed signal
(Y21) OFF
Comparison
coincidence (EQ0) ON?
NO
YES
Operation signal (Y20) OFF
Reverse signal (Y50) OFF
2 seconds stand-by
IX + 2 => IX
IX > K9
YES
NO
103
Mode Setting Switch Setting
Set to Mode A when interrupt function is not in use.
Mode A (SW1 →OFF, SW2 →OFF)
No interrupt function
•
Interrupt function is not available at this setting.
* Count function can be used regardless of the use status (used or unused) of interrupt
function.
Shared Memory Setting
Counter Setting
Setting the operation mode for each counter CH.
In the example, the phase signal from encoder is input to X0 and X1,
and counter function is used in 1 multiplication phase input mode, and
therefore enter 「FFFFFF20」 to shared memory addresses 100h and
101h.
Shared Memory 100h, 101h Settings
(bit) 32
External input
XD
Counter
number
Setting item
XC
X9
CH3
X8
0
X5
CH2
X4
X1
CH1
X0
CH0
Input
mode
Functions
setting
Input
mode
Functions
setting
Input
mode
Functions
setting
F
F
F
F
F
F
2
0
Unused
Phase
input
Terminal
input
Set value
Settings
16 15
Unused
Unused
Unused
Unused
Unused
Input
mode
Functions
setting
Setting the Comparison Output Set Value
Setting the operation mode for each counter CH.
In the example, 「K2000(H 7D0)」 , 「K-1500(H FFFFFA24)」 , 「K-2000(H
FFFFF830)」 , 「K3000(H BB8)」 , 「K0(H 0)」 is input to shared memory
addresses 120h and 121h in sequential order.
Shared Memory 120h, 121h Settings (Target Value 1)
(bit) 32
Setting item
16 15
0
Set value
0
Comparison output set value (for CMP0)
0
0
0
0
7
D
0
K 2000
Settings
Shared Memory 120h, 121h Settings (Target Value 2)
(bit) 32
Setting item
Set value
Settings
104
16 15
0
Comparison output set value (for CMP1)
F
F
F
F
F
K-1500
A
2
4
Shared Memory 120h, 121h Settings (Target Value 3)
(bit) 32
Setting item
16 15
F
Set value
0
Comparison output set value (for CMP0)
F
F
F
F
8
3
0
K -2000
Settings
Shared Memory 120h, 121h Settings (Target Value 4)
(bit) 32
Setting item
16 15
0
Set value
0
Comparison output set value (for CMP0)
0
0
0
0
B
B
8
K 3000
Settings
Shared Memory 120h, 121h Settings (Target Value 5)
(bit) 32
Setting item
16 15
0
Set value
0
Comparison output set value (for CMP0)
0
0
0
0
0
0
0
K0
Settings
Setting the Comparison Output Point
Select the counter CH number to be used for comparison output
function, and output logic.
In the example, counter current value at CH0 is compared with
comparison output set value, and the result is output at CMP0 and
CMP1. Therefore, enter 「FFFFFF44」 or 「FFFFFF00」 in shared
memory addresses 104h and 105h.
Shared Memory 104h, 105h Settings
16 15
(bit) 32
Comparison input
Set value
Settings
0
CMP7
CMP6
CMP5
CMP4
CMP3
CMP2
CMP1
CMP0
F
F
F
F
F
F
4
4
Unused
Unused
Unused
Unused
Unused
Unused
CH0 *
CH0 *
Comparison Comparison
* CMPO is ON when current value ≥ set value
105
Sample Program
In this example, counter and comparison function settings in shared
memory will be made, and button operation program will be started.
R9010
[ F1 DMV,
K300,
[ F1 DMV,
K2000,
[ F1 DMV,
K-2000,
[ F1 DMV,
K3000,
DT10 ]------------------------------- Preparing data input
Set the number of pulses before target
DT12 ]
value into DT10 to DT11 where
DT14 ]
deceleration starts
DT16 ]
Set 5 points as location decision target
value into DT12 to DT21.
DT18 ]
[ F1 DMV,
K-1500,
[ F1 DMV,
K0,
DT20 ]
R9010
[ F150 READ,
K0,
H108,
K2,
Assign HSC unit in slot No.0
DT0 ]------------- Read shared memory (READ)
Always read counter current value from
shared memory address 108h, and store
the value into DT0 and DT1.
Read 2 words of data from current value 108h to 109h CH0
store into data register DT0 to DT1.
[ F1
DMV,
I0DT12,
DT2 ]
X42
( MC 0)
X40
X38
R0
[ ]
( DF )
----- Emergency stop when OFF
----- X40 ON detection
Initialize index as 0
R0
[ F1
DMV,
K0,
I0 ]
R0
R2
[ ]
----- Start switch ON detection
With X40 ON, only 1 scan turns ON.
R1
R2
[ F151 WRT,
K0,
Assign HSC unit in slot No.0
I0DT12,
K2,
H120 ]---------- Shared memory input
To output CMP0 when counter value
reaches the values at DT12 and DT13,
enter the values into address 120h.
Input 2 words of data from register I0DT12 to I0DT13
into HSC shared memory 120h to 121h.
[ F61
106
R2
R900A
R2
R900C
DCMP,
DT0,
I0DT12 ]---------------------------- 32-bit data comparison
Compare current and target value
R3
----- If target value is larger
[ ]
R4
[ ]
----- If target value is smaller
R3
( DF )
1
32bit added
Add K300 to target value and store the
DT4 ]-------------------------- value into DT4 and DT5.
( DF/ )
1
[ F23 D+, I0DR12, DT10,
[ F151 WRT,
K0,
DT4,
K2,
Assign HSC unit in slot No.0
H122 ]-------------- Shared memory input
To set CMP1 as output when counter
current value reaches K300 less than
target value, enter DT4 and DT5 values
into addresses 122h and 123h.
Input 2 words of data from register DT4 to DT5
into HSC shared memory 122h to 123h.
[ F1 DMV,
Preparing data input
DT0 ]---------------------------- Data setting at DT0 to DT1
HFFFFFF44,
[ F151 WRT,
K0,
DT0,
K2,
H104 ]-----------
Assign HSC unit in slot No.0
Input 2 words of data from data register DT0 to DT1
Shared memory input
To compare the counter current value and
comparison output set value at CH0, and
output the comparison result as CMP0
and CMP1, enter FFFFFF44 in addresses
104h and 105h.
into HSC shared memory 104h to 105h.
R4
( DF )
[ F23 D-, DT2, K300,
1
[ F151 WRT,
32bit subtracted
Subtract K300 to target value and store
DT4 ]------------------------------- the value into DT4 and DT5.
1
( DF/ )
K0,
DT4,
K2,
H122 ]----------------
Assign HSC unit in slot No.0
Shared memory input
To set CMP0 as output when counter
current value reaches K300 more than
target value, enter DT4 and DT5 values
into addresses 122h and 123h.
Input 2 words of data from register DT4 to DT5
into HSC shared memory 122h to 123h.
[ F1 DMV,
[ F151 WRT,
HFFFFFF00,
K0,
DT0,
Preparing data input
DT0 ]---------------------------- Data setting at DT0 to DT1
K2,
H104 ]---------------- Shared memory input
To compare the counter current value and
comparison output set value at CH0, and
Assign HSC unit in slot No.0
output the comparison result as CMP0
and CMP1, enter FFFFFF00 in addresses
104h and 105h.
Input 2 words of data from register DT0 to DT1
into HSC shared memory 104h to 105h.
X10
R5
[ ]
( DF/ )
R3
R5
( DF )
X42
Comparison coincidence
---- Comparison coincidence signal detection
on rising edge.
Y50
[ ] ---- Reverse signal
Turn on the reverse signal at inverter.
Y50
107
R9010
[ F61 DCMP,
R3
DT0,
]------------------------------- 32-bit data comparison
Compare current value and deceleration
point
R6
[ ]
DT4
TO
Y50
TMX0, K20
T0
[ F22
T0
[ F60
R900C
+,
I0,
CMP,
K2,
I0,
I0
0.1s Timer
----- Set K20 and use it as 2s timer
16-bit added
] ------------------------ Add K2 to 10 and change target value.
]------------------------- 16-bit data comparison
Compare values in 10 and K9
R1
[ ] ----- Decide if values in 10 < K9
K9
(MCE 0)
Emergency circuit breaker
X42
[ F1 DMV,
[ F151 WRT,
DT96 ]--------------------------- Preparing data input
Data setting in DT96 to DT97
HFFFFFFFF,
K0,
DT96,
K2,
H104 ]-------------- Shared memory input
Enter FFFFFFFF into addresses 104h and
105h.
Assign HSC unit in slot No.0
Input 2 words of data from register DT96 to DT97
into HSC shared memory 104h to 105h.
Stored value in data register
Address
108
Event
DT0, DT1
Current value
DT2, DT3
Current target value
DT4, DT5
Deceleration point (Absolute value)
DT10, DT11
Deceleration point (Absolute value)
DT12, DT13
Target value 1
DT14, DT15
Target value 2
DT16, DT17
Target value 3
DT18, DT19
Target value 4
DT20, DT21
Target value 5
NX70/NX700 Series High-Speed Counter Modules (4CH)
(NX70-HSC4 and NX-HSC4) User Manual
www.samsungautomation.co.kr
Rockwell Samsung Automation
Technical Support
447-6, Gongse-Ri, Giheung-Eup, Youngin-City,
Gyeonggi-Do, South Korea, 449-902
Tel: 82-31-280-4700 Fax: 82-31-280-4900
Export Sales Team
Tel: 82-31-280-4768 Fax: 82-31-280-4900
Trademarks not belonging to Rockwell Samsung
Automation are property of their respective companies.
Publication RSA-NX700-UM010A-EN-P - March 2005 9
Copyright © 2005 Rockwell Samsung Automation. All rights reserved. Printed in Korea.