about_AdsSymbolProvider

The AdsSymbolProvider is a PowerShell provider that binds TwinCAT target device symbolic information to a PSDrive.

SHORT DESCRIPTION

PowerShell provider for browsing TwinCAT target device symbols via ADS.

LONG DESCRIPTION

The AdsSymbolProvider is a PowerShell NavigationCmdletProvider that exposes the symbolic information (PLC variables, data types, system symbols) of a TwinCAT ADS server as a navigable PSDrive. Once a drive is created, standard PowerShell commands (Get-ChildItem, Set-Location, Get-ItemProperty) can be used to browse the symbol tree.

The provider also implements IPropertyCmdletProvider to allow reading symbol properties such as data type, size, and instance path.

DRIVE INITIALIZATION

Unlike the AdsFileProvider, the AdsSymbolProvider does not create default drives automatically. Drives must be created manually with New-PSDrive, specifying the target route and AMS port of the symbol server.

LIMITATIONS

The AdsSymbolProvider is prototypic and has known limitations:

to create a symbol drive manually. characters [ and ] clash with PowerShell wildcard syntax. PowerShell interprets these as character-range patterns, which breaks navigation into array sub-elements (e.g. MAIN.myArray[0]). Read-TcValue cmdlets over PSDrive navigation.

DYNAMIC PARAMETERS

When creating a new drive with New-PSDrive, the following dynamic parameters are available:

VISIBLE PORTS

The provider filters available ADS server ports to those commonly hosting symbol information:

STANDARD POWERSHELL CMDLETS

Once a PSDrive is created, the following standard PowerShell cmdlets work transparently with AdsSymbolProvider drives:

RELATED TCXAEMGMT CMDLETS

These cmdlets query symbol information directly via ADS sessions (without requiring a PSDrive) and offer additional features like recursive browsing and filtering:

PREREQUISITES

EXAMPLE

PS> New-PSDrive -Name CX_01234_Symbols -PSProvider AdsSymbolProvider -Address CX_01234 -Port 851 -Root ''
PS> cd CX_01234_Symbols:
PS> CX_01234_Symbols:> dir

Binds the target device symbolic information to a PSDrive. To register a symbol server as PSDrive type (here the Target Route 'CX_01234' with AmsPort: 851)

SEE ALSO