Overview of the memory areas
Here are the different memory areas, which are also addressed in exactly the same way in the programming environment:
- X0 ... X777 - the digital input area
- Depending on the model and number of extensions: the input bits of the CPU unit can occupy X0 to X99 depending on the model, those of the first extension X100 to X199, extension 2 occupies X200 to X299 etc. up to extension 7 with X7...; a total of 512 input signals can be processed. The input assignment can also be read out as a word via XD0 to XD7....
- Y0 ... Y777 - the digital output range
- Like the input range, depending on the model and number of extensions: the outputs of the CPU unit are between Y0 to Y99 depending on the model, those of the first extension Y100 to Y199, extension 2 occupies Y200 to Y299 etc. up to extension 7 with Y7...; up to a total of 512 output signals are supported. The output assignment can also be read or written as a word via YD0 to YD7....
- ID0 ... ID777 - the analog input range
- Like the digital input range, depending on the model and number of extensions: any existing analog inputs of the CPU start at ID0, those of the first extension at ID100, extension 2 occupies ID200 etc.
- QD0 ... QD777 - the analog output range
- Like the input range, depending on the model and number of extensions: any analog outputs of the CPU start at QD0, those of the first extension at QD100, extension 2 occupies QD200, etc.
- M0 ... M8767 - the flags
- The area M0 ... M3999 are the classic flags, in the range M4000 ... M7999 are the battery-buffered flags. The battery-buffered area can be moved forwards and backwards for all memory areas in order to expand it or, in the other case, to save the battery. By addressing as MD... marker areas can also be accessed as a word.
Various system bits are located in the M8000 - M8767 area, e.g. the important "Always-on" on M8000 and an edge in the first PLC cycle on M8002, which can be used for initialization.
A commented list of the system bits can be found in the software, simply start the "Comment Editor" in the project tree on the left. The English descriptions are really worth reading ;-) ... who expects M8013 to "shake" in a cycle of 1s ... turn the music on ... you can probably guess what is meant ... if you can't figure it out send me an email.- S0 ... S1023 - the status bits or sequence control relays
- In the range S0 ... S1023 contain status bits that are intended for step logic (step ladder). The variable battery-buffered area starts at S512, unless otherwise configured.
The functionality and commands of the step logic are described in chapter 5 of this course. The S area can also be used as a normal marker. The status bits also support SD word addressing. - T0 ... T639 - the timers
- In the area T0 ... T639 contain various timer bits. A detailed overview and information on the application can be found in chapter 4 Timers & counters. Addressing TD0 ... TD639 the timer contents can be read out as a word.
- C0 ... C639 - the counters
- In the area C0 ... C639 contains various counters. A detailed overview and information on how they work can be found in chapter 4 Timers & counters. With CD0 ... CD 639 the counter readings can be read out as Word.
- D0 ... D9023 - the data registers (words)
- The area D0 ... D9032 contain registers of 16 bits each (Word). By default, the battery-buffered registers start at D4000.
Various system registers are located in the D8000 - D9023 area, e.g. the current cycle time in ms on D8010 and the battery voltage on D8005. You can also find an overview of this in the "Comment Editor".- FD0 ... FD9023 - the FlashROM registers (Words)
- The flash memory is ideal for storing data securely, e.g. for initial values and fixed parameters; in the area FD0 ... FD1535 contain the FlashROM registers, which the user can use freely. Not all commands can be used to write to flash registers, so be careful, as the service life of this area is only around 1 million write cycles, which is quickly reached with cycle times in the single-digit millisecond range.
In the FD8000 ... FD8512 certain system settings such as filter times, communication parameters etc. can be made. The Comment Editor (FD tab) reveals more here. (The long list "X.. corresponds with I**" is part of the possibility to redirect EA channels without changing the program, e.g. in the case of defective inputs or output relays).- System ranges therefore always start with 8000, which is easy to remember;
- ED0 ... ED16383 - the extension registers (words)
- Additional word registers for data-intensive tasks, e.g. simple data logging; note: this area can only be accessed with very few commands. You can find files on this in the programming manual. There it is described which commands assume which memory areas in their parameters.
Addressing
Some more information on addressing. Memory areas can be addressed directly, for example X3 for input 4 (of course, the numbering of the inputs starts at 0). Indirect addressing is simply possible via offset [], if D10=5 then X0[D10] is X5, for example. Using counters or timers, for example, data ranges can be easily processed one after the other (simply use the data ranges CD or TD for the current counter or timer status).
The notation for entering values as constants is important. To do this, simply mark the corresponding values as K for decimal, B for binary or H for hexadecimal, as is sometimes the case with other manufacturers. K100 is therefore a simple 100 as a decimal number.
Individual bits in words are simply addressed via a dot, which can also be combined with indirect addressing. D0[CD10].1, for example, is the first bit in the data register Dx to which counter C10 points. If you have any questions about addressing, please send me an email.