Siemens LOGO! Integration Guide
Read and write Siemens LOGO! 8 logic modules by LOGO! address. The LOGO! connector speaks S7 (ISO-on-TCP, port 102) and reaches the module through a connection set up in LOGO!Soft Comfort, by its TSAP pair.
Overview
The LOGO! connector provides:
- LOGO! addresses: read
I,Q,M,AI,AQ,AM,NI,NQ,NAI,NAQand the V memory as the LOGO! names them (I1,Q3,AI2,NI5,VW10) - Types that follow the address: bits as booleans, analog values as 16-bit integers, V bytes, words and double words
- Many points in the fewest reads: every area is a slice of one memory, so neighbouring points share a read
- Writes to network inputs and V memory: the only addresses a LOGO! program does not rewrite every cycle
LOGO! 8 base modules with Ethernet: 0BA8, 8.FS4 and 8.3. Older modules (0BA7 and earlier) use a different memory layout and are not supported.
Connection Configuration
Setting up the LOGO!
A LOGO! accepts an S7 client only through a connection configured in LOGO!Soft Comfort:
- Open Tools → Ethernet Connections (on a LOGO! 8, right-click Ethernet Connections → Add connection).
- Add a server connection (S7). Note its Local Properties (Server) TSAP, e.g.
02.00, and its Remote Properties (Client) TSAP, e.g.10.00. - Leave Only read access unticked if MaestroHub should write network inputs or V memory.
- Download the program to the LOGO!.
The TSAPs cross: the connection's local TSAP is the LOGO!'s own, which MaestroHub calls the Remote TSAP; the connection's remote TSAP is MaestroHub's, its Local TSAP.
Creating a LOGO! Connection
Navigate to Connections → New Connection → Siemens LOGO!.
| Field | Default | Description |
|---|---|---|
| Address | — | The LOGO!'s IP address or host name (required) |
| Port | 102 | S7 port. A LOGO! serves 102. |
| Local TSAP | 10.00 | MaestroHub's TSAP: the Remote TSAP of the LOGO!Soft connection |
| Remote TSAP | 02.00 | The LOGO!'s TSAP: the Local TSAP of the LOGO!Soft connection |
| Timeout | 5s | Maximum time to connect, and to wait for each answer |
A TSAP is two hex bytes separated by a dot. The defaults are the ones the previous LOGO! driver used, so a module already set up for it connects unchanged.
Testing the Connection
Test Connection opens the S7 connection with the TSAPs and reads one byte of the LOGO!'s memory. A LOGO! that refuses the connection usually has no server connection with these TSAPs, or a different program was downloaded.
LOGO! Addresses
Every LOGO! address is a slice of the module's variable memory (VM). The type follows from the address.
| Address | What it is | Range | Type | Written |
|---|---|---|---|---|
I | Digital inputs | I1–I64 | BIT | No |
Q | Digital outputs | Q1–Q64 | BIT | No |
M | Flags | M1–M112 | BIT | No |
AI | Analog inputs | AI1–AI16 | INT | No |
AQ | Analog outputs | AQ1–AQ16 | INT | No |
AM | Analog flags | AM1–AM64 | INT | No |
NI | Network inputs | NI1–NI128 | BIT | Yes |
NAI | Network analog inputs | NAI1–NAI64 | INT | Yes |
NQ | Network outputs | NQ1–NQ128 | BIT | No |
NAQ | Network analog outputs | NAQ1–NAQ32 | INT | No |
V | V memory bit | V0.0–V850.7 | BIT | Yes |
VB | V memory byte | VB0–VB850 | BYTE (0–255) | Yes |
VW | V memory word | VW0–VW849 | INT (−32768–32767) | Yes |
VD | V memory double word | VD0–VD847 | DINT | Yes |
The LOGO! program rewrites its inputs, outputs, flags and analog values on every cycle, so a value written there reverts before it does anything. To command a LOGO!, use a network input in the program (an NI or NAI block) or have the program read a V memory address, and write that.
Function Builder
Read Points (logo.read)
Read a set of named points, each by LOGO! address, in the fewest reads.
| Field | Required | Description |
|---|---|---|
| Points | Yes | One or more {name, address}: the name is the key in the result, the address a LOGO! address |
Example: pump = Q1, level = AI2, setpoint = VW10 returns { "pump": true, "level": 512, "setpoint": 750 } under values.
A point name may not repeat, and an address a LOGO! 8 does not have (such as Q65) is refused when the function is saved.
Write Point (logo.write)
Write one value to a network input or V memory address.
| Field | Required | Description |
|---|---|---|
| Address | Yes | NI1–NI128, NAI1–NAI64, or V memory (V10.3, VB10, VW10, VD10). Supports ((paramName)). |
| Value | Yes | true/false (also on/off, 1/0) for a bit, a whole number otherwise. Supports ((paramName)). |
A single bit is written by reading its byte, setting the bit and writing the byte back. Network inputs are written only by clients, so this is safe there; if the program also writes other bits of the same V byte, a write can race with it.
Testing Functions
Use Test Function on the function form to run a read or write against the live LOGO! before saving it.
Pipeline Integration
Each operation has its own node: LOGO! Read and LOGO! Write. See Siemens LOGO! Nodes for their parameters and results.
Troubleshooting
| Symptom | Possible cause | Solution |
|---|---|---|
| Test Connection fails with a connection error | No server connection with these TSAPs on the LOGO!, or the address is wrong | Check the LOGO!Soft connection's TSAPs (they cross) and that the program with the connection was downloaded |
the LOGO! refused the request on a write | The LOGO!Soft connection is set to Only read access | Untick it and download the program again |
… is set by the LOGO! program every cycle | A write to I, Q, M or an analog value | Write a network input (NI, NAI) or a V address the program reads |
a LOGO! 8 has Q1-Q64 (or similar) | An address the module does not have | Use an address in the range shown |
| A V value reads as garbage | The program keeps it at another V address, or as another width | Check the address and width in LOGO!Soft (VB, VW or VD) |