Starting and Stopping the PLC and other ADS Servers
Start the PLC on the local system
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
The ‘X’ indicates the success.
Start the PLC on all registered routes
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. The ‘X’ indicates the success.
Restart the TwinCAT System Service
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. This is an alternative to the ‘Restart-TwinCAT’ Cmdlet.