Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 33 of 38

DL06 Micro PLC User Manual, Volume 2 of 2, pages 320 to 329

Pages 320 to 329 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.

For the AutomationDirect Direct Logic DL06

Page 320

Appendix E: High-speed Input and Pulse Output Features

When to use Pulse Catch Mode

1 2 3 4 E 6 7 8 9 10 11 12 13 14 A B C D

Use the pulse catch mode for applications where the input (e.g. X0) can not be used in the user program because the pulse width is very narrow. Use SP100 instead of X0. The SP100 contact stays on through the next scan, as shown above. Even if X0 is on for more than one scan, SP100 is still on for only one scan. PLC Scan X Input Update

Solve User Logic

PLC Scan X + 1 Input Update

Output Update

PLC Scan X + 2 Output Update

Solve User Logic

Input Update

Solve User Logic

Output Update

X0 SP100

Input

Status Relay

X0 X1 X2 X3

SP100 SP101 SP102 SP103

The status relay for X0 is SP100. The other status relays are shown in the table below.

Setup for Mode 50

E–70

Recall that V7633 is the HSIO Mode Select register. Refer to the diagram below. Use BCD 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

50 = Pulse Catch

50 in the lower byte of V7633 to select the High-Speed Counter Mode. Choose the most convenient method of programming V7633 from the following: • Include load and out instructions in your ladder program • DirectSOFT 5’s memory editor • Use the Handheld Programmer D2–HPP

We recommend using the first method above so that the HSIO setup becomes an integral part of your application program. An example program later in this section shows how to do this.

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Page 321

Appendix E: High-speed Input and Pulse Output Features

X Input Configuration The configurable discrete input options for Pulse Catch Mode are listed in the table below. Each input has its own configuration register and filter time constant. Input

Configuration Register

Function

Hex Code Required

X0

V7634

X1

V7635

X2

V7636

X3

V7637

Pulse Catch Input Interrupt Pulse Catch Input Filtered Input Interrupt Pulse Catch Input Filtered Input Interrupt Pulse Catch Input Filtered Input

0005 (default) 0004 0005 (default) xx06 (xx = filter time) 0 - 99 ms (BCD) 0004 0005 (default) xx06 (xx = filter time) 0 - 99 ms (BCD) 0004 0005 (default) xx06 (xx = filter time) 0 - 99 ms (BCD)

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–71

Page 322

Appendix E: High-speed Input and Pulse Output Features

Program Example 1: Pulse Catch

1 2 3 4 E 6 7 8 9 10 11 12 13 14 A B C D E–72

The following program selects Mode 50, then programs the pulse catch code for X0 and X1. Inputs X2, and X3 are configured as filtered inputs with 10 and 30 mS time constants respectively. The program is otherwise generic, and may be adapted to your application. Direct SOFT 5 SP0

Load constant K50 into the accumulator. This selects Mode 50 as the HSIO mode.

LD K50

Mode 50

OUT V7633

Pulse Catch

LD K5

Load the constant K5 which is required to configure X0 as the pulse catch input.

OUT V7634 OUT V7635

Filtered Inputs

Output this constant to V7633, the location of the HSIO Mode select register.

LD K1006 OUT V7636 LD K3006 OUT V7637

Output this constant to V7634, configuring the pulse catch option for X0. Output this constant to V3635, configuring the pulse catch option for X1. Load the constant K1006 which is required to select filtered inputs with a 10 mS filter time constant. Output this constant to V7636, configuring X2.

Load the constant K3006 which is required to select filtered inputs with a 30 mS filter time constant. Output this constant to V7637, configuring X3.

Main Program SP100

SP101

Y0 SET Y1 SET END

Use the pulse catch input to set output Y0 on. This will work even for a very short pulse on X0.

Use the pulse catch input to set output Y1 on. This will work even for a very short pulse on X1. END coil marks the end of the main program.

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Page 323

Appendix E: High-speed Input and Pulse Output Features

Mode 60: Discrete Inputs with Filter

1 The last mode we will discuss for the HSIO circuit is Mode 60, Discrete Inputs with Filter. 2 The purpose of this mode is to allow the input circuit to reject narrow pulses and accept wide ones, as viewed from the ladder program. This is useful in especially noisy environments or other applications where pulse width is important. In all other modes in this appendix, X0 to 3 X3 usually support the mode functions as special inputs. Only spare inputs operate as filtered inputs by default. Now in Mode 60, all four inputs X0 through X3 function only as discrete 4 filtered inputs. Functional Block Diagram E Refer to the block diagram below. When the lower byte of HSIO Mode register V7633 contains a BCD “60”, the input filter in the HSIO circuit is enabled. Each input X0 through X3 has its own filter time constant. The filter circuit assigns the outputs of the filters as logical 6 references X0 through X3. 7 8 9 10 11 12 Input Filter Timing Parameters Signal pulses at inputs X0 – X3 are filtered by using a delay time. In the figure below, the 13 input pulse on the top line is longer than the filter time. The resultant logical input to ladder is phase-shifted (delayed) by the filter time on both rising and falling edges. In the bottom 14 waveforms, the physical input pulse width is smaller than the filter time. In this case, the logical input to the ladder program remains in the OFF state (input pulse was filtered out). A B C D Purpose

DL06 PLC

Output Circuit

Y0, Y1

Y2-Y17

HSIO

I/O data

FILTERS

X0-X3

Mode select

X0

X1

X2

X3

CPU

V-memory

V7633

0060

X4-X23

Input Circuit

Filter Time

Physical Input

X0

Logical Input

X0

Physical Input

X0

Logical Input

X0

Filter Time

Time

DL06 Micro PLC User Manual, 3rd Edition Rev. A

E–73

Page 324

Appendix E: High-speed Input and Pulse Output Features

Setup for Mode 60

1 2 3 4 E 6 7 8 9 10 11 12 13 14 A B C D

Recall that V7633 is the HSIO Mode Select register. Refer to the diagram below. Use BCD 60 in the lower byte of V7633 to select the High-Speed Counter Mode. 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

1

1

0

0

0

0

0

0

0

0

0

0

6

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

60 = Filtered Inputs

Choose the most convenient method of programming V7633 from the following: • Include load and out instructions in your ladder program • DirectSOFT 5’s memory editor • Use the Handheld Programmer D2–HPP

We recommend using the first method above so that the HSIO setup becomes an integral part of your application program. An example program later in this section shows how to to this.

X Input Configuration

E–74

The configurable discrete input options for Discrete Filtered Inputs Mode are listed in the table below. The filter time constant (delay) is programmable from 0 to 99 mS (the input acts as a normal discrete input when the time constant is set to 0). The code for this selection occupies the upper byte of the configuration register in BCD. We combine this number with the required “06” in the lower byte to get “xx06”, where xx = 0 to 99. Input X0, X1, X2, and X3 can only be filtered inputs. Each input has its own configuration register and filter time constant. Input

Configuration Register

Function

Hex Code Required

X0 X1 X2 X3

V7634 V7635 V7636 V7637

Filtered Input Filtered Input Filtered Input Filtered Input xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default) xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default) xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default) xx06 (xx = filter delay time) 0 - 99 ms (BCD) (default)

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Page 325

Appendix E: High-speed Input and Pulse Output Features

Program Example: Filtered Inputs The following program selects Mode 60, then programs the filter delay time constants for inputs X0, X1, X2, and X3. Each filter time constant is different, for illustration purposes. The program is otherwise generic, and may be adapted to your application. Direct SOFT 5 SP0

Load constant K60 into the accumulator. This selects Mode 60 as the HSIO mode.

LD K60

Mode 60

OUT V7633

Filtered Inputs

LD K1006 OUT V7634 LD K2006 OUT V7635 LD K5006 OUT V7636 LD K7006 OUT V7637

Main Program

Output the constant to V7633, the location of the HSIO Mode select register. Load the constant K1006 which is required to configure filtered inputs with a 10 ms filter time constant. Output this constant to V7634, configuring X0.

Load the constant K2006 which is required to select filtered inputs with a 20 ms filter time constant. Output this constant to V7635, configuring X1.

Load the constant K5006 which is required to select filtered inputs with a 50 ms filter time constant. Output this constant to V7636, configuring X2.

Load the constant K7006 which is required to select filtered inputs with a 70 ms filter time constant. Output this constant to V7637, configuring X3.

Insert Main Program rungs here for your application.

END

END coil marks the end of the main program..

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–75

Page 326 read from a scan by OCR; it may hold reading errors

>7PENDIX PLC MEMORY

In this Appendix

DLO6 PLC Memory ....... 2... eee ee eee eee F - 2

Page 327

Appendix F: PLC Memory

DL06 PLC Memory

1 2 3 4 5 F 7 8 9 10 11 12 13 14 A B C D F-2

When designing a PLC application, it is important for the PLC user to understand the different types of memory in the PLC. The DL06 CPU uses two types of memory: RAM and EEPROM. RAM is Random Access Memory and EEPROM is Rlectrically Erasable Programmable Read Only Memory. The PLC program is stored in EEPROM, and the PLC V-memory data is stored in RAM. There is also a small range of V-memory that can be copied to EEPROM which will be explained later. The V-memory in RAM can be configured as either retentive or non-retentive. Retentive memory is memory that is configured by the user to maintain values through a power cycle or a PROGRAM to RUN transition. Non-retentive memory is memory that is configured by the PLC user to clear data after a power cycle or a PROGRAM to RUN transition. The retentive ranges can be configured with either the handheld programmer using AUX57 or DirectSOFT 5 (PLC Setup). The contents of RAM memory can be written to and read from an infinite number of times, but RAM requires a power source to maintain the contents of memory. The contents of RAM are maintained by the internal power supply (5VDC) only while the PLC is powered by an external source, normally 120VAC. When power to the PLC is turned off, the contents of RAM are maintained by a”Super-Capacitor”. If the Super-Capacitor ever discharges, the contents of RAM will be lost. The data retention time of the Super-Capacitor backed RAM is 3 weeks maximum, and 4 1/2 days minimum (at 60쎷 C). An optional battery, D2-BAT-1, can be added to maintain RAM retentive memory if the DL06 is ever without external power (see Volume I, page 3-8 for a detailed explanation). The contents of EEPROM memory can be read from an infinite number of times, but there is a limit to the number of times it can be written to (typical specification is 100,000 writes). EEPROM does not require a power source to maintain the memory contents. It will retain the contents of memory indefinately. PLC user V-memory is stored in both volatile RAM and non-volatile EEPROM memory. Data being stored in RAM uses V400-V677, V1200-V7377 and V10000-V17777 which is volatile. Data stored in EEPROM uses V7400-V7577 and V700-V777, V7600-V7777 and V36000-V37777 are non-volatile. Data values that must be retained for long periods of time, when the PLC is powered off, should be stored in EEPROM based V-memory. Since EEPROM is limited to the number of times it can be written to, it is suggested that transitional logic, such as a one-shot, be used to write the data one time instead on each CPU scan. Data values that are continually changing or which can be initialized with program logic should be stored in RAM based V-memory.

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Page 328

Appendix F: PLC Memory

Non-volatile V-memory in the DL06 There are 2 types of memory assigned for the non-volatile V-memory area. They are RAM and flash ROM (EEPROM). They are sharing the same V-memory addresses; however, you can only use the MOV instruction, D2-HPP and DirectSOFT 5 to write data to the flash ROM. When you write data to the flash ROM, the same data is also written to RAM. If you use other instructions, you can only write data to RAM. When you read data from the nonvolatile V-memory area, the data is always read from RAM.

1 2 3 Reading data Writing data 4 RAM Flash ROM RAM Flash ROM 5 V7400-V7577 V7400-V7577 V7400-V7577 V7400-V7577 F 7 8 9 After a power cycle, the PLC always copies the data in the flash ROM to the RAM. If you use the instructions except for the MOV instruction to write data into the non-volatile 10 V-memory area, you only update the data in RAM. After a power cycle, the PLC copies the previous data from the flash memory to the RAM, so you may think the data you changed 11 has disappeared. To avoid trouble such as this, we recommend that you use the MOV instruction. 12 RAM Flash ROM 13 V7400 = 1111 V7400 = 1111 LD K2222 OUT V7400 14 V7400 = 2222 V7400 = 1111 Not changed A Cycle power Copy V7400 = 1111 V7400 = 1111 B This appears to be previous data returning. C D

Other instructions (OUT, OUTD...)

MOV D2-HPP DirectSOFT 5

MOV D2-HPP DirectSOFT 5

There is no way to read data from the Flash ROM directly.

DL06 Micro PLC User Manual, 3rd Edition Rev. A

F-3

Page 329 read from a scan by OCR; it may hold reading errors

PENDIX

G

ASCII Conversion Table ............. 00. eee ee eee ee eee ee G-2

ASCII TABLE

In this Appendix