What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a Siemens S7-1500, a C# application can monitor PLC values through OPC UA subscriptions instead of repeatedly polling the same tags. It can also read a complete structure or UDT when the server exposes that structured value and the client has a compatible type mapping. These approaches are not interchangeable defaults: choose subscriptions or polling based on how the application consumes data, and choose whole-structure or field-level reads based on payload and type-management needs.

How OPC UA notifications work

An OPC UA subscription lets a client ask the server to monitor selected values and publish notifications periodically. This is an alternative to cyclic polling, in which the client repeatedly requests values whether or not they changed. The OPC Foundation describes subscriptions as server-side notification endpoints delivered through Publish service requests. Siemens describes them as a way to monitor changes while managing OPC UA communication load through interval settings.

Two timing controls matter:

  • Sampling interval: how often the server samples a monitored value.
  • Publishing interval: how often the server publishes queued notifications to the client.

The server may enforce minimum intervals, and system load affects what configuration is practical. A requested interval is not a guaranteed end-to-end response time: a value can be sampled, queued, and delivered on a later publish cycle.

Set up a C# subscription

The general workflow is to establish a session, identify the OPC UA node IDs, create a subscription and monitored items, then process data-change notifications. Siemens’ S7-1500 C# example supports the subscription and monitored-item service sets; consult its instructions and the API documentation for the specific client-library version you use. Exact .NET APIs can change between package versions, so avoid copying code written for a different release.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
PLC HMI All in One Integrated Programmable Logic Controller, 2.8 Inch Touch Screen TFT LCD Display with 7 Input 5 Relay Output, 4 Transistor Output for 2 High-Speed Pulse 100KHz and Direction
  • -- PLC Type: Fully compatible with FX1S, 7 Input 5 Relay Output (24V pulse single). Have additional 4 Transistor Output: 2 for high speed pulse 100KHz & 2 for direction, can drive 2 servos or 2 steppers with pulse
  • -- PLC software: Use GX Workers 2 or Developer (pls download from GX Workers 2 website, we only have Chinese version), support Command + T Ladder Diagram + SFC for programming
  • -- HMI Software: YKBuilder V5.3/7.0 (Pls contact us, we will share it and the video instruction and guidelines). For HMI model: pls choose FE Serial, 280D
  • -- Use the same Cable for download program from PC to PLC/HMI: Use the: mini port – USB cable, pls install HMI & PLC’s USB driver first, which we will share.
  1. Connect: establish the OPC UA connection and session using the endpoint and security configuration for the PLC server.
  2. Select nodes: identify the node IDs of the tags the application actually needs to monitor.
  3. Create monitored items: add those nodes to a subscription and configure sampling and publishing settings appropriate to the target server.
  4. Handle changes: process each data-change notification, including its value and status information, before using it in application logic.
  5. Clean up: delete or dispose of monitored items and subscriptions when the monitored set changes or the application shuts down.

Plan lifecycle handling alongside the callback logic. A subscription is a server-managed resource, not just a local event handler; applications should account for session loss and reconnect behavior using the mechanisms provided by their chosen OPC UA library.

Polling or subscribing: which should you use?

Decision factor Polling Subscription
When it fits The application needs regular reads or has a simple, bounded set of values. The application primarily needs to know when monitored values change.
Communication pattern The client repeatedly requests values, including when values have not changed. The client configures monitored items and the server periodically publishes notifications.
Load considerations Repeated requests can add client/server communication work. Subscriptions can reduce unnecessary repeated reads, but server minimum intervals and system load constrain configuration.
Application complexity Straightforward read scheduling and result handling. Requires subscription and monitored-item lifecycle management, plus notification and reconnect handling.
Data need Useful when the application needs scheduled samples, including values that may not have changed. Useful when the application is interested in changes rather than repeatedly requesting the same value.

Neither method has a universal performance winner. Confirm the behavior under the target CPU, firmware, OPC UA configuration, and client library. Do not treat a configured interval as a guaranteed latency or assume a particular tag volume will always be safe.

Read a complete structure or UDT

A whole-structure read is possible when the OPC UA server exposes the value as a structure or UDT and the client can interpret its type. Siemens’ S7-1500 .NET client example provides a dedicated “Read/Write Struct/UDT” workflow: browse to a node whose type definition indicates a structure or UDT, copy its NodeId, and read it through that view.

Reading a structure may reduce the number of separate client requests in designs that otherwise fetch many fields independently. It also transfers the structured value as a unit, which may mean a larger payload than reading only the fields the application needs. The cited Siemens documentation establishes the workflow and mapping requirements, not a general performance benchmark or universal maximum tag count.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
3.8 Inch PLC HMI All in One Integrated Programmable Logic Controller, 10 Input 7 Relay Output, Built-in Analog 2AD & 2DA, 2NTC10K, 2 High-Speed Pulse 100KHz for Sevor or Stepper (17MR-FE380-FX-B)
  • -- PLC Type: Fully compatible with FX1S, 10 Transistor Input (NPN Type), 7 Relay Output. Have additional 4 Transistor Output: 2 for high speed pulse 100KHz & 2 for direction, can drive 2 servos or 2 steppers with pulse, built-in 2AD(0-10V) and 2DA(0-10V), also 2 NTC10K B3435 probe. Just read the address of AD DA NTC's will ok, 2 high speed input 100KHz X0 X1 to control encoder
  • -- PLC software: Use GX Workers 2 or Developer (pls download from GX Workers 2 website, we only have Chinese version), support Command + T Ladder Diagram + SFC for programming
  • -- HMI Software: YKBuilder V5.3 and Choose FE serial 380 model in HMI software. (Pls contact us, we will share it and the video instruction and guidelines), very easy to use, just create the buttun and set the address
  • -- Use the same Cable for download program from PC to PLC/HMI: Use the: mini port – USB cable, pls install HMI & PLC’s USB driver first, which we will share.

Choose between field-level and whole-structure reads

Consideration Individual fields Whole structure
Request overhead May require separate requests for multiple values, depending on the client design. Can reduce the number of separate client requests in some designs.
Data transferred Can limit reads to fields the application needs. Transfers the structured value, including fields the application may not use.
Type and mapping work Requires handling the individual values and their types. Requires compatible structure/type information on both the server and client.
Schema changes Changes to fields can affect the relevant reads and application logic. Changes to structure layout or types can invalidate the client mapping.

Use a whole-structure read when the application needs the grouped data and you can validate the mapping. Prefer field-level reads when only a small subset is required or when the client cannot safely represent the server’s structure.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Validate the Siemens structure mapping

Siemens warns that structure access depends on supported OPC UA structure handling and compatible mapping between the client’s expected structure and the server’s node set. The documented client performs limited structural checks, so a mismatch may not be caught at compile time or runtime. A matching structure name alone is not proof that the mapping is correct.

Rank #4
3.8 Inch PLC HMI All in One Integrated Programmable Logic Controller, 10 Input 7 Relay Output, 2 High-Speed Pulse 100KHz for Sevor or Stepper, 2 Input 100KHz for Encoder (17MR-FE380-FX-A)
  • -- PLC Type: Fully compatible with FX1S, 10 Input 7 Relay Output (5V pulse single). Have additional 4 Transistor Output: 2 for high speed pulse 100KHz & 2 for direction, can drive 2 servos or 2 steppers with pulse; have 2 high speed input 100KHz X0 X1 to control encoder also
  • -- PLC software: Use GX Workers 2 or Developer (pls download from GX Workers 2 website, we only have Chinese version), support Command + T Ladder Diagram + SFC for programming
  • -- HMI Software: YKBuilder (Pls dowload from link or contact us, we will share it and the video instruction and guidelines), very easy to use, just create the buttun and set the address
  • -- Use the same Cable for download program from PC to PLC/HMI: Use the: mini port – USB cable, pls install HMI & PLC’s USB driver first, which we shared from link
  • Compare field ordering and assigned data types between the PLC structure and the C# representation.
  • Check the OPC UA server’s type definition and the node set exposed by the target configuration.
  • Verify compatibility for the exact PLC, firmware, STEP 7, and client-library versions in use.
  • Test reads against representative values, including boundary or distinctive field values, so a shifted or misinterpreted mapping is visible.

Siemens documentation and example

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.