Importing LOGO! Counter Values to Excel via Access Tool

David Krause13 min read
HMI / SCADASiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview

The LOGO! Access Tool is a free Microsoft Excel add-in published by Siemens that lets you read and write live process data from a LOGO! 8 Base Module (BM) directly inside a worksheet. Values are read over HTTP/HTTPS through the LOGO!'s integrated web server and refreshed on demand, on a timer, or on a worksheet change event. The tool is the simplest path to get counter readings, timer values, analog measurements, and flags out of the LOGO! and into a spreadsheet for logging, OEE dashboards, or service diagnostics without writing custom OPC or Modbus code.

The most common field issue, and the question that prompts this guide, is: "How do I take a counter value from the LOGO! program and pull it into Excel?" The answer is a two-step process:

  1. Map the function-block parameter (e.g., counter actual value) into the VM (Variable Memory) area using Parameter VM Mapping in LOGO! Soft Comfort.
  2. Read that VM address in Excel using the add-in's =LOGOVAR("VD0") function.

Skip either step and the value either never updates, displays as zero, or returns nonsensical magnitudes (the "values in Excel are much higher than shown on the PLC" symptom discussed below).

Prerequisites

Item Requirement Notes
LOGO! Base Module LOGO! 8.F (6ED1052-xxx08-0) or later Integrated web server is mandatory; LOGO! 6/7 have no Access Tool support.
Firmware LOGO! 8 BM FS04 or newer Earlier FS levels may restrict the VM area size.
LOGO! Soft Comfort V8.0 minimum; V9.0 recommended Parameter VM Mapping dialog is greyed out in older versions.
Microsoft Excel 2016 / 2019 / 2021 / 365 (32 or 64-bit) Access Tool installs as an Excel COM add-in (.xlam).
Network Ethernet between PC and LOGO! BM Same subnet, IP reachable from the PC.
LOGO! Access Tool Latest version from Siemens Support Distributed as a self-extracting installer and a PDF help file.

Download the Access Tool and the bundled help PDF from the official Siemens support entry, then run the installer with Excel closed so the COM registration completes cleanly: LOGO! Access Tool Help (PDF). The training module LOGO! 8 Access Tool WBT (Siemens SITRAIN) walks through the same flow in interactive form.

LOGO! 8 VM Memory Architecture

Every LOGO! 8 Base Module exposes a fixed slice of Variable Memory (VM) to the Ethernet web server. VM is the only memory region the Access Tool can read or write to; program-internal block outputs cannot be addressed directly. The size of the VM area depends on the BM variant:

LOGO! 8 BM Order number (example) VM bytes available V-bit range
LOGO! 8 Basic (no display) 6ED1052-1CC08-0BA1 24 V0.0 – V23.7
LOGO! 8 Standard 6ED1052-1MD08-0BA2 250 V0.0 – V249.7
LOGO! 8.3 / LOGO! 8.4 6ED1052-1MD08-0BA2 850 V0.0 – V849.7

Address syntax follows the S7-200 convention used by the LOGO! web server API:

  • VBn – byte, 8 bits (e.g., VB0).
  • VWn – word, 2 bytes, byte-aligned (e.g., VW0 covers VB0+VB1).
  • VDn – double word, 4 bytes, byte-aligned (e.g., VD0 covers VB0…VB3).
  • Vx.y – single bit (e.g., V0.0, V0.7).

Because the LOGO! web server always transfers a full 32-bit DInt when it serves a VD address, any numeric function-block output that is wider than a 16-bit word must be mapped to a VD (DInt), not a VW. Counter actual values, up/down counter limits, analog thresholds, and the on-delay / off-delay elapsed time on a high-resolution timer all return DInt in the LOGO! 8 instruction set.

Parameter VM Mapping in LOGO! Soft Comfort

Parameter VM Mapping is the bridge between LSC program symbols and the byte/word/bit VM addresses the web server exposes. Without a mapping entry, the counter value is computed inside the LOGO! CPU but is invisible to the Access Tool.

Step-by-step mapping procedure

  1. Open the LSC project and go to Tools → Parameter VM Mapping (German UI: Extras → Parameter-VM-Zuordnung).
  2. The dialog lists all function-block parameters in the project. Tick the checkbox for every parameter that must be readable from Excel or the web server.
  3. In the VM Address column, type the destination. For a counter actual value, type VD0 (or the next free double word; double words must be aligned to a 4-byte boundary).
  4. Set the Type column to VD so the LOGO! firmware handles the parameter as a 32-bit signed integer.
  5. Click OK and transfer the project to the LOGO! BM (PC → LOGO! or Ethernet download).
  6. Open the LOGO! web interface (browse to http://<LOGO_IP>) and confirm that the new VM variable appears in the Variable Table with the expected value.

The mapping is stored inside the LSC program file, so the assignment is reproducible: re-downloading the same program restores the same VM layout on the BM.

Address alignment rule. A VD must start at a byte that is a multiple of 4. Valid DWord starts are VB0, VB4, VB8, and so on. Placing a VD at VB1 or VB2 produces a double assignment with overlapping V-bits and yields corrupted reads in Excel.

Installing the LOGO! Access Tool

  1. Close every Excel instance.
  2. Run the Access Tool installer (default path C:\Program Files\Siemens\LOGO Access Tool\ or Program Files (x86) for the 32-bit build).
  3. Launch Excel. The LOGO ribbon tab appears; if not, enable the add-in under File → Options → Add-Ins → Manage: COM Add-ins → Go.
  4. Click LOGO → Settings and enter the LOGO! IP address, HTTP port (default 80), and HTTPS port (default 443) for the target BM.
  5. Tick Use HTTPS only if you have uploaded a certificate to the LOGO!; otherwise leave the default HTTP.
  6. Press Test Connection. A green status bar confirms round-trip access to the LOGO! web server.

The settings are stored per-workbook, so each Excel file can target a different LOGO! or a different cell layout without re-entering the IP.

LOGOVAR() Function Reference

The Access Tool adds a single worksheet function:

=LOGOVAR("VD0")           ' read 32-bit signed integer
=LOGOVAR("VW10")          ' read 16-bit signed integer
=LOGOVAR("VB4")           ' read 8-bit unsigned value (0-255)
=LOGOVAR("V0.0")          ' read single bit, returns TRUE/FALSE
=LOGOVAR("VD0", "BITS16") ' optional format hint, see help PDF

The first argument is a string literal containing the VM address; the second (optional) argument selects display formatting such as hex, BCD, or a 16-bit bitmask. Without a format hint, DInts are returned in decimal.

Refresh behaviour is controlled from the ribbon:

  • Read – single manual poll of all LOGOVAR cells in the active sheet.
  • Read Continuous – polls every 1 s by default; the interval is configurable in Settings → Refresh Interval.
  • Write – pushes a value back to a writable VM address. Writes are only allowed on mapped parameters that the LOGO! program does not overwrite every scan; otherwise the next scan overwrites the write.

Data Type Mapping Table

LOGO! function block parameter Native type Required VM address Excel formula
Up/Down counter actual value (C<x>.CV) DInt (32-bit signed) VD =LOGOVAR("VD0")
Up/Down counter setpoint (C<x>.SP) DInt VD =LOGOVAR("VD4")
On/Off-delay elapsed time (B<x>.ET) DInt (ms) VD =LOGOVAR("VD8")
Hour counter actual (H<x>.CV) DInt (hours × 3600) VD =LOGOVAR("VD12")/3600
Analog threshold trigger (no native type) Word VW =LOGOVAR("VW20")
Threshold switch output flag Bit V =LOGOVAR("V4.0")
AI scaled value (AM<x>.AQ) Word (0-1000) VW =LOGOVAR("VW22")/10

The "Word (0-1000)" row is the critical one for analog values: the LOGO! scales 0–10 V or 0–20 mA into 0–1000 internally. Divide by 10 in Excel to get the engineering value as a percentage, or apply a linear scaling =LOGOVAR("VW22")/1000*(Emax-Emin)+Emin when the analog input is configured for a custom range (e.g., 4–20 mA into 0–50 °C).

Worked Example: Counter to Excel

The shortest complete path to verify the chain is to map a single Up/Down counter and pull it into a cell.

  1. In LSC, drop an Up/Down Counter block (function key F2 → Special → Counter) and set On=I1, Off=I2, Set=M1 (manual reset to 0).
  2. Open Tools → Parameter VM Mapping. Tick the row corresponding to the counter's Actual Value parameter. Set the VM Address to VD0 and the Type to VD.
  3. Download the project to the BM.
  4. Open a blank Excel sheet. In cell A1 enter =LOGOVAR("VD0").
  5. On the LOGO! ribbon click Read. A1 now shows 0.
  6. Pulse I1 on the LOGO! a few times; click Read again. A1 increments by one pulse.
  7. For continuous updates, click Read Continuous. A1 now polls the BM once per second.

Once this works, additional parameters can be mapped to VD4, VD8, VD12, and so on without restarting the Access Tool or re-installing the add-in.

Avoiding VM Address Conflicts ("Double Assignment")

The forum-symptom of "I now have the data I need, but the values in Excel are much higher than shown on the PLC" is almost always caused by overlapping VM ranges. Because VD0 covers bytes 0–3 and bits V0.0–V3.7 simultaneously, mapping any of the following into the same slice produces a write collision:

  • Any V bit between V0.0 and V3.7.
  • Any VB between VB0 and VB3.
  • Any VW between VW0 and VW3.
  • Any other VD in the same range.

When two parameters fight for the same VM range, the LSC compiler silently lets the assignment pass, but the LOGO! BM alternately writes each parameter on successive scan cycles, so the Access Tool reads whichever one was written last. Typical field values that "look much higher than the PLC" are actually the LSC block ID or the parameter setpoint bleeding into the counter cell.

To eliminate the problem, lay out VM in 4-byte chunks and never mix data widths inside a chunk:

VM address Parameter mapped Type
VD0 Counter 1 actual value VD
VD4 Counter 1 setpoint VD
VD8 Timer 1 elapsed time VD
VD12 Hour counter 1 actual VD
V16.0 Output flag Q1 Bit

If the LSC project reuses the same address, the VM Mapping dialog highlights the conflict in red on newer Soft Comfort releases. In older versions, the only reliable check is to review the project for any other block that has its Output parameter ticked in the VM Mapping table.

Word-Order, Sign, and Scaling Pitfalls

Three further sources of "wrong number" complaints in the field:

  • Word swapped in the wrong slot. The LOGO! web server returns a 32-bit value, but Excel users sometimes type the address as VW0 instead of VD0. A VW read returns the low 16 bits of the same DInt, which for a counter that has crossed 32 768 becomes a negative number due to two's-complement sign extension.
  • Counter direction. A Down counter reading the actual value as a large positive number when the physical count is small is almost always mis-mapped: the displayed value is the setpoint slot, not the actual value slot. Verify the LSC parameter name in the mapping table.
  • Hour counter resolution. H-counter values are returned in seconds, not hours. Divide the cell value by 3600 in Excel, or use the format-hint argument documented in the help PDF.

Connection Troubleshooting Matrix

Symptom in Excel Likely cause Corrective action
#N/A on every LOGOVAR No route to LOGO! or wrong IP Ping the BM from a command prompt; check subnet mask; confirm Use HTTPS matches the BM configuration.
0 while the LOGO! display shows 42 Address not mapped in LSC Re-open Parameter VM Mapping and tick the parameter; transfer the project to the BM.
Value flickers between two readings Double assignment (see above) Move the conflicting parameter to a free 4-byte chunk.
Very large / negative number Read with wrong width (VW instead of VD) Re-type the address as VD or use the BCD / hex format hint.
HTTP 401 on first read after install LOGO! user authentication enabled, but no password configured in the add-in Enter the BM web-server password under Settings → Web Server Password.
Works for 30 s, then disconnects LOGO! session timeout (default 60 s) elapsed while idle Set the BM web server to Keep Session Alive, or reduce the polling interval to below the timeout.

Alternative Read Paths from Excel

For larger installations where multiple LOGO! 8 stations or higher polling rates are required, the Access Tool is still usable but worth comparing with the standard Siemens options:

Method Protocol Polling Best fit
LOGO! Access Tool HTTP(S) web server ~1 s typical Single BM, dashboards, low-rate logging
LOGO! web server (manual browser) HTTP(S) Manual Commissioning only
OPC UA server (LOGO! 8.3 onward) OPC UA TCP 4840 100 ms SCADA, multi-BM, write-back control
S7-200 compatible fetch over Ethernet (third-party Excel VBA) ISO-on-TCP / S7Comm 100 ms Legacy reuse of existing S7-200 code
Modbus TCP (LOGO! 8.3 + expansion) Modbus TCP 502 20–100 ms Multi-vendor SCADA

For most single-BM dashboard use cases, however, the Access Tool remains the lowest-effort path: no OPC server, no VBA, no firewall changes, and the LOGO! is still a fully standalone controller if the PC is disconnected.

Security and Network Considerations

The LOGO! web server has no built-in user accounts on firmware levels before FS05; the Access Tool simply opens a TCP connection. For production networks, follow these practices:

  • Place the LOGO! on a dedicated automation VLAN; do not expose HTTP/80 to the office network.
  • Enable the BM's web-server password and enter it in the Access Tool Settings dialog so the PC is authenticated.
  • Disable LOGO! Web Server → Allow Write Access if the dashboard only needs to read.
  • Use HTTPS (port 443) on FS05 and newer BMs by uploading a self-signed or CA-signed certificate through the web interface.
  • Disable the Access Tool's Read Continuous mode when the workbook is closed; polling a BM that is on a remote link can keep the VPN tunnel from idling out.

Verification Checklist

  1. LOGO! web interface (browser) shows the mapped VM variable in the Variable Table with the correct value.
  2. Cell A1 = =LOGOVAR("VD0") shows the same value after a single Read.
  3. Value increments in Excel when the physical counter input pulses.
  4. No VM conflict warnings appear in Tools → Parameter VM Mapping when the project is re-opened in LSC.
  5. Connection survives a manual reboot of the BM (the add-in re-establishes on the next read).
  6. With Read Continuous enabled, polling interval stays below the LOGO! session-timeout to avoid re-login overhead.

FAQ

Why is the value in Excel twice the size of the value shown on the LOGO! display?

The most common reason is that a VW address is being read where a VD should be used. Counters and timers are 32-bit DInts in the LOGO! 8 instruction set, so always map the parameter to a VD (4-byte aligned) and use =LOGOVAR("VD0"). If the value is exactly 256 × the expected number, a byte/word width mismatch is confirmed.

My LOGOVAR() cell shows #N/A immediately after installation, what should I check first?

Confirm the PC can reach the LOGO! at the IP entered in LOGO → Settings: open a browser to http://<LOGO_IP> and look for the LOGO! web page. If the browser succeeds but Excel fails, the add-in has not been enabled — go to File → Options → Add-Ins → COM Add-ins → Go and tick the LOGO! entry. If both fail, fix the network/subnet first.

Can I use the Access Tool with LOGO! 6 or LOGO! 7 base modules?

No. The Access Tool relies on the integrated web server of the LOGO! 8 family. LOGO! 6 and 7 do not expose VM over Ethernet and are not supported by the add-in. For those older generations, use the LOGO! display text-message output to a serial HMI or a Modbus RTU expansion module.

How many variables can the Access Tool read in one workbook?

There is no documented hard limit on the number of LOGOVAR() cells, but each cell is a separate HTTP GET during a refresh. For more than ~200 cells refreshed once per second, expect measurable CPU load on the BM; consider OPC UA on a LOGO! 8.3 with FS05 or newer for that scale.

Is the Access Tool still maintained for current Excel and LOGO! Soft Comfort versions?

Siemens ships the add-in as a free download alongside the LOGO! Soft Comfort V9 installer, and the help PDF on the support portal is updated for current firmware. New LOGO! 8.4 features (e.g., expanded VM, OPC UA server) work transparently with the same LOGOVAR() syntax; no code changes are required for the add-in to read the larger VM area.

Back to blog