st-one-io / node-opc-da Goto Github PK
View Code? Open in Web Editor NEWA Node library for OPC-DA communication.
License: Apache License 2.0
A Node library for OPC-DA communication.
License: Apache License 2.0
Getting following error while calling removeGroup()
(node:12728) UnhandledPromiseRejectionWarning: ReferenceError: name is not defined
at OPCServer.removeGroup (E:\Projects\opc-da-client \node_modules\node-opc-da\src\opcServer.js:327:37)
After commenting lines 327 and 344 in file - node_modules\node-opc-da\src\opcServer.js, this error got resolved.
Can you suggest how this issue can be resolved permanently as we are supposed to avoid modifying library stack.
When searching for the status of a group using the "getState()" function of "OPCGroupStateManager.js", an exception was generated for the "const types". After a superficial debug I found that the import of "types" was in lower case, different from what was exposed in lib "node-dcom" upper case. I changed the occurrences in the class "OPCGroupStateManager" and another error started to appear: "buf is not defined", this exception was generated when trying to call the function in:
let result = await this._comObj.call (callObject); // <= Line 101 of OPCGroupStateManager.js
:)
UnhandledPromiseRejectionWarning: TypeError: session.getStub is not a function
Hi.
Can you provide a sample code in order to write varible to OPC Server?
Hi.
removeGroup function is throwing an error because of the "name" parameter is not defined. Please check the code again.
async removeGroup(handle, force) {
debug("Removing group \"" + name + "\"...");
When I try to use the function "getGroupByName (name)" it returns an error. After a superficial debug I found that "resultObj.getResults ()" returns two _type and _obj objects, the initialization must be done in _obj.
let result = resultObj.getResults();
if (hresult != 0) {
if (result.lenght == 0)
throw new Error(String(hresult));
else
debug(new Error(String(hresult)));
}
let group = new OPCGroupStateManager();
await group.init(result[0]._obj); // <= here line 257 of "opcServer.js"
debug("Successfully get request for group \"" + name +"\".");
return group;
}
After that, the error will no longer occur and degug.log returns us: Successfully get request for group "XYZ_Test".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.