AmsNetIdLocal Property

Gets the Local Net ID (System service must be running)


Namespace: TwinCAT.Ads
Assembly: TwinCAT.Ads.Abstractions (in TwinCAT.Ads.Abstractions.dll) Version: 7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470

Syntax

C#

public static AmsNetId Local { get; }

Property Value

AmsNetId
The local AmsNetId

Exceptions

Exception

Condition

BadImageFormatException

Thrown when the image format of the PInvoke Dll TcAmsServer.dll is invalid.

Remarks

The LocalNetId will be determined in a sequence with theses priorities

  1. Host IConfiguration object. Access key is 'AmsRouter:NetId'
  2. Environment variables (AmsRouter:NetId, AmsNetId, LocalNetId variables)
  3. Via Tcp (Loopback) from Router if available
  4. From Registry (on Windows systems)

Reference

AmsNetId Class TwinCAT.Ads Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026