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

The text of a manual · part 44 of 68

DL405 User Manual: Chapter 6: Drum Instruction Programming (DL450 CPU only), pages 385 to 392

Pages 385 to 392 of 608, from DL405 User Manual

The original document is the PDF (8.2 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 D4-08B-1, AutomationDirect D4-08ND3S, AutomationDirect D4-16TA, PLC Direct D4-16TD2, AutomationDirect D4-32ND3-1, Konnect-It D4-08B-1, Koyo D4-08B-1, Konnect-It D4-08ND3S, and 6 more models

Page 385

Drum Instruction Programming

S

S

Counts/Step -- The number of timer counts the drum spends in each step. Each step has its own counts parameter. However, programming the counts/step is optional on Timer/Event drums. Timer Value -- the current value of the counts/step timer. Counter # -- The counter number specifies the first of four consecutive counters which the drum uses for step control. You can monitor these to determine the drum’s progress through its control cycle. Events -- Either an X, Y, C, GX, GY, S, C, CT, or SP type discrete point serves as step transition inputs. Each step has its own event. However, programming the event is optional on Timer/Event drums.

WARNING: The outputs of a drum are enabled any time the CPU is in Run Mode. The Start Input does not have to be on, and the Reset input does not disable the outputs. Upon entering Run Mode, drum outputs automatically turn on or off according to the pattern of the preset step. This includes any effect of the output mask when applicable. Powerup State of Drum Registers

The choice of the starting step on powerup and program-to-run mode transitions are important to consider for your application. Please refer to the following chart. If the counter memory is configured as non-retentive, the drum is initialized the same way on every powerup or program-to-run mode transition. However, if the counter memory is configured to be retentive, the drum will stay in its previous state.

Counter Number

Function

CTA(n)

Initialization on Powerup Non-Retentive Case

Retentive Case

Current Step Count

Initialize = 0

Use Previous (no change)

CTA(n + 1)

Counter Timer Value

Initialize = 0

Use Previous (no change)

CTA(n + 2)

Preset Step

Initialize = Preset Step #

Use Previous (no change)

CTA(n + 3)

Current Step #

Initialize = Preset Step #

Use Previous (no change)

Applications with relatively fast drum cycle times typically will need to be reset on powerup, using the non-retentive option. Applications with relatively long drum cycle times may need to resume at the previous point where operations stopped, using the retentive case. The default option is the retentive case. This means that if you initialize scratchpad V-memory, the memory will be retentive.

DL405 User Manual, 4th Edition

Drum Instruction Programming

S S

6--9

Page 386

6--10

Drum Instruction Programming

Drum Instruction Programming

Drum Control Techniques Drum Control Inputs

Now we are ready to put together the concepts on the previous pages and demonstrate general control of the drum instruction box. The drawing to the right shows a simplified generic drum instruction. Inputs from ladder logic control the Start, Jog, and Reset Inputs. The first counter bit of the drum (CT0, for example) indicates the drum cycle is done.

X0

Start

X1

Jog

X2

Reset

Outputs

Setup Info. Steps

Mask f f f F f f f f f f f F F F F F

F f f f F F f F f f f F f f f f f f f f F f F f F f F F F F f F

The timing diagram below shows an arbitrary timer drum input sequence and how the drum responds. As the CPU enters run mode it initializes the step number to the preset step number (typically is Step 1). When the Start input goes high the drum begins running, looking for an event and/or running the count timer (depending on the drum type and setup). After the drum enters Step 2, Reset turns On while Start is still On. Since Reset has priority over Start, the drum goes to the preset step (Step 1). Note that the drum is held in the preset step during Reset, and that step does not run (respond to events or run the timer) until Reset turns off. After the drum has entered step 3, the Start input goes off momentarily, halting the drum’s timer until Start turns on again. Start drum Inputs Start

1 0

Jog

1 0

Reset

1 0

Reset drum

Hold drum

Resume drum

Drum Reset Complete drum

Drum Status 1

Step # Drum Complete (CT0)

1

Outputs (x 16)

1 0

1

2

1

1

2

3

3

4

...

15

16

16

16

1

1

0

When the drum completes the last step (Step 16 in this example), the Drum Complete bit (CT0) turns on, and the step number remains at 16. When the Reset input turns on, it turns off the Drum Complete bit (CT0), and forces the drum to enter the preset step. NOTE: The timing diagram shows all steps using equal time durations. Step times can vary greatly, depending on the counts/step programmed.

DL405 User Manual, 4th Edition

Page 387

6--11

Drum Instruction Programming

Jog drum Inputs Start

1 0

Jog

1 0

Reset

1 0

Reset drum

Jog drum

Jog drum

Drum Complete

Drum Status 1

Step #

Self-Resetting Drum

Initializing Drum Outputs

Using Complex Event Step Transitions

Drum Complete (CT0)

1

Outputs (x 16)

1 0

2

3

3

3

4

5

6,7

8

...

14

15

16

16

16

1

0

Applications often require drums that automatically start over once they complete a cycle. This is easily accomplished, using the drum complete bit. In the figure to the right, the drum instruction setup is for CT0, so we logically OR the drum complete bit (CT0) with the Reset input. When the last step is done, the drum turns on CT0 which resets itself to the preset step, also resetting CT0. Contact X1 still works as a manual reset.

X0 X1 CT0

Start Reset

Outputs

Setup Info. Steps

Mask f f f F f f f f f f f F F F F F

F f f f F F f F f f f F f f f f f f f f F f F f F f F F F F f F

The outputs of a drum are enabled any time the CPU is in run mode. On program-to-run mode transitions, the drum goes to the preset step, and the outputs energize according to the pattern of that step. If your application requires all outputs to be off at powerup make the preset step in the drum a “reset step”, with all outputs off. Each event--based transition accepts only one contact reference for the event. However, this does not limit events to just one contact. Just use a control relay contact such as C0 for the step transition event. Elsewhere in the ladder logic you may use C0 as an output coil, making it dependent on many other “events” (contacts).

DL405 User Manual, 4th Edition

Drum Instruction Programming

In the figure below, we focus on how the Jog input works on event drums. To the left of the diagram, note that the off-to-on transitions of the Jog input increments the step. Start may be either on or off (however, Reset must be off). Two jogs takes the drum to step three. Next, the Start input turns on, and the drum begins running normally. During step 6 another Jog input signal occurs. This increments the drum to step 7, setting the timer to 0. The drum begins running immediately in step 7, because Start is already on. The drum advances to step 8 normally. As the drum enters step 14, the Start input turns off. Two more Jog signals moves the drum to step 16. However, note that a third Jog signal is required to move the drum through step 16 to “drum complete”. Finally, a Reset input signal arrives which forces the drum into the preset step and turns off the drum complete bit.

Page 388

6--12

Drum Instruction Programming

Drum Instruction Programming

Drum Instructions

Timed Drum with Discrete Outputs (DRUM) X X

The DL450 drum instructions may be programmed DirectSOFT. The EDRUM is the only drum instruction that can be programmed with a handheld programmer (firmware version 5.5 or later). This section covers entry using DirectSOFT for all instructions plus the handheld mnemonics for the EDRUM instructions. The Timed Drum with Discrete Outputs is the most basic of the DL450’s drum instructions. It operates according to the principles covered on the previous pages. Below is the instruction in chart form as displayed by DirectSOFT. Counter Number

430 440 450

Step Preset Timebase Control Inputs

Discrete Output Assignment

Start Reset

Step Number Counts per Step Output Pattern f= Off, F= On

The Timed Drum features 16 steps and 16 outputs. Step transitions occur only on a timed basis, specified in counts per step. Unused steps must be programmed with “counts per step” = 0 (this is the default entry). The discrete output points may be individually assigned as X, Y, or C types, or may be left unused. The output pattern may be edited graphically with DirectSOFT. Whenever the Start input is energized, the drum’s timer is enabled. It stops when the last step is complete, or when the Reset input is energized. The drum enters the preset step chosen upon a CPU program-to-run mode transition, and whenever the Reset input is energized. Drum Parameters

Field

Data Types

Ranges

Counter Number aaa

--

0 -- 377

Preset Step bb

K

1 -- 16

Timer base cc

K

0 -- 99.99 seconds

Counts per step dddd

K

0 -- 9999

Discrete Outputs

Fffff

X, Y, C, GX, GY * see page 3--42

DL405 User Manual, 4th Edition

Page 389

Drum Instruction Programming

6--13

Counter Number

Ranges of (n)

Function

Counter Bit Function

CTA(n)

0 -- 374

Counts in step

CTn = Drum Complete

CTA( n+1)

1 -- 375

Timer value

CT(n+1) = (not used)

CTA( n+2)

2 --376

Preset Step

CT(n+2) = (not used)

CTA( n+3)

3 --377

Current Step

CT(n+1) = (not used)

The following ladder program shows the DRUM instruction in a typical ladder program, as shown by DirectSOFT. Steps 1 through 10 are used, and twelve of the sixteen output points are used. The preset step is step 1. The timebase runs at (K10 x 0.01) = 0.1 per count. Therefore, the duration of step 1 is (25 x 0.1) = 2.5 seconds. In the last rung, the Drum Complete bit (CT10) turns on output Y0 upon completion of the last step (step 10). A drum reset also resets CT10.

Start Reset

Drum Complete DirectSOFT Display

DL405 User Manual, 4th Edition

Drum Instruction Programming

Drum instructions use four counters in the CPU. The ladder program can read the counter values for the drum’s status. The ladder program may write a new preset step number to CTA(n+2) at any time. However, the other counters are for monitoring purposes only.

Page 390

Drum Instruction Programming

6--14

Drum Instruction Programming The Event Drum features time--based and event--based step transitions. It operates according to the general principles of drum operation covered in the beginning of this section. Below is the instruction as displayed by DirectSOFT.

Event Drum (EDRUM) X X 430 440 450

Counter Number

Step Preset Timebase

Discrete Output Assignment

Start

Control Inputs

Jog Reset

Step Number Counts per Step Event per step Output Pattern f= Off, F= On

The Event Drum features 16 steps and 16 outputs. Step transitions occur on timed and/or event basis. The jog input also advances the step on each off-to-on transition. Time is specified in counts per step, and events are specified as discrete contacts. Unused steps and events must be left blank. The discrete output points may be individually asssigned. Drum Parameters

Field

Data Types

Ranges

Counter Number aaa

--

0 -- 377

Preset Step bb

K

1 -- 16

Timer base cc

K

0 -- 99.99 seconds

Counts per step dddd

K

0 -- 9999

Event eeee

X, Y, C, GX, GY, S, T, ST see page 3--42

Discrete Outputs

Fffff

X, Y, C , GX, GY* see page 3--42

Whenever the Start input is energized, the drum’s timer is enabled. As long as the event is true for the current step, the timer runs during that step. When the step count equals the counts per step, the drum transitions to the next step. This process stops when the last step is complete, or when the Reset input is energized. The drum enters the preset step chosen upon a CPU program-to-run mode transition, and whenever the Reset input is energized.

DL405 User Manual, 4th Edition

Page 391

Drum Instruction Programming

6--15

Counter Number

Ranges of (n)

Function

Counter Bit Function

CTA(n)

0 -- 374

Counts in step

CTn = Drum Complete

CTA( n+1)

1 -- 375

Timer value

CT(n+1) = (not used)

CTA( n+2)

2 --376

Preset Step

CT(n+2) = (not used)

CTA( n+3)

3 --377

Current Step

CT(n+1) = (not used)

The following ladder program shows the EDRUM instruction in a typical ladder program, as shown by DirectSOFT. Steps 1 through 11 are used, and all sixteen output points are used. The preset step is step 1. The timebase runs at (K10 x 0.01) = 0.1 second per count. Therefore, the duration of step 1 is (1 x 0.1) = 0.1 seconds. Note that step 1 is time-based only (event is left blank). And, the output pattern for step 1 programs all outputs off, which is a typically desirable powerup condition. In the last rung, the Drum Complete bit (CT4) turns on output Y0 upon completion of the last step (step 11). A drum reset also resets CT4.

NOTE: If all events are true in an event only drum (a drum with 0 counts per step in all steps), the PLC completes one step of the drum per scan; thus, the drum will be complete in 16 scans. However, as the outputs of the drum are enabled any time the CPU is in RUN Mode, the drum discrete outputs will be energized as pulsed outputs for each scan.

DL405 User Manual, 4th Edition

Drum Instruction Programming

Drum instructions use four counters in the CPU. The ladder program can read the counter values for the drum’s status. The ladder program may write a new preset step number to CTA(n+2) at any time. However, the other counters are for monitoring purposes only.

Page 392

Drum Instruction Programming

6--16

Drum Instruction Programming The handheld programmer can also enter or edit drum instructions. The diagram below lists the keystrokes for entering the drum example on the previous page. NOTE: Drum editing requires Handheld Programmer firmware version 5.5 or later. Handheld Programmer Keystrokes

Handheld Programmer Keystrokes cont’d skip over unused event

Start

STR

X(IN)

0

1 ( DEF 0000 )

NXT

Jog

STR

X(IN)

1

( DEF 0000 )

Y(OUT)

4

0

Reset

STR

X(IN)

2

( DEF 0000 )

X(IN)

2

1

Drum Inst.

SHFT

E

D

( DEF 0000 )

X(IN)

2

2

SHFT

CNT

4

( DEF 0000 )

C(CR)

0

Preset Step

( DEF K0000 )

1

( DEF 0000 )

C(CR)

1

Time Base

( DEF K0000 )

6

4

( DEF 0000 )

X(IN)

3

0

( DEF 0000 )

C(CR)

7

( DEF 0000 )

X(IN)

3

5

( DEF 0000 )

C(CR)

1

0

( DEF 0000 )

X(IN)

3

3

( DEF 0000 )

Y(OUT)

1

3

( DEF 0000 )

Y(OUT)

1

7

( DEF 0000 )

YOUT)

4

2

( DEF 0000 )

C(CR)

2

0

( DEF 0000 )

Y(OUT)

5

( DEF 0000 )

NXT

( DEF 0000 )

Y(OUT)

6

( DEF 0000 )

NXT

( DEF 0000 )

C(CR)

4

( DEF 0000 )

NXT

( DEF 0000 )

C(CR)

2

( DEF 0000 )

NXT

( DEF 0000 )

Y(OUT)

1

0

16 ( DEF 0000 )

NXT

( DEF 0000 )

Y(OUT)

2

0

1 ( DEF K0000 )

NXT

( DEF 0000 )

C(CR)

1

4

( DEF K0000 )

9

8

1

2

( DEF 0000 )

C(CR)

3

0

( DEF K0000 )

2

8

9

4

( DEF 0000 )

Y(OUT)

3

2

( DEF K0000 )

4

4

7

6

( DEF 0000 )

Y(OUT)

7

2

( DEF K0000 )

5

1

6

9

( DEF 0000 )

C(CR)

3

4

( DEF K0000 )

9

3

4

3

15

( DEF 0000 )

Y(OUT)

1

( DEF K0000 )

4

4

8

6

1

( DEF K0000 )

5

( DEF K0000 )

9

4

5

9

( DEF K0000 )

2

0

( DEF K0000 )

3

8

SHFT

A(H)

( DEF K0000 )

1

5

( DEF K0000 )

5

8

6

4

( DEF K0000 )

4

5

( DEF K0000 )

8

4

4

7

( DEF K0000 )

1

8

0

( DEF K0000 )

( DEF K0000 )

9

2

3

( DEF K0000 )

( DEF K0000 )

1

2

0

( DEF K0000 )

( DEF K0000 )

8

6

4

( DEF K0000 )

1

2

0

( DEF K0000 )

4

0

0

( DEF K0000 )

NXT

( DEF K0000 )

NXT

( DEF K0000 )

NXT

( DEF K0000 )

NXT

( DEF K0000 )

NXT

( DEF K0000 )

NXT

0

Outputs

Counts/ Step

16

R

U

M

Events

Output Pattern 0 step 1 pattern = 0000 unused steps

( DEF K0000 ) 0

16 ( DEF K0000 )

Last rung

STR

CNT

Y(OUT)

0

0 skip over unused steps NOTE: You may use the NXT and PREV keys to skip past entries for unused outputs or steps. (Go to next column)

DL405 User Manual, 4th Edition skip over unused steps