- Node.js 32-bit
- WinCC V7.5 and WinCC ODK RT
- WinCC Unified RT
- A fresh install of Node need to run command
npm install -g node-gyp
in cmd.exe - For rest of node model dependencies, type
npm install -s express..
to install the node modules whichpackage.json
listed.
The building process was done based on this tutorial:https://medium.com/jspoint/a-simple-guide-to-load-c-c-code-into-node-js-javascript-applications-3fcccf54fd32
The binding.gyp
file contains information about the sources, includes and libraries.
Please install 32-bit version of Node.js!
The building Process:
- Install the node-addon-api:
npm install -S node-addon-api
- Install node-gyp
npm install -g node-gyp
- Configure and build it:
node-gyp clean configure build
(this gives you the ODK.node Native Module)
if you got error message:gyp ERR! stack Error: EBUSY: resource busy or locked
,Please typenode-gyp configure build
instead,or close vscode and do step2 again in Windows cmd.
Test ODK functions form C++ to JavaScript:
- Open
index.js
, typenode index.js
in Terminal or Windows cmd to see whether ODK functions works in JavaScript or not.
Inindex.js
,ODK connetion,read,write and Subscribe functions can be tested one by one.
Before running the server, you needd to generate the certificates as it is explained in the documentation file inside the "docs" folder.
- Run Wincc ODK Runtime and make sure the tagnames of
Name
column inWinccTagConfiguration.xml
are all existed in WinCC. - type
node Server.js --southboundservice=classic --serverconfig=WinccTagConfiguration.xml --clientconfig=wincc2opcenter --log=verbose
in Terminal or Windows cmd to start up the Server connect to WinCC V7.5.
- Run Wincc Unified Runtime and make sure the tagnames of
Name
column inTagConfiguration.xml
are all existed in WinCC Unified. - type
node Server.js --southboundservice=unified --serverconfig=TagConfiguration.xml --clientconfig=unified2opcenter --log=verbose
in Terminal or Windows cmd to start up the Server connect to WinCC Unified.