External Interfaces Previous page   Next Page

Additional Automation Server Information

This section covers several other topics related to Automation servers:

Creating the Server Manually

The Automation server is created automatically by Windows when a controller application first establishes a server connection. Alternatively, you may choose to create the server manually, prior to starting any of the client processes.

To do this, use the /Automation switch in the MATLAB startup command:

  1. Right-click the MATLAB shortcut icon and select Properties from the context menu. The Properties dialog box for matlab.exe opens to the Shortcut panel.
  2. In the Target field, after the target path for matlab.exe, add /Automation.

Specifying a Shared or Dedicated Server

You can start the MATLAB Automation server in one of two modes -- shared or dedicated. A dedicated server is dedicated to a single client; a shared server is shared by multiple clients. The mode is determined by the programmatic identifier (ProgID) used by the client to start MATLAB.

Starting a Shared Server

The ProgID, matlab.application, specifies the default mode, which is shared. You can also use the version-specific ProgID, matlab.application.N, where N is equal to the major version of MATLAB you are running, (for example, N = 6 for MATLAB 6.5).

Once MATLAB is started as a shared server, all clients that request a connection to MATLAB by using the shared server ProgID connect to the already running instance of MATLAB. In other words, there is never more than one instance of a shared server running, since it is shared by all clients that use the ProgID that specifies a shared server.

Starting a Dedicated Server

To specify a dedicated server, use the ProgID, matlab.application.single, (or the version-specific ProgID, matlab.application.single.N).

Each client that requests a connection to MATLAB using a dedicated ProgID creates a separate instance of MATLAB, and that server will not be shared with any other client. Therefore, there can be several instances of a dedicated server running simultaneously, since the dedicated server is not shared by multiple clients.

Using MATLAB as a DCOM Server

Distributed Component Object Model (DCOM) is a protocol that allows COM connections to be established over a network. If you are using a version of Windows that supports DCOM (Windows NT 4.0 at the time of this writing) and a controller that supports DCOM, you can use the controller to start a MATLAB server on a remote machine.

To do this, DCOM must be configured properly, and MATLAB must be installed on each machine that is used as a client or server. (Even though the client machine may not be running MATLAB in such a configuration, the client machine must have a MATLAB installation because certain MATLAB components are required to establish the remote connection.) Consult the DCOM documentation for how to configure DCOM for your environment.


Previous page  MATLAB Automation Properties Dynamic Data Exchange (DDE) Next page

© 1994-2005 The MathWorks, Inc.