This application pattern exposes selected Siemens S7-1200 production data to an augmented-reality client for equipment monitoring and guided maintenance. The design has four stages: collect values in the PLC, convert them into an agreed data layout, transport them over a protected wireless network, and render them against the identified machine.
Define the PLC-to-AR Architecture
The demonstrated hardware consists of an S7-1200 PLC, an industrial router with Wi-Fi, an AR device such as Microsoft HoloLens, and a development computer. The proposed software stack uses an S7 communications library to read the PLC and Unity with Vuforia to recognize equipment and render status information. QR codes or other high-contrast markers associate the displayed information with the correct machine.
Start with a read-only monitoring scope. The example transfers production speed, total count, filling temperature, filling pressure, and machine running status. If the application later permits commands, add an explicit operator-confirmation step before sending any action to reduce the risk of unintended operation.
Resolve the Data-Block Layout Before Development
The PLC example creates a block named ProductionData with optimized access enabled. The C# example instead reads 30 bytes from DB1 and decodes fixed byte offsets. The evidence does not establish that ProductionData is DB1 or that its optimized layout matches those offsets. Treat the following as an intended interface map, not a verified deployed layout.
| Value | PLC type | Client decoder | Assumed location |
|---|---|---|---|
| Production speed | Real | GetRealAt |
Byte 0 |
| Total count | DInt | GetDIntAt |
Byte 4 |
| Temperature | Real | GetRealAt |
Byte 8 |
| Pressure | Real | GetRealAt |
Byte 12 |
| Machine status | Bool | GetBitAt |
Byte 16, bit 0 |
Before commissioning, verify the actual DB number, exported byte layout, data types, and client read length in the PLC project. The supplied client connects to 192.168.1.10 using rack 0 and slot 1, reads DB1 starting at byte 0, and requests 30 bytes. Replace or retain each value only after confirming it against the target PLC configuration.
Configure Data Transport and AR Rendering
- Update
ProductionDatafrom the speed sensor, bottle counter, temperature sensor, pressure sensor, and run/stop signal in the PLC program. - Connect the AR application through the industrial wireless network and read only the data required for the display.
- Decode each field using the verified interface map, then bind speed, count, temperature, pressure, and status to the AR user interface.
- Attach a clear recognition marker to each target machine and align the simplified 3D model or information panel with that marker.
Do not expose the PLC directly to the public internet. Place the connection behind a firewall or VPN. If display latency is excessive, inspect wireless network conditions and reduce the payload to necessary values; the source also identifies 5G as a transport option to evaluate. Strong electromagnetic interference can degrade Wi-Fi, so validate access-point placement at the actual machine.
Commission the Maintenance View
Compare every AR value with the corresponding live PLC value, including both states of the machine-status bit. Confirm that each marker opens data for the correct asset, observe update latency at the selected refresh interval, and check for failed reads or stale displays. Test recognition under the site's real lighting; if it is unstable, improve illumination, use clearer high-contrast markers, or evaluate multi-point positioning.
Select AR hardware with protection suitable for the site's dust and oil exposure. Pilot the design on one critical machine, initially using a tablet if appropriate, and gather operator feedback before expanding to headset-based or line-wide deployment. Train operators on recognition, navigation, stale-data handling, and any confirmation workflow.
FAQ
How often should an S7-1200 AR display read PLC data?
Start with a 0.5-to-1-second update interval. Verify display responsiveness and PLC impact, and transfer only the values needed by the AR view.
Why can the Sharp7 AR example read the wrong S7-1200 values?
The client assumes DB1 and fixed offsets at bytes 0, 4, 8, 12, and byte 16 bit 0, while the PLC example enables optimized access and does not confirm its DB number. Verify the actual DB number, layout, types, and 30-byte read range before using the code.
How do I reduce unstable AR recognition on a production line?
Improve local lighting and use clearer, higher-contrast equipment markers. If recognition remains unstable, evaluate multi-point positioning under actual plant conditions.