Custom code (.NET C# script)
No system covers every requirement 100%, which is why a certain degree of flexibility is necessary. The Script Plug-in offers the possibility to design transfer objects and triggers yourself in OPC Router with little effort. Basic functionalities can be used directly in the script, but external .NET assemblies can also be connected as needed. Programming in the Script Plug-in works according to the low-code principle and can therefore be implemented without above-average programming skills. A detailed video on this topic can be found here in our tutorial stream.
Before turning to a script, check whether an existing transfer object can solve the task—the standard building blocks have been tested, are maintained with the product, and are supported by the support team. A script is the tool for the rest, not the more convenient first option.
Support Scope inray support assists with the Script Plug-in itself—integration, script API, and editor. Support cannot be provided for the content and behavior of custom scripts; these are the responsibility of the project, just as custom code is in any other environment.
An error in a script does not remain confined to that script: memory leaks and incompatible external dependencies affect the entire service, and a stack overflow in a script terminates the entire OPC Router. Avoid blocking calls such as Thread.Sleep—they tie up a worker thread, which is then unavailable to all flows. Consistently release occupied resources; see Releasing Resources (IDisposable).