EasyManua.ls Logo

Trio Motion Coordinator MC216 - Connection Commands

Trio Motion Coordinator MC216
566 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
12-4 Using the Trio ActiveX Control
Connection Commands
Trio Motion Technology
Connection Commands
Open
Description
Initialises the connection between the TrioPC ActiveX control and the Motion
Coordinator.
The connection can be opened over a PCI, USB or Ethernet link, and can operate
in either a synchronous or asynchronous mode. In the synchronous mode all the
TrioBASIC methods are available. In the asynchronous mode these methods are
not available, instead the user must call SendData() to write to the Motion Coor-
dinator, and respond to the OnReceiveChannelx event by calling GetData() to
read data received from the Motion Coordinator. In this way the user application
can respond to asynchronous events which occur on the Motion Coordinator with-
out having to poll them.
If the user application requires the TrioBASIC methods then the synchronous
mode should be selected. However, if the prime role of the user application is to
respond to events triggered on the Motion Coordinator, then the asynchronous
method should be used.
Syntax:
Open(PortType, PortMode)
Parameters
Return Value:
TRUE
if the connection is successfully established. For a USB connection, this
means the TrioUSB driver is active (an MC with a USB card is on, and the USB con-
nections are correct). If a synchronous connection has been opened the ActiveX
control must have also successfully recovered the token list from the Motion
Coordinator. If the connection is not successfully established this method will
return
FALSE
.
Example
Rem Open a USB connection and refresh the TrioPC indicator
TrioPC_Status = TrioPC1.Open(0, 0)
frmMain.Refresh
short PortType:
0: USB, 1:N/A, 2:Ethernet, 3:PCI
short PortMode:
0: Synchronous Mode, 1:Asynchronous Mode, 3240:Syn-
chronous Mode (for Ethernet connections only).

Table of Contents

Related product manuals