The text of a manual · part 23 of 42
DL305 User Manual: Chapter 8: System Operation, pages 172 to 181
Pages 172 to 181 of 359, from DL305 User Manual
The original document is the PDF (4.9 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 D3-08TD2, AutomationDirect D3-16TD2, Konnect-It D3-08TD2, Koyo D3-08TD2, Konnect-It D3-16TD2 and Koyo D3-16TD2
Page 172
8--21
System Operation
Control Relays
Control relays are discrete bits normally used to control the user program. The control relays do not represent a real world device, that is, they cannot be physically tied to switches, output coils, etc. They are internal to the CPU. Because of this, control relays can be programmed as discrete inputs or discrete outputs. These locations are used in programming the discrete memory locations (C) or the corresponding word location which contains 8 consecutive discrete locations.
010
160 OUT
160
020 OUT 021 OUT
In this example, memory location 160 will energize when input 010 turns on. The second rung shows a simple example of how to use a control relay as an input. NOTE: Some of the references normally assigned as Control Relays can also be used to refer to a16-point I/O modules in some situations. Make sure you review the memory maps at the end of this chapter if you use 16-point modules. System Operation
DL305 User Manual, Rev. D
Page 173
8--22
System Operation
Timers and Timer Status Bits (T Data type)
You can have up to 64 timers/counters in a DL305 CPU. Both the timers and counters share the same memory area. This means you cannot have a timer T600 and a counter CT600 in the same program. When you use these locations for timers, each timer has a status bit that reflects the relationship between the current value and the timer preset value. The timer status bit will be on when the current value is equal or greater than the preset value of a corresponding timer. The DL330P does not support the status bit. Instead, you have to use comparative boolean contacts. See Chapter 12 for details. In the example shown, input 000 turns on to start timer T600. When the timer reaches the preset of 3 seconds (K of 30) timer status contact T600 turns on. When contact T600 turns on, output 022 is energized.
System Operation
Counters and Counter Status Bits (CT Data type)
TMR
T600
K30
T600
022 OUT
You can have up to 64 timers/counters in a DL305 CPU. Both the timers and counters share the same memory area. This means you cannot have a timer T600 and a counter CT600 in the same program. When you use these locations for counters, each counter has a status bit that reflects the relationship between the current count and the preset value. The counter status bit will be on when the current value is equal to or greater than the counter preset value. The DL330P does not support the status bit. Instead, you have to use comparative boolean contacts. See Chapter 12 for details. In the example shown, Each time contact 000 transitions from off to on, the counter increments by one. (If 001 comes on, the counter is reset to zero.) When the counter reaches the preset of 10 counts (K of 10) counter status contact CT603 turns on. When CT603 turns on, output 022 turns on.
Counter Current Values (R Data Type)
000
As mentioned earlier, some information is automatically stored in R memory. This is true for the current values associated with counters. For example, R600 holds the current value for counter 600, R601 holds the current value for counter 601, etc. The primary reason for this is programming flexibility. The example shows how you can use comparative contacts to monitor several count values from a single counter.
DL305 User Manual, Rev. D
000
CNT
CT603 K10
001
CT603
000
CNT CT600 K1000
001 CT600
CT600
CT600
= = =
022 OUT
K250
022 SET
K500
023 SET
K750
024 SET
Page 174
8--23
System Operation
Data Registers (R Data Type)
Stages (S Data type)
A word memory location is referred to as a Data Register, which is an 8-bit location normally used to manipulate data/numbers, store data/numbers, etc. Some information is automatically stored in registers. For example, the timer current values are automatically stored in a register that corresponds to the timer or counter number being used. The example shows how a four-digit BCD constant is loaded into the accumulator and then stored in a Register location. Notice two registers are required to hold the 4-digit number.
DSTR F50 K1345 OUT
R400
F60
Word Locations -- 8 bits R401 0 0 0 1 00 1 1 1
3
R400 0 1 0 0 0 1 0 1 4
5
Ladder Representation ISG S0000
Wait for Start Start
S1 JMP
000 SG
S150 JMP
Check for a Part
S0001
Part Present
S2 JMP
001 Part Present
S6 JMP
001 SG
Clamp the part
S0002
Part Locked 002
DL305 User Manual, Rev. D
Clamp SET S140 S3 JMP
System Operation
Stages are used in RLL PLUS programs to create a structured program, similar to a flowchart. Each program stage denotes a program segment. When the program segment or stage, is active, the logic within that segment is executed. If the stage is off or inactive, the logic is not executed and the CPU skips to the next active stage. (See Chapter 10 for a more detailed description of RLL PLUS programming.) Each stage also has a discrete status bit that can be used as an input to indicate whether the stage is active or inactive. If the stage is active, then the status bit is on. If the stage is inactive, then the status bit is off. This status bit can also be turned on or off by other instructions, such as the SET or RESET instructions. This allows you to easily control stages throughout the program.
000
Page 175
8--24
System Operation
Shift Registers
There are 128 bits available for use in Shift Registers with the DL330 and DL340 CPUs. You can still use Shift Registers in the DL330P CPU, but a separate range of bits is not provided. You have to use the control relay points in the Shift Register instructions. These are numbered from 400 to 577. Your first reaction may be to think these are somehow related to the Data Registers with the same numbers. They are completely separate areas and are not related. The number of Shift Register instructions that can be used depends on how many bits are used with each Shift Register. For example, if you have a DL330 and you use 16 bits in each Shift Register, you can have up to 8 Shift Registers. If you only used 8 bits in each one, then you could have up to 16 Shift Registers.
System Operation
In the example shown, contact 001 represents the data value (0 or 1) that will be loaded into the shift register when the clock input (002) is active. Each time the clock input comes on, the data values are shifted through the bit positions from 400 to 417. Input 003 resets the shift register and sets all the bit positions back to zero. Chapter 11 provides detailed instructions on how to use shift registers. Special Relays
Special Registers (R Data Type)
Special relays are discrete memory locations with pre-defined functionality. There are many different types of special relays. For example, some aid in programming, others provide system operating status information, etc. In this example, special relay 375 will energize for 50 ms and de--energize for 50 ms because relay 375 is a pre--defined relay that will be on for 50 ms and off for 50 ms.
001
Data Input
002
Clock Input
003
Reset Input
SR 400
375
417
020 OUT
There are also a few special registers that store various types of system information. For example, the DL340 communication port parameters are set in special registers. The detailed memory maps at the end of this chapter show special register assignments for each CPU.
DL305 User Manual, Rev. D
Page 176
System Operation
8--25
DL305 Aliases An alias is an alternate way of referring to certain memory types, such as timer/counter current values, register locations for I/O points, etc.. This makes some instructions easier to understand. The use of the alias is optional, but some users may find the alias to be helpful when developing a program. The table below shows how the aliases can be used. Example
RIO0
R0 is the 8--bit word memory reference for discrete bits IO0 through IO7, hence its alias is RIO0. R1 is the 8--bit word memory reference for discrete bits IO10 through IO17, hence its alias is RIO10.
RC160
R16 is the 8--bit word memory reference for control relays C160 through C167, hence its alias is RC160. R17 is the 8--bit word memory reference for control relays C170 through C177, hence its alias is RC170.
RS400
R40 is the 8--bit word memory reference for stage bits S400 through S407, hence its alias is RS400. R41 is the 8--bit word memory reference for stage bits S410 through S417, hence its alias is RS410.
R70
RIO700
R70 is the 8--bit word memory reference for discrete bits IO700 through IO707, hence its alias is RIO700. R71 is the 8--bit word memory reference for discrete bits IO710 through IO717, hence its alias is RIO710.
R77
RC770
R77 is the 8--bit word memory reference for control relays C770 through C777, hence its alias is RC770.
R100
RC1000
R100 is the 8--bit word memory reference for control relays C1000 through C1007, hence its alias is RC1000. R101 is the 8--bit word memory reference for control relays C1010 through C1017, hence its alias is RC1010.
R107
RC1070
R107 is the 8--bit word memory reference for control relays C1070 through C1077, hence its alias is RC1070.
TCA600
R600 is the 16--bit timer/counter accumulator value for timer/counter 600, hence its alias is TCA600. R601 is the 16--bit timer/counter accumulator value for timer/counter 601, hence its alias is TCA601.
R0
R16
R40
R600
DL305 User Manual, Rev. D
System Operation
Alias Start
Address Start
Page 177
8--26
System Operation
System Operation
DL330 Memory Map Memory Type
Discrete Memory Reference (octal)
Register Memory Reference (octal)
Input / Output Points
000 -- 157 700 -- 767
R000 -- R015 R070 -- R076
168 Total
Control Relays
160 -- 373
R016 -- R037
Special Relays
374 -- 377 770 -- 777
Timers / Counters
Timer / Counter Current Values
Qty. Decimal
Symbol IO000
IO010
140
C160
C160
R037 R077
12
C772
C376
600 -- 673 674 -- 677*
None
64
None
R600 -- R673 R674 -- R677*
=
64
TMR T600 K100
CTA600
=
CNT CT600 K10
K250
Contact valid for counters only.
Timer / Counter Status Bits
T600 -- T673 T674 -- T677*
None
64
Data Words
None
R400 -- R563
116
Shift Registers
400 -- 577
None
128
Special Registers
None
R574 -- R577
4
T600
None specific, used with many instructions SR 400 417
R574 -- R575 used with FAULT R576 -- R577 Auxiliary Accumulator
* T/ C Setpoint Unit Only. Can be used as data registers if the Timer/Counter Setpoint Unit or Thumbwheel Interface Module is not used. R564 -- R573 contain the preset value used with the Timer / Counter Setpoint Unit. R674 -- R677 contain the current values for these timers or counters.
DL305 User Manual, Rev. D
Page 178
8--27
System Operation DL330P Memory Map Memory Type
Discrete Memory Reference (octal)
Register Memory Reference (octal)
Input / Output Points
000 -- 157 700 -- 767
R000 -- R015 R070 -- R076
168 Total
Control Relays
160 -- 174 200 -- 277
R016 -- R017 R020 -- R027
77
C160
C160
Special Relays
175 -- 177 770 -- 777
R017 R077
11
C772
C376
Timers / Counters
600 -- 673 674 -- 677*
None
64
Timer / Counter Current Values
None
R600 -- R673 R674 -- R677*
64
Timer / Counter Status Bits
T600 -- T673 T674 -- T677*
None
64
Data Words
None
R400 -- R563
116
Stages
S0 -- S177
R100 -- R117
128
None
R574 -- R577
Symbol IO010
IO000
=
4
TMR T600 K100
CTA600
K250
CNT CT600 K10
TA600
≥
K250
≥
T600
None specific, used with many instructions SG
S1 S 001
R574 -- R575 used with FAULT R576 -- R577 Auxiliary Accumulator
* T/ C Setpoint Unit Only. Can be used as data registers if the Timer/Counter Setpoint Unit or Thumbwheel Interface Module is not used, which provides a total of 128 data registers. R564 -- R573 contain the preset value used with the Timer / Counter Setpoint Unit. R674 -- R677 contain the current values for these timers or counters Timer / Counter Current Values Registers (T600 -- T677) are 16-bit registers.
DL305 User Manual, Rev. D
System Operation
Special Registers
Qty. Decimal
Page 179
8--28
System Operation
System Operation
DL340 Memory Map Memory Type
Discrete Memory Reference (octal)
Register Memory Reference (octal)
Input / Output Points
000 -- 157 700 -- 767
R000 -- R015 R070 -- R076
168 Total
Control Relays
160 -- 373 1000 -- 1067
R016 -- R037 R100 -- R106
Special Relays
374 -- 377 770 -- 777 1070 -- 1077
Timers / Counters
Qty. Decimal
Symbol IO000
IO010
180
C160
C160
R037 R077 R107
20
C772
C376
600 -- 673 674 -- 677*
None
64
Timer / Counter Current Values
None
R600 -- R673 R674 -- R677*
64
Timer / Counter Status Bits
T600 -- T673 T674 -- T677*
None
64
Data Words
None
R400 -- R563 R700 -- R767
172
Shift Registers
400 -- 577
None
128
Special Registers
None
R574 -- R577 R770 -- R777
12
= TMR T600 K100
CTA600
=
CNT CT600 K10
K250
Contact valid for counters only.
T600
None specific, used with many instructions SR 400 417
R574--R575 used with FAULT R576--R577 Auxiliary Accumulator R770--R777 Communications Setup
* T/ C Setpoint Unit Only. Can be used as data registers if the Timer/Counter Setpoint Unit or Thumbwheel Interface Module is not used. R564 -- R573 contain the preset value used with the Timer / Counter Setpoint Unit. R674 -- R677 contain the current values for these timers or counters. Registers T600 -- T677 are 16-bit registers.
DL305 User Manual, Rev. D
Page 180
System Operation
8--29
I/O Point Bit Map These tables provide a listing of the individual Input points associated with each register location for the DL330, DL330P, and DL340 CPUs. MSB 006 016 026 036 046 056 066 076 106 116 126 136 146 156 166 176 706 716 726 736 746 756 766
005 015 025 035 045 055 065 075 105 115 125 135 145 155 165 175 705 715 725 735 745 755 765
004 014 024 034 044 054 064 074 104 114 124 134 144 154 164 174 704 714 724 734 744 754 764
003 013 023 033 043 053 063 073 103 113 123 133 143 153 163 173 703 713 723 733 743 753 763
LSB 002 012 022 032 042 052 062 072 102 112 122 132 142 152 162 172 702 712 722 732 742 752 762
001 011 021 031 041 051 061 071 101 111 121 131 141 151 161 171 701 711 721 731 741 751 761
000 010 020 030 040 050 060 070 100 110 120 130 140 150 160 170 700 710 720 730 740 750 760
Register Number R0 R1 R2 R3 R4 R5 R6 R7 R10 R11 R12 R13 R14 R15 n/a n/a R70 R71 R72 R73 R74 R75 R76
NOTE: 160 -- 167 can be used as I/O in a DL330 or DL330P CPU under certain conditions. 160 -- 177 can be used as I/O in a DL340 CPU under certain conditions. You should consult Chapter 4 to determine which configurations allow the use of these points. These points may be used as control relays. You cannot use them as both control relays and as I/O points. Also, if you use these points as I/O, you cannot access these I/O points as a Data Register reference using the DSTR5 (F55) and DOUT5 (F65) functions.
DL305 User Manual, Rev. D
System Operation
007 017 027 037 047 057 067 077 107 117 127 137 147 157 167 177 707 717 727 737 747 757 767
I/O References
Page 181
8--30
System Operation
Control Relay Bit Map The following tables provide a listing of the individual control relays associated with each register location for the DL305 CPUs. NOTE: If a 16 pt module is used in Slot 6 for the DL330 or DL330P CPU, 160 through 167 will not be available for control relay assignments. If a 16pt module is used in Slot 6 and/or Slot 7 for a DL340 CPU, 160--167 and/or 170--177 are not available for control relay assignments. You cannot use these points as both control relays and as I/O points. If you use these points as I/O points, you still enter them as C160--C177 in DirectSOFT. Also, if you use these points as I/O, you cannot access these I/O points as a Data Register reference using the DSTR5 (F55) and DOUT5 (F65) functions.
System Operation
MSB 167 177 207 217 227 237 247 257 267 277 307 317 327 337 347 357 367
166 176 206 216 226 236 246 256 266 276 306 316 326 336 346 356 366
DL330 Control Relay References 165 164 163 162 175 174 173 172 205 204 203 202 215 214 213 212 225 224 223 222 235 234 233 232 245 244 243 242 255 254 253 252 265 264 263 262 275 274 273 272 305 304 303 302 315 314 313 312 325 324 323 322 335 334 333 332 345 344 343 342 355 354 353 352 365 364 363 362 373 372
LSB 161 171 201 211 221 231 241 251 261 271 301 311 321 331 341 351 361 371
160 170 200 210 220 230 240 250 260 270 300 310 320 330 340 350 360 370
Register Number R16 R17 R20 R21 R22 R23 R24 R25 R26 R27 R30 R31 R32 R33 R34 R35 R36 R37
* Control relays 340 -- 373 can be made retentive by setting a CPU dipswitch. See Chapter 3 for details on setting CPU dipswitches.
DL305 User Manual, Rev. D