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.
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 ...................
7. Comparison Output Function ................................... 67 Comparison Output Function...................................................................... 67 Comparison Output Function with Counter ............................................... 70 Overview ....................................................................................................... 70 Time Chart .................................................................................................... 70 Mode Setting Switch..
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.
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.
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.
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 resistanc
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.
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.
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 -
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
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 Int
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 CMP
Shared Memory Areas NX700, NX70 PLC High-speed counter unit (4CH) shared memory map.
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.
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.
106h, 107h 108h to 10Fh Reserved 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.
130h to 137h 138h, 139h N Reserved Interrupt Setting Set interrupt function mode according to the table below.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Status LED Unit LED indicates the I/O status at the terminals. Refer to the table below.
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 - -
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 pa
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.
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
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
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.
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 - - -
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 CMP
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
Step . Shared Memory Setting for Comparison Output Point Select the counter CH to be compared with comparison output set value, and output logic.
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.
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.
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.
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.
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.
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.
Step Shared Memory Setting Shared memory setting is needed along with mode switch setting. Set interrupt function mode according to the table below.
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.
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.
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).
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.
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 interrup
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Time Chart Count value and output change according to the input status of each signal as illustrated below.
Flow Chart Power ON Always read current value to DT0 and DT1.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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.