Get-TcVersion

SYNOPSIS

Get the TwinCAT Version of a target system.

SYNTAX

NetIdPort (Default)

Get-TcVersion [[-NetId] <AmsNetId[]>] [-Timeout <Int32>] [-Force]
 [<CommonParameters>]

Route

Get-TcVersion [-Timeout <Int32>] [-InputObject] <IRoute[]> [-Force]
 [<CommonParameters>]

AddressStr

Get-TcVersion [-Timeout <Int32>] [-Address] <String[]> [-Force]
 [<CommonParameters>]

Session

Get-TcVersion [-Timeout <Int32>] -Session <ISession[]> [-Force]
 [<CommonParameters>]

SessionId

Get-TcVersion [-Timeout <Int32>] -SessionId <Int32[]> [-Force]
 [<CommonParameters>]

DESCRIPTION

This Cmdlet gets the TwinCAT version of the specified target version and returns the version object.

EXAMPLES

Example 1

PS> Get-TcVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
3      1      4021   50

Get the TwinCAT version of the local system.

Example 2

PS> Get-AdsRoute | Get-TcVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
3      1      4021   50
3      1      4021   54

Get the TwinCAT version actual routes.

PARAMETERS

-NetId

The target address. Tab completion: Completes AmsNetId values from currently reachable routes on the local TwinCAT system. The net id.

Type: AmsNetId[]
Parameter Sets: NetIdPort
Aliases:

Required: False
Position: 1
Default value: None
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). The ADS communication timeout in milliseconds.

Type: Int32
Parameter Sets: (All)
Aliases:

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

-InputObject

The target routes where to determine the Version information. Tab completion: Completes route names from currently reachable ADS systems on the local TwinCAT system. The input object.

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

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

-Address

Addresses where to determine the Version information. The Addresses can consist of NetId, IPAddress or HostName. Wildcards are permitted. Tab completion: Completes route names from currently reachable ADS systems on the local TwinCAT system. The address.

Type: String[]
Parameter Sets: AddressStr
Aliases: Name

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

-Session

The Session to use for the Cmdlet. The address.

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. Tab completion: Completes IDs of active TwinCAT sessions (created with New-TcSession). The Session ID.

Type: Int32[]
Parameter Sets: SessionId
Aliases:

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

-Force

Forces reading the version. This flag bypasses the FailFastInterceptor to retry communication in every case. Force flag.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
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.IRoute[]

TwinCAT.ISession[]

OUTPUTS

NOTES