A PLC address is usually composed of several address elements. However, the structure of PLC addresses can vary with the type of PLC. Digital and analog input and output addresses are also differently constructed in many cases.
- Addressing digital inputs and outputs: Digital input and output addresses are usually constructed from a letter (for input or output), a byte address and a bit address. In addition to bit and byte addresses, there are also higher-order addresses such as WORD and DWORD addresses (for PLC cards, PLC modules etc.).
- Addressing analog inputs and outputs: With analog inputs and outputs, often only the byte address and the higher-order address element are specified and the bit address is omitted. Addressing of analog inputs and outputs is done using bytes, words or double-words. You can recognize this at a particular position in the address (i.e. the code) or the data type. In accordance with this, the analog addresses are incremented in steps of 1, 2, or 4. These can occur mixed in a PLC. You can define the size of the addressing range based on the data type. If you specify the data type of a PLC address, then the defined addressing range is automatically accounted for when addressing.
When addressing, the first level (as viewed from the rear) begins with the starting value and is incremented until the end value is reached. A carried value is then created for the address element. The end value is disregarded in the last level since the carried value can no longer be displayed.
Structure of the format elements
Every address element of a PLC address is represented using a format element of type "Counter". Separators between the counters show the borders of the address elements. Areas with fixed numbers of positions within the address format can be placed after each other without a separator.
You can include the configuration data of the PLC box and the channel designation in the format. When addressing, the suggestion for the start address then contains this information. When addressing several cards, the value for every new card is obtained from the card data; when addressing a single card the counting proceeds from the start address.
A format element for a counter is built in the following manner:
[C<number system, start value, end value, number of digits, configuration value from property>]
[C<d,1,127,0,G>].[C<o,0,7,0,O>]
Here, "C" is the symbol for a counter.
The byte address is built according to the decimal number system and has the start value "1" and the end value "127". The number of digits is "0" (i.e. not limited). The start address of the PLC card is specified as the configuration value, i.e., the value in the Start address of PLC card property is used as the start value for addressing.
The bit address is built according to the octal number system and has the start value "0" and the end value "7". The number of digits is "0" (i.e. unlimited), and no configuration value is specified (an entry of "O").
The number system and the configuration value are each specified by an identifier:
Number system identifier |
Example |
---|---|
d = decimal |
0,1,2,3....9, 10,11....19, 20.... |
o = octal |
0,1,2,3....7, 10,11....17, 20.... |
h = hexadecimal |
0,1,2,3....9, a,b,c,d,e,f, 10,11....19, 1a,1b,1c,1d,1e,1f, 20.... |
Configuration value identifier |
Property |
---|---|
O |
No configuration value |
N |
Station ID |
R |
PLC card is placed on rack ID |
M |
Position (slot / module) |
G |
Start address of PLC card |
C |
CPU: Name |
Assuming you have defined the following address format:
[C<d,0,100,0,O>]//[C<h,1,f,3,O>].[C<d,1,8,2,O>]
This results in (e.g.) the creation of the following addresses of the PLC connection points with the identifier "E" (inputs):
E0//001.01
E0//001.02
...
E0//001.08
E0//002.01
...
E100//00f.08
E101//001.01
If the address format contains more than one address element then, during automatic addressing, "PLC box oriented" addressing is performed, i.e., the addresses within the box will always begin with the starting value of the first level. With only one address element, simple sequential addressing is performed.
Address with configuration value
If a configuration value is used in the address format, and the cards to be addressed have a valid and standardized configuration value, then the addresses are consolidated – even across multiple cards. The counter is incremented sequentially, starting from the configuration value (e.g. 25). When the end value is reached (e.g. 25.7), the start value specified by the configuration value is increased by one, and addressing continues (new addresses, e.g. 26.0 ... 26.7, etc.).
If there is no configuration value in the address format, the start address specified in the Readdress PLC connection points dialog is used for addressing purposes. In this case the addresses are not consolidated, and the counter restarts with each new card (new addresses, e.g. 25.0, 25.1, 26.0, 26.1, etc.).
Note:
The addresses will not be consolidated if the cards to be addressed do not have a standard configuration value, or have one that is blank or invalid. If the configuration value is blank or invalid, the start address from the Readdress PLC connection points dialog, or the most recently used address, will be used for addressing purposes.
In the schematic you have added (by copying, for example) three PLC cards with the following addresses:
Card 1, 2 and 3: 25.0, 25.1, 25.2, 25.3
Use the "Start address of PLC card" configuration value in the address format. The value of the property with the same name is "25" for all three PLC cards. The bit address is built according to the octal number system and has the start value "0" and the end value "7".
After addressing the cards have the following addresses:
Card 1: 25.0, 25.1, 25.2, 25.3
Card 2: 25.4, 25.5, 25.6, 25.7
Card 3: 26.0, 26.1, 26.2, 26.3
The bit address for card 2 has reached its maximum value of "7", so the byte address for card 3 is incremented by one, and the bit address restarts from "0".
See also