The text of a manual · part 18 of 36
DL305 User Manual, pages 167 to 176
Pages 167 to 176 of 356
The original document is the PDF (3.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 GE DL330 / D3-330, Fanuc DL330 / D3-330 and GE Fanuc DL330 / D3-330
Page 167
8–19 System Operation
Memory Map With any PLC system, you generally have many different types of information to process. This includes input device status, output device status, various timing elements, parts counts, etc. It is important to understand how the system represents and stores the various types of data. For example, you need to know how the system identifies input points, output points, data words, etc. The following paragraphs discuss the various memory types used in the DL305 CPUs. NOTE: The DL305 CPUs do not all have the same memory ranges. Make sure you review the detailed memory maps at the end of this section to determine the available memory types for your particular model of CPU. Octal Numbering System
All memory locations or areas are numbered in Octal (base 8). For example, the diagram shows how the octal numbering system works for the discrete input points. Notice the octal system does not contain any numbers with the digits 8 or 9.
8pt Relay
8pt Output
8pt Output
16pt Input
4ch. (Analog)
16pt Input
050 – 057
040 – 047
030 – 037
020 027 – 120 127
010 017 – 110 117
000 007 – 100 107
100 101 102 103 104 105 106 107
Two Basic Memory Types: Discrete and Word
As you examine the different memory types, you’ll notice two types of memory in the DL305, discrete and word memory. Discrete memory is one bit that can be either a 1 or a 0. Word memory is referred to as Data Register memory and is an 8-bit location normally used to manipulate data/numbers, store data/numbers, etc. Some information is automatically stored in Register (R) memory. For example, the timer current values are stored in Registers that correspond to the timer or counter number. So, the current value for timer T600 is automatically stored in R600.
Discrete – On or Off, 1 bit 000 or
Word Locations – 8 bits 0 0 1 0 0 1 0 1
000
System Operation
000 001 002 003 004 005 006 007
Page 168
8–20 System Operation
R Memory Locations for Discrete Memory Areas
The discrete memory area is for inputs, outputs, control relays, etc. However, you can also access the bit data types as an R-memory word. Each R-memory location contains 8 consecutive discrete locations. Remember, the DL305 system does not have a separate memory type for input and output points. The type of point assigned to the location depends on the type of module installed in the slot that corresponds to the register location. Also, the number of registers assigned to the module depends on the number of points. For example, a 16-point module would require two registers since each register only contains 8 bits. The following diagram shows how the points for a 16-point module installed in the slot next to the CPU would map into registers. 16 Discrete Input Module 107 106 105 104 103 102 101 100
Bit # 7
6
5
4
3
2
1
0
007 006 005 004 003 002 001 000
7
6
System Operation
R010
5
4
3
2
1
0
R000
These discrete memory areas and their corresponding R-memory ranges are listed in the memory area tables at the end of this chapter. I/O Points
The discrete input and output points do not have separate data types. The type of point assigned to the reference address depends on the type of module installed in the base. Depending on the type of CPU, you can have up to 184 I/O points in a DL305 system. In the first example, output point 010 will 1st Slot – Input, 2nd Slot – Output be turned on when input 000 energizes. 000 010 This assumes an 8-point input module is OUT installed in the first slot and an 8-point output module is installed in the second slot. 1st Slot – Output, 2nd Slot – Input The second example shows how the numbers can represent a different type of point. For this example, the module positions were reversed.
010
000 OUT
NOTE: Unused I/O references can be used as control relays in the application program.
Page 169
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
Page 170
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.
000
CNT
CT603 K10
001
CT603
022 OUT
000 CNT CT600 K1000
001
CT600
K250
022 SET
K500
023 SET
K750
024 SET
= CT600
= CT600
=
Page 171
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
F60 R400
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 S150 JMP SG
Check for a Part
S0001
Part Present
S2 JMP
001 Part Present
S6 JMP
001 SG
Clamp the part
S0002
Part Locked 002
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 172
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.
Page 173
8–25 System Operation
DL330 Memory Map Memory Type
Discrete Memory Reference (octal)
Register Memory Reference (octal)
Qty. Decimal
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
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
T600
None specific, used with many instructions SR 400 417
Special Registers
None
R574 – R577
4
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.
System Operation
=
Page 174
8–26 System Operation
System Operation
DL330P Memory Map Memory Type
Discrete Memory Reference (octal)
Register Memory Reference (octal)
Qty. Decimal
Symbol
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
IO010
IO000
= TMR T600 K100
CTA600
K250
CNT CT600 K10
TA600 w
K250 w
T600
None specific, used with many instructions S1
SG S 001
Special Registers
None
R574 – R577
4
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.
Page 175
8–27 System Operation
DL340 Memory Map Memory Type
Discrete Memory Reference (octal)
Register Memory Reference (octal)
Qty. Decimal
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
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
= TMR T600 K100
CTA600
CNT CT600 K10
K250
Contact valid for counters only.
T600
None specific, used with many instructions SR 400 417
Special Registers
None
R574 – R577 R770 – R777
12
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.
System Operation
=
Page 176
8–28 System Operation
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.
System Operation
MSB 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 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.