TcXaeMgmt Version 7.X | New-TcSession INPUTS TwinCAT.IRoute[] TwinCAT.ISession[] OUTPUTS NOTES 6.43 New-TcSession | New-TcSession SYNOPSIS Create a new session to a TwinCAT Target. SYNTAX NetIdPort (Default) New-TcSession [[-NetId] ] [-Port] [-Force] [ ] Route New-TcSession -InputObject [-Port] [-Force] [ ] AddressStr New-TcSession [-Provider ] [-Address] [[-Port] ] [-Force] [ ] DESCRIPTION Creates a new Point-To-Point Connection to a TwinCAT Target that is represented by the returned session object. Different types of Sessions can be accessed by the registered types of SessionProviders (e.g. ADS, MQTT, OPC).
If using ADS as protocol, this Cmdlet is equivalent to create and connect an ADSClient. The Address of the remote system is the AmsNetId and AmsPort.
EXAMPLES Example 1 PS> $route = Get-AdsRoute -Name "Tc3*" PS> $session = New-TcSession -Route $route -Port 851 PS> $session ID Address Connected State Cycles Losses LastError Established LastSuccee d -- ------- --------- ----- ------ ------ --------- ----------- ----------- 5 172.17.62.105.1.1:851 True Connected 0 0 2016-12-12T12:22:02 Establishes a new ADS Session/Connection to the specified route destination that has the name pattern "tc3*" via port 851 (PLC1) Example 2 PS> New-TcSession -NetId '172.17.62.105.1.1' -port 851 ID Address Connected State Cycles Losses LastError Established LastSuccee d -- ------- --------- ----- ------ ------ --------- ----------- TE1000 176 Version: 1.5.0