12-6 Using the Trio ActiveX Control
Connection Commands
Trio Motion Technology
SetHost
Description
Sets the ethernet host IP address, and must be called prior to opening an ether-
net connection. The HostAddress property can also be used for this function.
Syntax:
SetHost(host)
Parameters
Return Value:
None
Example
Rem Set up the Ethernet IP Address of the target Motion
Coordinator
TrioPC1.SetHost(“192.168.000.001”)
Rem Open a Synchronous connection
TrioPC_Status = TrioPC1.Open(2, 0)
frmMain.Refresh
GetConnectionType
Description
Gets the connection type of the current connection.
Syntax:
GetConnectionType()
Parameters
None
Return Value:
-1: No Connection, 0: USB, 1:N/A, 2: Ethernet, 3: PCI
Example
Rem Open a Synchronous connection
ConnectError = False
TrioPC_Status = TrioPC1.Open(0, 0)
ConnectionType = TrioPC1.GetConnectionType()
If ConnectionType <> 0 Then
ConnectError = True
frmMain.Refresh
VARIANT host:
host IP address (eg 192.168.0.250).