Motion Coordinator Technical Reference Manual
Using the Trio ActiveX Control 12-5
Connection Commands
Close
Description
Closes the connection between the TrioPC ActiveX control and the Motion Coordi-
nator
Syntax:
Close(PortMode)
Parameters
Return Value:
None
.
Example
Rem Close the connection when form unloads
Private Sub Form_Unload(Cancel As Integer)
TrioPC1.Close(0)
frmMain.Refresh
End Sub
IsOpen
Description
Returns the state of the connection between the TrioPC ActiveX control and the
Motion Coordinator
Syntax:
IsOpen(PortMode)
Parameters
Return Value:
TRUE if port is open, FALSE if it is closed
.
Example
Rem Close the connection when form unloads
Private Sub Form_Unload(Cancel As Integer)
If TrioPC1.IsOpen(0) Then
TrioPC1.Close(0)
End If
frmMain.Refresh
End Sub
short PortMode:
-1: all ports, 0: synchronous port, >1: asynchronous port
short PortMode:
-1: all ports, 0: synchronous port, >1: asynchronous port