Get-AdsState

SYNOPSIS

Gets the Ads State of a TwinCAT Target.

SYNTAX

NetIdPort (Default)

Get-AdsState [[-NetId] <AmsNetId[]>] [[-Port] <Int32>] [-Quiet] [-StateOnly] [-Force] [-Timeout <Int32>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

AddressStr

Get-AdsState [[-Port] <Int32>] [[-Address] <String[]>] [-Quiet] [-StateOnly] [-Force] [-Timeout <Int32>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

Session

Get-AdsState [[-Port] <Int32>] -Session <ISession[]> [-Quiet] [-StateOnly] [-Force] [-Timeout <Int32>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

SessionId

Get-AdsState [[-Port] <Int32>] -SessionId <Int32[]> [-Quiet] [-StateOnly] [-Force] [-Timeout <Int32>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

Route

Get-AdsState [[-Port] <Int32>] [-InputObject] <IRoute[]> [-Quiet] [-StateOnly] [-Force] [-Timeout <Int32>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

This command let gets the ADS state of a TwinCAT target.

EXAMPLES

EXAMPLE 1

PS > Get-AdsState 1.2.3.4.5.6
            
            Name   State  OK   Time (ms) Address
            ----   -----  --   --------- -------
            WORK01 Config True 0         1.2.3.4.5.6

Gets the actual AdsState from the remote target with NetId 1.2.3.4.5.6.

EXAMPLE 2

PS> Get-AdsState
            
            Name   State  OK   Time (ms) Address
            ----   -----  --   --------- -------
            WORK01 Config True 0         1.2.3.4.5.6

Gets the actual AdsState from the Local system.

EXAMPLE 3

PS> Get-AdsState 1.2.3.4,CX_0130C7

Gets the AdsState of target system with IPAddress 1.2.3.4 and Route name 'CX_0130C7'.

EXAMPLE 4

PS> get-route | get-adsState
            
            Name      State  OK   Time (ms) Address
            ----      -----  --   --------- -------
            WORK01    Config True 0         1.2.3.4.5.6
            CX_0130C7 Config True 0         5.1.48.199.1.1

Get the current target state from all registered routes.

EXAMPLE 5

PS> get-adsroute | get-adsstate -port 10000 -stateOnly
            Invalid
            Config

Gets the AdsState information from all actual routes.

EXAMPLE 6

PS> get-adsroute | get-adsstate -port 10000 -quiet
            false
            true

Gets availability information from all actual routes.

PARAMETERS

-NetId

The Addresses of the target systems, where to get the AdsState.

Type: AmsNetId[]
Parameter Sets: NetIdPort
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port

The AmsPort of the target system.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: 10000
Accept pipeline input: False
Accept wildcard characters: False

-Address

The address(es) where to get the State.

This can be the RouteName, NetId, the HostName or the IPAddress.

Wildcards are permitted.

Type: String[]
Parameter Sets: AddressStr
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-Session

The Session to use for the Cmdlet.

Type: ISession[]
Parameter Sets: Session
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SessionId

Specifies the Session (with unique ID) to use for the Cmdlet.

Type: Int32[]
Parameter Sets: SessionId
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject

The target systems, where to get the AdsState from.

Type: IRoute[]
Parameter Sets: Route
Aliases: Destination,Route

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Quiet

The quiet mode

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-StateOnly

The StateOnly mode

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Force

Forced Mode

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Timeout

The communication ADS timeout in milliseconds.

A value of 0 disables the timeout.

A value \<= 0 sets the Default (5000 ms).

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: -1
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

TwinCAT.ISession[]

The Session to use for the Cmdlet.

TwinCAT.IRoute[]

The target systems, where to get the AdsState from.

OUTPUTS

NOTES