ServerInstance Property
Description
Specifies which instance of Epson RC+ server to use.
Syntax
Property ServerInstance As Integer
Default Value
The default value is the next available server instance.
Remarks
The API communicates with an RC+ server process. ServerInstance specifies which server to use. Each server instance corresponds with one controller and one project. By default, when you create a new Spel class instance, the ServerInstance is automatically set to 1.
Sometimes you may want multiple instances of the Spel class for the same Controller, such as for multithreading in your application. In that case, you must set the ServerInstance property to the same value for each Spel class instance using the same controller.
ServerInstance must be between 1 and 10 and it must be set before executing Initialize or any other methods.
See Also
CommandTask Property, Initialize Method
ServerInstance Example
VB Example:
' Controller 1
spel1 = New Spel
spel1.ServerInstance = 1
spel1.Initialize()
spel1.Connect(1)
' Controller 2
spel2 = New Spel
spel2.ServerInstance = 2
spel2.Initialize()
spel2.Connect(2)
C# Example:
// Controller 1
RCAPINet.Spel spel1 = new RCAPINet.Spel();
spel1.ServerInstance = 1;
spel1.Initialize();
spel1.Connect(1);
// Controller 2
RCAPINet.Spel spel2 = new RCAPINet.Spel();
spel2.ServerInstance = 2;
spel2.Initialize();
spel2.Connect(2);