IMDHMIControls LibraryShop main store

How-to

Reading G120C data without touching the PLC program

Drives and motion Published 6 min read By IMDHMI controls team

Short answer

Read the G120C with an HMI direct access connection to the drive itself over PROFINET: the PLC keeps its cyclic controller connection and its program stays untouched, while the panel's web server shows actual speed and current on a phone. If software must receive the values, add a separate supported gateway, because the HMI page is not an API.

On this page
  1. The path that leaves the PLC program alone
  2. Decide display versus API before configuring
  3. Pick the values the phone must show
  4. Configure the HMI channel to the drive
  5. Example: place the panel on the drive's subnet
  6. Prove the read without disturbing control
  7. When software must receive the data
  8. Questions asked

You do not need to open the Siemens PLC program to read running speed, current and fault status out of a G120C. A SIMATIC HMI can hold a communication channel that points at the drive itself over PROFINET, while the PLC keeps its existing controller connection and its code stays as it is. Turn on the panel's web server and a phone browser shows the same screen. That covers people looking at numbers; if software must receive the values, the HMI page is not an API and that case needs a separate supported gateway. The steps below configure the channel, address the panel and prove the read without disturbing control.

The path that leaves the PLC program alone #

Today the PLC is the drive's IO controller: it writes the speed setpoint and the start and stop commands into the cyclic telegram and reads status words back, the arrangement covered in control a PROFINET servo drive with cyclic telegram data. In PROFINET, standardized in the IEC 61158 and IEC 61784-2 set, that controller relation and acyclic parameter access are separate services on one interface. The standard's model, in plain terms: one client holds the cyclic application relation and exchanges the telegram, while other clients reach device data through acyclic reads without holding that relation.

Siemens documents the direct route as application example 97550333, SINAMICS G/S: HMI direct access, showing a SIMATIC HMI reading G120 and S120 drives with no S7 PLC anywhere in the connection. You configure the same kind of HMI connection beside the PLC: the channel's partner is the drive's PROFINET interface, not the CPU, and the G120C operating instructions cover communication over PROFINET IO and Ethernet on that integrated interface. No tags are copied for you and no block is added to the program you are not allowed to touch. Acyclic reads beside a running cyclic connection follow the pattern used for reading IO-Link ISDU parameters over PROFINET acyclic record data, aimed here at the drive's parameter list.

Decide display versus API before configuring #

Two requirements hide inside the request, and they lead to different hardware. A person reading numbers on a phone is a display requirement: the HMI channel plus the panel's web server meets it, and this article builds exactly that. An application that must pull structured values is an interface requirement: no web page satisfies it, because a browser page is drawn for eyes, not parsed by a client. Commit to one before buying anything. Display only: build the panel path. API mandatory: go straight to the gateway section at the end. Both: build the panel path for the people and a gateway for the software, as two separate consumers.

List the values before building screens: running speed, motor current, and the fault or status indication, each marked as view or retrieve.

Pick the values the phone must show #

Running speed means the actual speed the shaft turns at, not the speed setpoint the PLC writes into the telegram; the two differ by however hard the machine is working. Current means the measured motor current. Faults and status come from the drive's own indications, which is what the panel reads. For each tag, set the display format to the parameter's engineering unit and print the unit on the screen. One rule keeps the display honest: never wire a command value into a field labelled as a measurement. If a required value does not appear among what the channel exposes, change the data path; do not substitute a nearby-looking number.

Configure the HMI channel to the drive #

  1. Place the panel on the drive's subnet with a free address; the worked example below shows the check.
  2. In the panel's connection configuration, add a connection whose partner is the drive itself, over its PROFINET interface. This is an HMI connection to the drive, not to the PLC; the panel reads the drive's parameter data through it.
  3. Create tags for actual speed, motor current and fault or status, each with its unit and display format, and label any setpoint you also show as a setpoint.
  4. Build the screen for reading: this panel gets no write tags and no setpoint entry fields. The PLC owns the commands through its telegram, and that ownership is what must stay untouched.
  5. Enable the panel's web server in its runtime settings, where the panel offers that option, and confirm the phone's network can reach the panel's address.
  6. Load the project and confirm the panel shows live values with the drive powered, before anyone trusts the phone view.

Example: place the panel on the drive's subnet #

Take an illustrative network: the drive at 192.168.10.5, the PLC at 192.168.10.1, subnet mask 255.255.255.0 everywhere. Give the panel, for example, 192.168.10.20. The subnet check is a binary AND of each address with the mask: 192.168.10.20 AND 255.255.255.0 gives 192.168.10.0, and 192.168.10.5 AND 255.255.255.0 also gives 192.168.10.0. Same network, so the panel reaches the drive directly, with no router in the HMI connection and no gateway address to depend on. Before you assign the address, ping the candidate once; a reply means something on the network already owns it, so take the next free one, for example 192.168.10.21, and repeat. If the panel must live on a different subnet, a router joins the two networks, and that router becomes one more thing to prove during commissioning; keeping the panel local is the simpler decision.

Prove the read without disturbing control #

  1. Commission in a safe operating state: guards closed, drive enabled, someone at the machine stop.
  2. Check the PLC's cyclic connection first: the drive must not raise A08526, the no-cyclic-connection alarm explained in why a PROFINET drive reports A08526 no cyclic connection. If it appears, the panel has taken a role it must not take; disconnect the panel and correct the connection before anything else.
  3. Run the drive and compare the panel's actual-speed tag with the drive's own display: same number, same unit. Cross-check the unit with the motor: a four-pole machine at 50 Hz has a field speed of 120 × 50 ÷ 4 = 1500 rpm, so the shaft speed reads a little below that at this frequency, never 15000 and never 15.
  4. Put load on the motor and compare the current tag with the drive's current indication.
  5. Recall or trigger a fault and confirm the status value follows the drive's indication.
  6. Open the panel's page in the phone browser and confirm the values update live, not a frozen first frame.

When software must receive the data #

The web server serves the screen to browsers; it does not publish an API, so an application that must retrieve values needs its own data path. The supported shape is a gateway that reads the drive's data over the plant network and republishes it in a machine-readable form, for example as OPC UA. Host it on an industrial mini PC in the cabinet next to the controller, and make one criterion decide the software: it must name SINAMICS G120 support in its own documentation, and one real client request returning structured values is the proof the requirement is met.

What not to build: do not hang a second controller on the drive to fish for data. A PROFINET device serves the controller relation it was configured for; PROFINET equipment is conformance-tested through PROFIBUS and PROFINET International, and a stack you assemble yourself on maker hardware has no such testing behind it. Commanding a VFD from a CLICK PLC, covered in choosing how a CLICK PLC commands VFD speed safely, is a control design for a drive you command, not a monitoring tap on a drive another controller owns. The other classic route, parameter reads with DPRD_DAT and DPWR_DAT, lives inside the PLC program, which is exactly the file you are not allowed to touch.

Questions asked

Can the same HMI channel write to the G120C?

The connection type carries writes as well as reads, so read-only is a discipline, not a property of the channel. Author read tags only, and give any phone or operator account a user group without write rights on this panel. The PLC commands speed and start/stop through its telegram; a second client writing control parameters competes with the program that must stay untouched.

Does the panel's connection change the PLC's cyclic update time?

No. The update time belongs to the cyclic connection between the PLC and the drive, and adding an HMI connection does not reconfigure it. Parameter reads travel as small acyclic frames beside the cyclic traffic, so the load they add is bandwidth on the wire, not a slower control loop. Commissioning shows this directly: the control connection behaves exactly as before the panel was added.

Why not read the drive with a small PLC or a single-board computer instead?

Because both would act as a second controller on a drive that already has one, unless the device documents multi-controller operation, and a hand-assembled PROFINET stack on maker hardware carries no conformance testing. The supported alternatives are the HMI channel for people and a gateway that documents SINAMICS G120 access for software. The gateway leaves the controller relation alone and reads parameter data, which is what the requirement actually asks for.

Which panels can serve their screen to a phone?

Only panels whose options include a web server can publish their screens to a browser; it is an option on Siemens Comfort-class panels, enabled in the runtime settings. A panel without that option still displays values locally, so when phone access is part of the requirement, the web server becomes a selection criterion rather than a setting you can add later.

Keep reading

  • How-to

    Control a PROFINET servo drive with cyclic telegram data

    No motion library is needed when a PLC only exchanges cyclic process data with a PROFINET servo drive: import the device description, attach the drive, select the same telegram the drive is configured for, and map the words. Standard telegram 1, PZD 2/2, is two 16-bit words each way — four bytes per direction — and the PLC logic sequences control word STW1 and reads status word ZSW1.

    Drives and motion

  • Troubleshooting

    Why a PROFINET drive reports A08526 no cyclic connection

    A08526 with the BF LED blinking and Ready lit means the drive is powered and correctly named, but the controller never accepted its configured device representation. In the reported case, five of sixteen drives ran firmware 4.6 against a hardware configuration written for 4.5. Inventory each drive's installed firmware, correct the mismatched entries in the hardware configuration, and download with motion inhibited.

    Drives and motion

  • How-to

    Why Telegram 111 does not carry SINAMICS S210 digital input status

    Telegram 111 is a fixed telegram with no word for r722, so the S7-1500 cannot receive S210 digital input status through it. Read r722 acyclically with the SINA_PARA function block for indication and monitoring; move to a user-defined telegram only when the input status must be current within the same scan the logic acts in.

    Drives and motion