Several TwinCAT 3 Usermode Runtimes on one system
Several TwinCAT 3 Usermode Runtimes can be started on one system.
The starting point for the scenario is copying the template from Program Files (x86) to ProgramData, as documented in File storage.
Some TwinCAT functions have concurrent processes that are configured via files in the 3.1/Target/StartManConfig folder.
The template directory under Program Files (x86) and the UMRT default directory are always kept up to date through the installation, uninstallation, or upgrade of packages from the TwinCAT Package Manager. Having multiple user-mode runtimes on a system requires the customer to define each user-mode runtime independently. This involves determining which processes should be started per instance — if necessary, by copying the files in the template folder. In particular, the documentation on the integration of TwinCAT Functions must be followed, as failure to do so may result, for example, in resource usage conflicts (multiple processes attempting to open a TCP port).
The following aspects must be taken into account:
- The AmsNetIds (command line parameter "-i") must be unique in an entire AMS network. This means that the TwinCAT 3 Usermode Runtimes must have different AmsNetIds.
- You must specify different configuration folders (using the "-c" command-line parameter). This is typically done by copying the template from Program Files (x86).
- It is not possible to connect several TwinCAT 3 Usermode Runtimes from one system to another external system, as the router on the external system cannot distinguish between the TwinCAT 3 Usermode Runtimes.
In such a scenario, ADS-over-MQTT with a broker as intermediary should be evaluated.