External Interfaces/API    

Additional Automation Server Information

Launching the MATLAB Server

For MATLAB to act as an Automation server, it must be started with the /Automation command line argument. Microsoft Windows does this automatically when a COM connection is established by a controller. However, if MATLAB is already running and was launched without this parameter, any request by an Automation controller to connect to MATLAB as a server will cause Windows to launch another instance of MATLAB with the /Automation parameter. This protects controllers from interfering with any interactive MATLAB sessions that may be running.

Specifying a Shared or Dedicated Server

You can launch 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 Program ID (ProgID) used by the client to launch MATLAB. 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).

To specify a dedicated server, use the ProgID, Matlab.Application.Single, (or the version-specific ProgID, Matlab.Application.Single.N). The term Single refers to the number of clients that may connect to this server.

Once MATLAB is launched as a shared server, all clients that request a connection to MATLAB by using the shared server ProgID will 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.

Each client that requests a connection to MATLAB using a dedicated ProgID will cause a separate instance of MATLAB to be launched, 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.


  MATLAB Automation Properties Using MATLAB as a DCOM Server