Files
UA-.NETStandard/samples/Machinery/MachineryClient
romanett f061c2d7da Merge Master to Release/2.0 (#4676)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Klaus Landsdorf <kl@iniationware.com>
Co-authored-by: Marc Schier <marcschier@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com>
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
2026-10-06 09:35:42 +00:00
..
2026-10-06 09:35:42 +00:00
2026-10-06 09:35:42 +00:00

MachineryClient

A console client for any OPC 40001 server. It starts at the Machines folder, so it needs no NodeIds configured and works against a server it has never seen.

dotnet run --project samples/Machinery/MachineryClient -- --insecure
Option Meaning
--url <endpoint> The endpoint to connect to (default opc.tcp://localhost:62546/MachineryServer)
--insecure Accept any server certificate. Demo only.
--seconds <n> How long to stream state transitions (default 12; 0 skips)
--no-download Skip the OPC 40001-101 result download

What it does

  1. Enumerates the machines below the Machines folder.
  2. Reads each machine's OPC 40001-1 identification and its components.
  3. Reads MachineryItemState and MachineryOperationMode.
  4. Asks ResultManagement.GetLatestResult for the newest result, downloads its payload through the OPC 40001-101 transfer path, and releases the result handle it was given.
  5. Streams MachineryItemState transitions for a while.

Every step degrades rather than failing when the server publishes less: a machine without a Monitoring add-in simply reports no state.