ConnectTo
Opens a communication channel between the object and an ADS device (PLC, NC, ...).
object.ConnectTo(
sAmsNetId As String,
nPort As Long
)
Parameters
sAmsNetId | AdsAmsNetId. |
nPort | Port number. |
Return value
-
Description
The first parameter contains the six-figure AdsAmsNetId. The individual values are separated from one another by a dot. If an empty string is passed, the local AdsAmsNetId is used.
If a communication channel was already open before the call to ConnectTo(), it is automatically closed. The communication channel is also closed if the object is deleted.