Weâre excited to announce that OPC UA integration is now easier than ever with InDriver! đ
Whether youâre working with SCADA, PLCs, or industrial automation systems, InDriver makes browsing, reading, and writing OPC UA nodes effortless. All you need is just a few lines of JavaScript code to get started.
đ Quick Start with KepServerEX Integration
Hereâs how simple it is to establish a connection with an OPC UA server like KepServerEX:
OPCUAClientApi.connect("KepServer", {
"EndpointUrl": "opc.tcp://127.0.0.1:49320",
"Timeout": 5000,
"UserTokenPolicy": {
"Name": "user1",
"Password": "pass1"
}
});
⥠Automate with InDriver Scripts
To make it even smoother, hereâs an example of how to integrate OPC UA into your InDriver tasks:
onStartup Script:

InDriver.import('OPCUAClientApi');
InDriver.installHook(10000); // Hook runs every 10 seconds
OPCUAClientApi.connect("KepServer", {
"EndpointUrl": "opc.tcp://127.0.0.1:49320",
"Timeout": 5000,
"UserTokenPolicy": { "Name": "user1", "Password": "pass1" }
});
InDriver.debug(OPCUAClientApi.browse("KepServer", '', '', 1000), "", false);
This script establishes a connection and browses OPC UA nodes in real-time.
Reading Data Every 10 Seconds:
OPCUAClientApi.readMultipleNodes("KepServer", [
{ "NodeId": "ns=2;s=Channel2.Device1.sine" }
]);
Here, the node Channel2.Device1.sine is read every 10 seconds, providing continuous real-time data.
onHook Script:

let ts = InDriver.hookTs();
InDriver.debug(OPCUAClientApi.readMultipleNodes('KepServer', [
{ "NodeId": "ns=2;s=Channel2.Device1.sine" }
]));
đ Result of readMultipleNodes
When reading data, the result is returned in a JSON format (array) like this:
[
{ "NodeId": "ns=2;s=Channel2.Device1.sine", "Value": 0 }
]
This simple structure makes it easy to process real-time data from your OPC UA server within InDriver.
đĄ Why Itâs Exciting?
Fast and Easy Integration with minimal code
Real-Time Data Processing for smart decision-making
Flexible Automation for industrial environments
Would you be ready to transform your industrial data operations? Visit inanalytics.io to learn more about InDriver! đ
Comments