WinCC OA JavaScript Manager for Node.js
The WinCC OA JavaScript Manager for Node.js is a manager that allows for the integration of the TypeScript/JavaScript runtime environment Node.js® into WinCC OA.
With CONTROL, WinCC OA already offers a high-performance scripting language. Nevertheless, open alternatives based on well-known programming languages are in high demand. WinCC OA therefore provides a TypeScript/JavaScript manager based on Node.js®, which enables the use of libraries from the Node.js® environment.
![](../images/nodejs_1.png)
Advantages
- TypeScript/JavaScript (referred to as TS/JS in the following documentation) are among the most widely used programming languages. Integration in WinCC OA makes it much easier for you to find suitable developers.
- The use of new technologies offers several advantages. For example, you can use the npm package manager to access the entire Node.js® ecosystem with around 2 million existing libraries
- The wide range of use cases, such as creating business logic on WinCC OA side, the ability to read data from WinCC OA to visualize metrics via open source tools such as Prometheus or Grafana, importing data from third-party web-based sources, and much more.
Architecture
![](../images/nodejs_2.png)
Node.js is a cross-platform, open-source JavaScript runtime environment that can run on Windows, Linux, Unix, macOS, and more. Node.js runs on the V8 JavaScript engine, and executes JavaScript code outside a web browser. Source: Node.js (Wikipedia)
npm
npm is the default package manager for the JavaScript runtime environment Node.js and is included as a recommended feature in the Node.js installer. Source: npm (Wikipedia)
Node.js® Add-onA dynamically linked library that connects to Node.js® as well as the WinCC OA libraries. The WinCC OA JavaScript Manager for Node.js loads these libraries and acts as the interface between them. The add-on is started within the Node.js® runtime environment and connects to EVENT and DATA like any other WinCC OA manager.
Startup procedure of the WinCC OA JavaScript Manager for Node.js
Getting started with Node.js®
To get your first Node.js® project going, first read and execute the steps in the chapters Requirements and Installation of Node.js®. Then start your development project following the steps of Node.js® TypeScript Module Example Implementation or Node.js® JavaScript Module Example Implementation (depending on whether you want to use TypeScript or JavaScript). Finally take a look at the chapter Basic Configuration of the Node.js® Interface.
Range of functions
A certain range of functions is available. A complete overview can be found in the winccoa-manager chapter. It is planned to extend this scope with future updates or version releases.