Overview: What the LOGO! Base Module VM Area Is
The Variable Memory (VM) is a non-volatile, byte-oriented working area inside every Siemens LOGO! 8 Base Module. It exists so that the LOGO! program can hand values—digital inputs, digital outputs, analog values, function-block flags, and operator parameters—to external devices such as HMI panels, the LOGO! CMR-2020 communication module, the LOGO! TDE text display, or any Modbus/TCP master on Ethernet.
VM is the only LOGO! memory region that is exposed on the network side. When you build a remote command—such as an SMS sent to a CMR-2020 to turn Q1 ON—you are writing a 1 into the VM bit that the LOGO! program has previously bound to Q1. The engineering task is therefore a translation: find the VM address that the LOGO! program has already mapped to the symbol you want to control.
Four address prefixes are used in the LOGO!Soft Comfort editor and in the LOGO! online help:
-
V— single bit -
VB— byte (8 bits) -
VW— word (16 bits, 2 bytes) -
VD— double word (32 bits, 4 bytes)
v0.0 and V0.0 refer to the same bit. The CMR-2020 SMS format, however, is documented in upper case; do not change case when typing SMS commands.VM Address Structure and Bit Notation
LOGO! uses S7-style absolute addressing. A bit is referenced as Vy.z where y is the byte number (0 to 850) and z is the bit number within the byte (0 = LSB, 7 = MSB). For bytes, words, and double words the suffixes B, W, and D specify the data width.
| Prefix | Width | Example | Bit breakdown |
|---|---|---|---|
V |
1 bit | V12.4 |
Byte 12, bit 4 |
VB |
8 bits (1 byte) | VB12 |
Bits V12.0 … V12.7 |
VW |
16 bits (2 bytes) | VW12 |
Bytes VB12 and VB13; V12.0 is the LSB |
VD |
32 bits (4 bytes) | VD12 |
Bytes VB12 to VB15; V12.0 is the LSB |
Because the LOGO! CPU is little-endian, byte n holds the low byte and byte n+1 the high byte of a word. A word written to VW0 is physically stored in VB0 (low) and VB1 (high); reading VB0 and VB1 afterwards returns the same value broken into two bytes. The same logic applies to VD0, which spans VB0 to VB3.
User-Accessible VM Range and Boundary Calculations
The user-accessible VM area runs from byte 0 through byte 850 inclusive. From this single constraint, the maximum address for each data width follows by simple arithmetic:
| Width | Lowest address | Highest address | Derivation |
|---|---|---|---|
| Bit | V0.0 |
V850.7 |
851 bytes × 8 bits − 1 |
| Byte | VB0 |
VB850 |
Direct byte count |
| Word | VW0 |
VW849 |
Last word starts at byte 849; consumes bytes 849 and 850 |
| DWord | VD0 |
VD847 |
Last dword starts at byte 847; consumes bytes 847 to 850 |
The boundary math is:
- Word start max = 850 − (2 − 1) = 849
- DWord start max = 850 − (4 − 1) = 847
The total VM size is 851 bytes, equivalent to 851 × 8 = 6 808 individual bits, 425 words, or 212 double words. Keep in mind that the LOGO! itself consumes part of this area for system markers (M-flag retention, run/stop, hour counter, and so on). A safe rule of thumb is to dedicate the lower 64 bytes (VB0 to VB63) to operator/M-flag traffic and reserve bytes above VB64 for application-specific Parameter-VM-Mapped values.
Parameter VM Mapping (LOGO! 0BA7 and Later)
From LOGO! firmware revision 0BA7 (LOGO! 7) onward, the LOGO!Soft Comfort tool Tools → Parameter VM Mapping lets you create a fixed, symbolic table that maps LOGO! program variables to VM addresses. Up to 64 parameters may be mapped per Base Module, and the table is downloaded into the BM as part of the program file (.lsc / .lma).
Steps to build the map:
- In LOGO!Soft Comfort, open the circuit program and choose Tools → Parameter VM Mapping (or the equivalent icon in the toolbar).
- Click Add to insert a row. Each row binds a program symbol (for example,
Q1,I3,B001, an analog amplifier output, or a flag) to a VM address of the chosen width. - For each row set:
-
Symbol – LOGO! block name (e.g.,
Q1,AI1,B03). - Address – VM byte, word, or dword the master will read or write.
- Access – read-only, write-only, or read/write.
- Retention – persistent across power-cycle (only valid for retentive parameters).
-
Symbol – LOGO! block name (e.g.,
- Confirm that the start address of every row stays within the limits listed above (VB850 for bytes, VW849 for words, VD847 for dwords).
- Save and download the program to the LOGO! BM. The mapping becomes active after the BM has run-stop-run cycled once.
For details, see the official Siemens support article Parameter VM Mapping (0BA7 and later) – LOGO!Soft Comfort.
Where to Find the VM Address of I1, Q1, and Flags
There is no public, fixed mapping from LOGO! I/O symbols to VM bytes. The reason is that LOGO!Soft allocates VM dynamically based on:
- which function blocks are used in the program,
- the order in which the FBs are placed, and
- whether Parameter-VM-Mapping rows collide with auto-allocated ranges.
The reliable way to read the live assignment is the LOGO!Soft Comfort online view:
- Connect the PC to the LOGO! BM via Ethernet and start LOGO!Soft Comfort.
- Choose Tools → Connect (or press F3) and click Go Online.
- Open View → Parameter VM Mapping. Every active row displays its symbol, VM address, access, and current value.
- Alternatively, hover the cursor over a network I/O block in the diagram; the status bar shows the bound VM bit, e.g.,
V0.0.
For example, if the first network output block in your program is wired to digital input I1, the firmware reserves the lowest free VM bit—V0.0—and binds it to I1. The next network output would land on V0.1, and so on. This is why the example in the source question states that I1 → V0.0 when I1 is the only network output.
| LOGO! program order | Symbol | VM bit (default) | Notes |
|---|---|---|---|
| 1st network output | I1 | V0.0 |
First free bit in VB0 |
| 2nd network output | I2 | V0.1 |
Same byte, next bit |
| 3rd network output | I3 | V0.2 |
Same byte, next bit |
| 1st network input | Q1 |
V0.0 (input side) |
Network input blocks also draw from the VM area |
| Flag M1 | M1 | Program-dependent | Visible in Parameter VM Mapping only if explicitly added |
Network I/O Blocks and the VM Bridge
LOGO!Soft Comfort provides two block families that touch the VM area:
- Network output – exposes a LOGO! symbol (I, AI, flag, FB output) to a VM bit/byte/word/dword that an external Modbus/TCP master or CMR-2020 can read.
- Network input – pulls a value from a VM address back into the LOGO! program, so an SMS command or remote master can write into a digital/analog signal that the program then uses.
The two halves of the bridge are not the same block. The data flow is:
LOGO! symbol → (network output) → VM byte/bit/word → external reader
external writer → VM byte/bit/word → (network input) → LOGO! symbol
To turn Q1 from 0 to 1 by SMS, you must have placed a Network Input block in the circuit program, wired it to Q1, and noted the VM address that the network input block uses. The actual VM bit you write is the network input's address, not Q1's internal register.
SD Card and VM: Common Misconception
The micro-SD card slot on a LOGO! BM is for program transfer, firmware update, datalogging, and recipe storage. It is not a memory expansion that adds bytes to the VM area. Inserting a 32 GB card does not move the VM ceiling from VB850 to anywhere else; the VM is wholly internal to the BM and its size is fixed at 851 bytes.
Conversely, removing the SD card does not erase VM. The VM is held in non-volatile flash inside the BM. The card is required only for:
- Cloning the circuit program to another BM.
- Loading firmware revisions.
- Recording trend data via the LOGO! BM datalogger.
- Storing recipes used by the recipe function blocks (0BA8 and later).
CMR-2020 SMS Command Reference (Manual Page 125)
The LOGO! CMR-2020 is a 4G/GSM communication module that publishes the BM's VM area as SMS-readable/writable tags. Page 125 of the CMR-2020 manual defines the command format:
<password>,<tagname>=value
Examples (illustrative; verify against the manual for the exact string syntax in your firmware revision):
- Set a bit:
1234,Q1=1to turn output Q1 ON,1234,Q1=0to turn it OFF. - Read a bit:
1234,Q1?returns the current state as an SMS reply. - Read a word:
1234,VW100?returns the 16-bit decimal value of VW100. - Write a word:
1234,VW100=1234to load the value 1234 into VW100.
The token Q1 is a friendly tag defined in the CMR-2020 configuration tool, not a raw VM address. Internally the CMR-2020 stores a tag table that maps Q1 to a VM address such as V0.0 or VB20.3 (the exact binding is set when you create the tag in the CMR-2020 web interface). The table in the BM's Parameter VM Mapping and the table in the CMR-2020 web interface must be kept in sync—a change on one side silently breaks the other.
Verification Procedure After Wiring a New Tag
Run this checklist after every change to the program or to the CMR-2020 tag table:
- Online check in LOGO!Soft: Connect to the BM, open Parameter VM Mapping, and confirm that each tag still points to the expected symbol and the expected VM address.
- Local Modbus/TCP read: From a PC on the same subnet, use a Modbus poll tool to read the VM holding register (function code 0x03) at the byte/word address. The reply must match the LOGO!Soft online value.
- Local Modbus/TCP write: Write a known value (function code 0x06 for a single register, 0x10 for multiple). Watch the bound symbol change in LOGO!Soft's online view.
-
CMR-2020 SMS test: Send the read command (e.g.,
1234,Q1?) and confirm the reply matches the on-site state. - Power-cycle test: Remove power for 30 seconds, restore, and re-send the read command. The reply must still match the on-site state; if it does not, the bound parameter is volatile and the program must be edited to make it retentive.
Troubleshooting Matrix
| Symptom | Likely cause | Diagnostic | Remedy |
|---|---|---|---|
| SMS command "address out of range" | Tag points above VB850, VW849, or VD847 | Open CMR-2020 web UI → Tag list → check address column | Re-bind the tag to an address inside the user range |
| SMS returns value but Q1 does not change | Network input block is missing or wired to a different symbol | LOGO!Soft online view → search for the network input block | Add or correct the network input block feeding Q1 |
| Q1 toggles in LOGO!Soft but SMS read returns 0 | Network output block for Q1 is missing; CMR is reading a default VM byte that is always 0 | Parameter VM Mapping → confirm Q1 row exists | Add a network output block (or a mapping row) for Q1 |
| Value resets on every power cycle | Underlying parameter is not declared retentive | LOGO!Soft → right-click block → properties → retention | Tick the retention checkbox and re-download the program |
| Two tags write to the same VM byte and corrupt each other | Manual address assignment collided with auto-allocated bytes | Compare Parameter VM Mapping table against network I/O block list | Re-assign the colliding tag to a free byte outside the auto-allocated range |
| Modbus master reports illegal data address (0x02) | Word/dword start overrun the 850-byte boundary | Re-derive max word start: 850 − 2 = 848 (use 849 safely); max dword start: 850 − 4 = 846 (use 847 safely) | Move the register to ≤ VW849 (words) or ≤ VD847 (dwords) |
| CMR-2020 accepts no SMS at all | SIM PIN locked, APN wrong, or antenna disconnected | CMR-2020 web UI → status page | Restore signal and re-test with the diagnostic SMS PING
|
Field-Proven Caveats
- Do not assume byte alignment of analog values. An AI1 read through Parameter VM Mapping can be a signed 16-bit word in VW, or a scaled 32-bit dword in VD, depending on how the row is configured. Mixing the two widths will read garbage.
- Watch the 850-byte boundary on Q1 to Q16 mappings. Some legacy programs use a single 16-bit word (VW0) to expose all 16 outputs at once. If your CMR-2020 tag set also tries to address individual bits inside that word, the bit-level tag will collide with the word-level read and the Modbus master will see torn writes.
- 0BA6 (LOGO! 6) has no Parameter VM Mapping. The feature exists from 0BA7 onward. On a 0BA6 base module, the only way to reach the network is the older "Network Input/Output" blocks, which auto-allocate VM starting at V0.0 with no manual address override.
- SD card presence is not a fault indicator. Some commissioning engineers treat "no SD card" as a fault. It is not—the BM runs the program from internal flash regardless.
- Use the simplest width that fits the symbol. A boolean tag (Q1, I1, M1) should be a single bit, not a full byte. Using VB0 for Q1 wastes seven bits and increases the chance of accidental overwrites by other network I/O blocks that auto-allocate into the same byte.
- Multiple LOGO! BMs on the same network have independent VM areas. Each BM keeps its own 851-byte VM. Two BMs do not share memory; a CMR-2020 connected to BM-A can only see VM-A.
What is the maximum VM address I can use on a LOGO! 8 base module?
The user-accessible VM area covers byte 0 through byte 850. The highest legal address is therefore VB850 for bytes, VW849 for words, and VD847 for double words. Words and double words stop one or three bytes earlier because multi-byte access must not overrun the 851-byte boundary.
How do I find the VM address of a specific input such as I1?
Connect LOGO!Soft Comfort to the base module, go online, and open View → Parameter VM Mapping. The dialog lists every bound symbol together with its live VM address. Alternatively, hover the cursor over the network I/O block bound to I1; the status bar shows the address. If I1 is the first network output block, it will normally land on V0.0, but the address can shift if other blocks were placed earlier.
Do I need an SD card to use the VM area?
No. The VM is internal non-volatile memory inside the LOGO! base module. The micro-SD card is used for program cloning, firmware updates, datalogging, and recipes; it does not expand or replace the VM.
Can a CMR-2020 SMS command change Q1 from 0 to 1?
Yes, but only if (a) the LOGO! program contains a network input block wired to Q1, (b) the CMR-2020 tag table has a tag (for example, named Q1) pointing to the same VM address, and (c) the password is correct. The command form is <password>,Q1=1. After the BM acknowledges the write, the next read (<password>,Q1?) should return 1.
Why does my Modbus master report "illegal data address" when reading VW850?
Because VW850 would need bytes 850 and 851, and byte 851 is outside the user VM range. The last legal word is VW849; the last legal dword is VD847. Move the read to a valid start address and the error will clear.