Set-AmsNetId
SYNOPSIS
Sets the AmsNetId of a device.
SYNTAX
NetId (Default)
Set-AmsNetId [[-Target] <AmsNetId>] [-NewId] <AmsNetId> [-Timeout <Int32>] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>]
Route
Set-AmsNetId [-NewId] <AmsNetId> [-InputObject] <IRoute> [-Timeout <Int32>] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>]
AddressStr
Set-AmsNetId [-NewId] <AmsNetId> [-Address] <String> [-Timeout <Int32>] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>]
Session
Set-AmsNetId [-NewId] <AmsNetId> -Session <ISession> [-Timeout <Int32>] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>]
SessionId
Set-AmsNetId [-NewId] <AmsNetId> -SessionId <Int32> [-Timeout <Int32>] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
This Cmdlet configurates the AmsNetId (TargetNetId) of a device. A reboot is necessary after configuration (e.g. with 'Restart-AdsComputer') To contact the target system, it must be available as actual route. All actual connections to that systems via ADS are not valid anymore after calling this Cmdlet.
EXAMPLES
Example 1
PS> Set-AmsNetId -NewId 1.1.1.1.1.1
Changeing AmsNetId of target system.
Change the NetId of system '192.168.0.2.1.1' to '1.1.1.1.1.1'
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
Changing the NetId of system '192.168.0.2.1.1' to '1.1.1.1.1.1' is succeeded. All preexisting connections to this system a invalid now. A reboot of this system is necessary!
Sets the AmsNetId of the Local system to '1.1.1.1.1.1'.
PARAMETERS
-Target
NetId of the target system. Tab completion: Completes AmsNetId values from currently reachable routes on the local TwinCAT system. The net id.
Type: AmsNetId
Parameter Sets: NetId
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-NewId
The New NetId. Tab completion: Completes AmsNetId values from currently reachable routes on the local TwinCAT system. The net id.
Type: AmsNetId
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-InputObject
The route object where to set the CPUs. This parameter support pipelining. 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
Target names/addresses where to configure the CPU. 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 where to configure the CPU (supports pipeline) 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) where to configure the CPU Core settings. 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: -1
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
-Force
Forces this command. It suppresses the ShouldContinue settings and 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
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
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.