TcXaeMgmt Version 7.X | Set-AdsState Session Set-AdsState [-Command] -Session [-Quiet] [-Force] [-StateOnly] [-Timeout ] [-WaitTimeout ] [-PollingRate ] [-ThrowError] [-NoReinit] [- Reinitialize] [-NoWait] [-WhatIf] [-Confirm] [ ] SessionId Set-AdsState [-Command] -SessionId [-Quiet] [-Force] [-StateOnly] [-Timeout ] [-WaitTimeout ] [-PollingRate ] [-ThrowError] [-NoReinit] [- Reinitialize] [-NoWait] [-WhatIf] [-Confirm] [ ] DESCRIPTION This Cmdlet sets the ADS State of the specified TwinCAT Targets/AdsServers (E.g. Start / Stop / Config / Reconfig/ Reset) For setting the SystemService (Port 10000) please see also the 'Restart-TwinCAT' Cmdlet, which is optimized for that case.
EXAMPLES Example 1 PS> Set-AdsState -port 851 -command Run -force Ok Target NetId Port ErrorCode Requested Original Reached Latency (ms) -- ------ ----- ---- --------- --------- -------- ------- ------------ X CX-11111 1.1.1.1.1.1 851 NoError Run Stop Run 293 Sets the Local PLC on port 851 to RUN. The 'X' in the 'Ok' Column indicates the success.
Example 2 PS> Set-AdsState -port 10000 -command Reset -force Ok Target NetId Port ErrorCode Requested Original Reached Latency(ms) -- ------ ----- ---- --------- --------- -------- ------- ------------ X MySystem 172.168.0.1.1.1 10000 NoError Reset Run Run 5007 Restart the local System Service Example 3 PS> $r = get-AdsRoute PS> Set-AdsState -port 851 -command Run -InputObject $r -force Ok Target NetId Port ErrorCode Requested Original Reached Latency (ms) -- ------ ----- ---- --------- --------- -------- ------- ------------ X CX-11111 1.1.1.1.1.1 851 NoError Run Stop Run 293 X CX-22222 1.1.1.2.1.1 851 NoError Run Stop Run 357 X CX-22222 1.1.1.3.1.1 851 NoError Run Stop Run 218 X CX-22222 1.1.1.4.1.1 851 NoError Run Stop Run 324 Start the PLC on all registered target systems.
PARAMETERS -Command The state command. The state. Possible values: None, Reset, Start, Stop, Reconfig, Run Type: AdsStateCommand Parameter Sets: (All) Aliases: Accepted values: None, Reset, Start, Stop, Reconfig, Run TE1000 210 Version: 1.5.0