Instance configuration
Users can create multiple instances and assign the ideal processor to each of the created instance by using the KINGSTAR Control Panel. After creating the instances, you can select (use) a desired instance for KINGSTAR applications, including the Control Panel or the applications you created. Note that to use more than one instance, the Multiple Master Package is required.
To configure the instance settings:
- Click Start
> KINGSTAR Runtime > KINGSTAR Control Panel > Runtime Settings. On the left-side pane, click General Settings.
- To add an instance, in the KINGSTAR Runtime field, click the
icon, the Add Runtime Configuration dialog box appears. You can follow this step to add more instances.
- In the Instance input box, enter a value equal to or greater than one (1).
- In the Ideal processor list, select a CPU core number. Default is zero. It means the Subsystem may run on any core available to RTX64. The core number is based on the cores you have.
- Click OK. The instance configuration table will look like this.
-
NOTE: The number of the instance you can add is unlimited. However, to use (implement) more than one instance, you need to acquire the Multiple Master Package.
- After adding the instances, you can set up the Network Interface Card (NIC). Once the NIC is set up, the Network interface card column will show Assigned. To assign an NIC, please refer to Network Interface Cards.
NOTE: Starting from KINGSTAR 4.5, you can select an instance for the Control Panel during its launch. For KINGSTAR version prior to 4.5, instance selection has to be done through the config file. Please refer to Instance selection through config file.
If your system has the Multiple Master Package installed and the above instance settings have been pre-configured, when launching the KINGSTAR Control Panel, an Instance Selection window will pop-up for you to select an instance for the Control Panel. You can optionally create a shortcut on the desktop for this instance.
For example, if instance 1 is selected, the Control Panel will be launched with instance 1, which will be shown on the title bar. You can turn on/off the KINGSTAR Subsystem without interfering other instances.
NOTE: Instance 0's title bar doesn't show the instance number.
Turn off Real-Time Subsystem
When multiple instances are running, you can't turn off the Real-Time Subsystem. To turn it off:
- Close all of the Control Panels with instance other than 0. To do so, find the icons of the Control Panel with instance other than 0 on the Windows Notification Area. Right-click on each of the icon and click Exit. Do not close Instance 0's Control Panel.
- To turn off the Real-Time Subsystem, open the Instance 0's Control Panel, toggle-off the button of Real-Time Subsystem.
Instance selection through config file
For KINGSTAR version prior to 4.5, instance selection has to be done through the config file.
Instance is a parameter in the Create function that links a program to the KINGSTAR Subsystem. It is a KINGSTAR Runtime instance. In addition to using Create to set its value, you can configure it through KINGSTAR Control Panel.
To configure the parameter, browse to C:\Program Files\IntervalZero\KINGSTAR\bin\ControlPanelMain\
, find the file IntervalZero.KINGSTAR.ControlPanel.exe.config
, and open it with a text processing program, such as Notepad or Notepad++.
In the config
file, find this line of code:
<add key="KingStarInstance" value="0"/>
KingStarInstance: it's the counterpart of the Instance parameter in Create. This zero-based parameter determines which instance you want to use. The first instance is "Instance 0." If you have Multiple Master Package, you can have multiple instances running at the same time, such as Instance 1, Instance 2. Each instance can have their own settings of EtherCAT connection and KINGSTAR Subsystem, but only Instance 0 has the KINGSTAR PLC switch.
To configure the settings of an instance:
- Change its value to one or other number. The code will be like this:
- Click Start
> KINGSTAR Runtime > KINGSTAR Control Panel.
- A KINGSTAR Control Panel is created for Instance 1. The title bar shows the instance number. You can turn on or off KINGSTAR Subsystem without interfering other instances.
- In the Windows Notification Area, you'll see two KINGSTAR Control Panel icons there. One is Instance 0 and the other Instance 1 (move the mouse pointer over the icons to see their tooltips).
<add key="KingStarInstance" value="1"/>
NOTE: Instance 0's title bar doesn't show the instance number.
IMPORTANT: Remember to change the value back when you don't need instances.
See also