The text of a manual · part 26 of 38
DL06 Micro PLC User Manual, Volume 2 of 2, pages 250 to 259
Pages 250 to 259 of 370
The original document is the PDF (6.0 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
Page 250
Appendix D: Special Relays
Counter 2 Mode 10 Equal Relays
1 2 3 D 5 6 7 8 9 10 11 12 13 14 A B C D
SP570 SP571 SP572 SP573 SP574 SP575 SP576 SP577 SP600 SP601 SP602 SP603 SP604 SP605 SP606 SP607 SP610 SP611 SP612 SP613 SP614 SP615 SP616 SP617
D–6
Current = target value
On when the counter current value equals the value in V3711/3710
Current = target value
On when the counter current value equals the value in V3713/3712
Current = target value
On when the counter current value equals the value in V3715/3714
Current = target value
On when the counter current value equals the value in V3717/3716
Current = target value
On when the counter current value equals the value in V3721/3720
Current = target value
On when the counter current value equals the value in V3723/3722
Current = target value
On when the counter current value equals the value in V3725/3724
Current = target value
On when the counter current value equals the value in V3727/3726
Current = target value
On when the counter current value equals the value in V3731/3730
Current = target value
On when the counter current value equals the value in V3733/3732
Current = target value
On when the counter current value equals the value in V3735/3734
Current = target value
On when the counter current value equals the value in V3737/3736
Current = target value
On when the counter current value equals the value in V3741/3740
Current = target value
On when the counter current value equals the value in V3743/3742
Current = target value
On when the counter current value equals the value in V3745/3744
Current = target value
On when the counter current value equals the value in V3747/3746
Current = target value
On when the counter current value equals the value in V3751/3750
Current = target value
On when the counter current value equals the value in V3753/3752
Current = target value
On when the counter current value equals the value in V3755/3754
Current = target value
On when the counter current value equals the value in V3757/3756
Current = target value
On when the counter current value equals the value in V3761/3760
Current = target value
On when the counter current value equals the value in V3763/3762
Current = target value
On when the counter current value equals the value in V3765/3764
Current = target value
On when the counter current value equals the value in V3767/3766
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Page 251
HIGH-SPEED INPUT AND PULSE OUTPUT FEATURES
A PPENDIX
E
In This Appendix Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–2 Choosing the HSIO Operating Mode . . . . . . . . . . . . . . . . . . . . . . .E–4 Mode 10: High-Speed Counter . . . . . . . . . . . . . . . . . . . . . . . . . . .E–7 Mode 20: Up/Down Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–24 Presets and Special Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–27 Mode 30: Pulse Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–38 Mode 40: High-Speed Interrupts . . . . . . . . . . . . . . . . . . . . . . . . .E–64 Mode 50: Pulse Catch Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E–69 Mode 60: Discrete Inputs with Filter . . . . . . . . . . . . . . . . . . . . . . .E–73
Page 252
Appendix E: High-speed Input and Pulse Output Features
Introduction
1 2 3 4 E 6 7 8 9 10 11 12 13 14 A B C D
Built-in Motion Control Solution Many machine control applications require various types of simple high-speed monitoring and control. These applications usually involve some type of motion control, or high-speed interrupts for time-critical events. The DL06 Micro PLC solves this traditionally expensive problem with built-in CPU enhancements. Let’s take a closer look at the available high-speed I/O features. The available high-speed input features are: • High Speed Counter (7 kHz max.) with up to 24 counter presets and built-in interrupt subroutine, counts up only, with reset • Quadrature encoder inputs to measure counts and clockwise or counter clockwise direction (7 kHz max.), counts up or down, with reset • High-speed interrupt inputs for immediate response to critical or time-sensitive tasks • Pulse catch feature to monitor one input point, having a pulse width as small as 100µs (0.1ms) • Programmable discrete filtering (both on and off delay up to 99ms) to ensure input signal integrity (this is the default mode for inputs X0–X3)
The available pulse output features are: • Single-axis programmable pulse output (10 kHz max.) with three profile types, including trapezoidal moves, registration, and velocity control
Availability of HSIO Features IMPORTANT: Please note the following restrictions on availability of features: • High-speed input options are available only on DL06s with DC inputs. • Pulse output options are available only on DL06s with DC outputs. • Only one HSIO feature may be in use at one time. You cannot use a high–speed input feature and the pulse output at the same time.
Specifications DL06 Part Number D0–06AA D0–06AR D0–06DA D0–06DD1 D0–06DD2 D0–06DR D0–06DD1–D D0–06DD2–D D0–06DR–D
E–2
Discrete Input Type Discrete Output Type AC AC DC DC DC DC DC DC DC
AC Relay AC DC DC Relay DC DC Relay
DL06 Micro PLC User Manual, 3rd Edition Rev. A
High-Speed Input
Pulse Output
No No Yes Yes Yes Yes Yes Yes Yes
No No No Yes Yes No Yes Yes No
Page 253
Appendix E: High-speed Input and Pulse Output Features
Dedicated High- Speed I/O Circuit The internal CPU’s main task is to execute the ladder program and read/write all I/O points during each scan. In order to service high-speed I/O events, the DL06 includes a special circuit which is dedicated to a portion of the I/O points. Refer to the DL06 block diagram in the figure below.
1 2 3 4 E 6 7 The high-speed I/O circuit (HSIO) is dedicated to the first four inputs (X0 – X3) and the 8 first two outputs (Y0 – Y1). We might think of this as a “CPU helper”. In the default operation (called “Mode 60”) the HSIO circuit just passes through the I/O signals to or from 9 the CPU, so that all twenty inputs behave equally and all sixteen outputs behave equally. When the CPU is configured in any other HSIO Mode, the HSIO circuit imposes a specialized function on the portion of inputs and outputs shown. The HSIO circuit operates 10 independently of the CPU program scan. This provides accurate measurement and capturing of high-speed I/O activity while the CPU is busy with ladder program execution. 11 Wiring Diagrams for Each HSIO Mode After choosing the appropriate HSIO mode for your application, you’ll need to refer to the section in this appendix for that specific mode. Each section includes wiring diagrams to help 12 you connect the High-Speed I/O points correctly to field devices. An example of a High Speed Counter mode diagram is shown below. 13 14 A B C D 16 Discrete Outputs
DL06 PLC
Output Circuit
Y0, Y1
High-Speed I/O Circuit
X0 - X3
Y2 - Y17
CPU
X4 - X23
Input Circuit
20 Discrete Inputs
C0
X1
X0
X3
X2
X4
C1
X6
X5
X7
C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3
TERM
PORT1
PORT2
RUN STOP
Counter Input Wiring Signal
–
+
Signal Common
12-24 VDC Supply
DL06 Micro PLC User Manual, 3rd Edition Rev. A
E–3
Page 254
Appendix E: High-speed Input and Pulse Output Features
Choosing the HSIO Operating Mode
1 2 3 4 E 6 7 8 9 10 11 12 13 14 A B C D E–4
Understanding the Six Modes The High-Speed I/O circuit operates in one of 6 basic modes as listed in the table below. The number in the left column is the mode number (later, we’ll use these numbers to configure the PLC). Choose one of the following modes according to the primary function you want from the dedicated High-Speed I/O circuit. You can simply use all twenty inputs and sixteen outputs as regular I/O points with Mode 60. High Speed I/O Basic Modes Mode 10
High-Speed Counter
20
Up/Down Counter
Mode Features Two 7 kHz counters with 24 presets and reset input, counts up only, cause interrupt on preset 7 kHz up/down counter with 24 presets and reset, causes interrupt on preset Channel A / Channel B 7 kHz quadrature input, counts up and down
30
Pulse Output
40 50 60
High-Speed Interrupt Pulse Catch Filtered Input
Stepper control – pulse and direction signals, programmable motion profile (10kHz max.) Generates an interrupt based on input transition or time Captures narrow pulses on a selected input Rejects narrow pulses on selected inputs
In choosing one of the six high-speed I/O modes, the I/O points listed in the table below operate only as the function listed. If an input point is not specifically used to support a particular mode, it usually operates as a filtered input by default. Similarly, output points operate normally unless Pulse Output mode is selected.
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Page 255
Appendix E: High-speed Input and Pulse Output Features
Physical I/O Point Usage Mode
10
20
30 40
X0
High-Speed Counter Counter #1
DC Input Points X1 X2
X3
DC Output Points Y0 Y1
Counter #2, Reset #1, Reset #2, Regular Interrupt, Interrupt, Interrupt, Pulse Input or Pulse Input or Pulse Input or Output Filtered Input Filtered Input Filtered Input
Up/Down counter Down (Standard counting) Up Counting Counting Up/Down counter Phase A (Quadrature counting) Input Pulse Output
Pulse Input Pulse Input or Pulse Input or Pulse Input or Pulse or or Filtered Filtered Input Filtered Input Filtered Input CW Pulse Input
Pulse Catch
60
Filtered Input
Regular Output
Direction or CCW Pulse
Interrupt, Interrupt, Interrupt, Pulse Input or Pulse Input or Pulse Input or Regular Filtered Input Filtered Input Filtered Input Output
Regular Output
Pulse Input, Pulse Input, Pulse Input, Pulse Input Interrupt or Interrupt or Interrupt or Regular Filtered Input Filtered Input Filtered Input Output Filtered Input Filtered Input Filtered Input Filtered Input Regular Output
Regular Output
High-Speed Interrupt Interrupt
50
Reset, Input or Regular Pulse Input or Pulse Filtered Input Output Filtered Input Phase B Input
Regular Output
Regular Output
Default Mode Mode 60 (Filtered Inputs) is the default mode. The DL06 is initialized to this mode at the factory, and any time you initialize the scratchpad memory. In the default condition, X0–X3 are filtered inputs (10 ms delay) and Y0–Y1 are standard outputs.
DL06 Micro PLC User Manual, 3rd Edition Rev. A
1 2 3 4 E 6 7 8 9 10 11 12 13 14 A B C D
E–5
Page 256
Appendix E: High-speed Input and Pulse Output Features
Configuring the HSIO Mode
1 2 3 4 E 6 7 8 9 10 11 12 13 14 A B C D E–6
If you have chosen a mode suited to the high-speed I/O needs of your application, we’re ready to proceed to configure the PLC to operate accordingly. In the block diagram below, notice the V-memory detail in the expanded CPU block. V-memory location V7633 determines the functional mode of the high-speed I/O circuit. This is the most important V-memory configuration value for HSIO functions! Output Circuit
DL06 PLC
Y0 - Y1
Y2 - Y17
CPU
I/O Data
High-Speed I/O Circuit
V-Memory
Mode Select
V7633
X0 - X3 xxxx
X4 - X23
Input Circuit
The contents of V7633 is a 16-bit word, to be entered in binary–coded decimal. The figure below defines what each 4-bit BCD digit of the word represents. Memory Location V7633 Bits
15
14
13
12 11
10
9
8
7
6
5
4
3
2
1
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
5
0
Miscellaneous Setup (BCD)
HSIO Mode Setup (BCD)
00 = Not Used (default) 10 = Battery Enabled 20 = Power-up in RUN 30 = Battery Enabled and Power-up in RUN
00 = Not Used 10 = High-Speed Counter 20 = Up/Down Counter 30 = Pulse Output 40 = High-Speed Interrupts 50 = Pulse Catch 60 = Filtered Inputs (default)
Bits 0 – 7 define the mode number 00, 10.. 60 previously referenced in this appendix. The example data “0050” shown selects Mode 50 – Pulse Catch (BCD = 50).
Configuring Inputs X0 – X3 In addition to configuring V7633 for the HSIO mode, you’ll need to program the next four locations in certain modes according to the desired function of input points X0 – X3. Other memory locations may require configuring, depending on the HSIO mode (see the corresponding section for particular HSIO modes).
DL06 Micro PLC User Manual, 3rd Edition Rev. A
V-Memory Mode X0 X1 X2 X3
V7633 V7634 V7635 V7636 V7637 xxxx xxxx xxxx xxxx xxxx
Page 257
Appendix E: High-speed Input and Pulse Output Features
Mode 10: High-Speed Counter
1 The HSIO circuit contains two high-speed counters. A single pulse train from an external 2 source (X0) clocks the counter on each signal leading edge. The counter counts only upwards, from 0 to 99999999. The counter compares the current count with up to 24 preset values, 3 which you define. The purpose of the presets is to quickly cause an action upon arrival at specific counts, making it ideal for such applications as cut-to-length. It uses counter registers CT174 to CT177 in the CPU. 4 Functional Block Diagram Refer to the block diagram below. When the lower byte of HSIO Mode register V7633 E contains a BCD “10”, the high-speed up counter in the HSIO circuit is enabled. X0 and X1 automatically become the “clock” inputs for the high-speed counters, incrementing them 6 upon each off-to-on transition. The external reset input on X2 and X3 are the default configuration for Mode 10. 7 8 9 10 11 12 Instead of using X2 and X3 as dedicated reset inputs, you can configure X2 and X3 as normal filtered inputs. In this way, the counter reset must be generated in ladder logic. 13 14 A B C D Purpose
Output Circuit
DL06 PLC
Y2 - Y17
Y0 - Y1
HSIO
Counter 1
Counter 2
CLK Reset X0
I/O data
X2
CLK Reset X1
Mode Select
Filter
CPU
V-memory
V7633
0010
X4 - X23
X3
Input Circuit
Output Circuit
DL06 PLC
Y2 - Y17
Y0 - Y1
HSIO
Counter 1
CLK Reset X0
I/O data
Counter 2
CLK Reset X1
Filter
Mode Select
X2 - X3
CPU
V-memory
V7633
0010
X4 - X23
Input Circuit
DL06 Micro PLC User Manual, 3rd Edition Rev. A
E–7
Page 258
Appendix E: High-speed Input and Pulse Output Features
Wiring Diagram
1 2 3 4 E 6 7 8 9 10 11 12 13 14 A B C D
A general wiring diagram for counters/encoders to the DL06 in HSIO Mode 10 is shown below. Many types of pulse-generating devices may be used, such as proximity switches, singlechannel encoders, magnetic or optical sensors, etc. Devices with sinking outputs (NPN open collector) are probably the best choice for interfacing. If the counter sources to the inputs, it must output 12 to 24 VDC. Note that devices with 5V sourcing outputs will not work with DL06 inputs. C0
X1 X0
X3 X2
X4 C1
X6 X5
X7
C2 X11 X13 X14 X16 C4 X21 X23 N.C. X15 X17 X20 X22 N.C. X10 X12 C3
TERM PORT1
PORT2
RUN STOP
Counter Input Wiring Signal
–
+
Signal Common
12-24 VDC Supply
Interfacing to Counter Inputs
E–8
The DL06’s DC inputs are flexible in that they detect current flow in either direction, so they can be wired to a sensor with either sourcing or sinking outputs. In the following circuit, a sensor has an open-collector NPN transistor output. It sinks current from the PLC input point, which sources current. The power supply can be the FA–24PS or another supply (+12VDC or +24VDC), as long as the input specifications are met. Sensor Output
X0 - X3 Input Input (sourcing)
Output (sinking) 12-24 VDC Supply Ground
–
+
Common
In the circuit diagram below, an encoder has open-emitter PNP transistor outputs. It sources current to the PLC input point, which sinks the current back to ground. Since the encoder sources current, no additional power supply is required. However, note that the encoder output must be 12 to 24 volts (5V encoder outputs will not work). Encoder Output X0 - X3 Input
+12 to 24 VDC
Input Output (sourcing) Ground
(sinking) Common
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Page 259
Appendix E: High-speed Input and Pulse Output Features
Setup for Mode 10 V7633 is the HSIO Mode Select register. Refer to the diagram below. Use BCD 10 in the lower byte of V7633 to select the High-Speed Counter Mode.
1 2 3 4 Choose the most convenient method of programming V7633 from the following: E • Include load and out instructions in your ladder program • DirectSOFT 5’s memory editor or Data View 6 • Use the Handheld Programmer D2–HPP We recommend using the first method above so that the HSIO setup becomes an integral part of 7 your application program. An example program later in this section shows how to do this. 8 Presets and Special Relays Presets are used to cause a particular action to occur when the count reaches the preset value. Refer to the figure below. Each counter features 24 presets, which you can program. Presets 9 are double word numbers so they occupy two V-memory registers. The user selects the preset values, and the counter continuously compares the current count with the preset. When the 10 two are equal, a special relay contact is energized and program execution jumps to the interrupt routine. We recommend using the special relay(s) in the interrupt service routine to cause any immediate action you 11 desire. After the interrupt service routine is complete, the CPU returns to the ladder program, resuming program execution from the point of interruption. The compare function is ready for the next preset event. 12 13 14 A B C D Memory Location V7633
Bits
15
14
13
12 11
10
9
8
7
6
5
4
3
2
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
For the function of bits 8 - 15, refer to page 3-6.
X0, up counter clock X2, external reset
Counter 1 Reset 1
Current Value
Counter 2 Reset 2
Current Value
X1, up counter clock
X3, external reset
Counter 2: Preset Data 1500 V3710 0000 2500 V3712 0000 V3632 0000 Data2000 Counter 1: Preset V3630 V3634 0000 0000 1000 2500 2000 V3632 0000 V3636 0000 3175 V3634 0000 2500 V3636
V3706
V3706
0000
3175
0921
0000
High 0921
Low 0000
Word High Word
0
HSIO Mode Setup (BCD) 10 = High-Speed Counter
CPU Scan
Does Count 1 = Preset?
Does Count 2 = Preset?
=
Input Update
Ladder Program Execution
=
Current Instruction Output Update
INT
HSIO Interrupt Routine Program SPxxx IRT
Word Low Word
DL06 Micro PLC User Manual, 3rd Edition Rev. A
E–9