Giter Club home page Giter Club logo

Comments (6)

cmseaton42 avatar cmseaton42 commented on July 22, 2024

Can you provide more details surrounding the issue you are having? Code snippet, error screenshot, etc.

Thanks!

from node-ethernet-ip.

nuannuande avatar nuannuande commented on July 22, 2024

Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\Administrator>cd F:\PLCgate

C:\Users\Administrator>f:

F:\PLCgate>node dts.js
F:\PLCgate\node_modules\ethernet-ip\src\tag\index.js:15
if (!Tag.isValidTagname(tagname)) throw new Error("Tagname Must be of Ty
pe ");
^

Error: Tagname Must be of Type
at new Tag (F:\PLCgate\node_modules\ethernet-ip\src\tag\index.js:15:49)
at Object. (F:\PLCgate\dts.js:9:15)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3

PLC.subscribe(new Tag("VersaRoll.VRoll.I");

from node-ethernet-ip.

patrickjmcd avatar patrickjmcd commented on July 22, 2024

Can you post the entire contents of your dts.js file?

from node-ethernet-ip.

patrickjmcd avatar patrickjmcd commented on July 22, 2024

Also, please post the results of npm list and node --version. To make it more readable, you can format the results as code using backticks (the key to the left of the "1" key) like this:

```
code goes here
```

gets rendered as

code goes here

from node-ethernet-ip.

nuannuande avatar nuannuande commented on July 22, 2024
F:\PLCgate>node -v
v8.9.3
const { Controller, Tag ,TagGroup } = require("ethernet-ip");
const PLC = new Controller();
var postdata={data:{dName:"win7",dId:"win_7",iData:[]},gSN:"someserialnumber",accessToken:"fakedataaccesstoken"};
var postflag=0;
var idata=[];

PLC.subscribe(new Tag("VersaRoll.VRoll.I","S030")); // 
PLC.connect("178.18.10.21",0).then(() => {
    // Set Scan Rate of Subscription Group to 50 ms (defaults to 200 ms)
    PLC.scan_rate=50;//
    // Begin Scanning
    PLC.scan();
});
setInterval(()=>{
PLC.forEach(tag => {
 //if(!tag.value) tag.value=0;
 console.log(tag.value);
}); 
},100)


//setInterval(()=>{
// update_Data();
//},1000);
var http = require("http");
var querystring = require('querystring');

tag.js /RegExp cannot match tha tag name while the last only is one letter

from node-ethernet-ip.

cmseaton42 avatar cmseaton42 commented on July 22, 2024

@nuannuande, @patrickjmcd released a patch to help you with your issue, have you been able to test it?

you should be able to update to the latest version with npm update

We still have an issue when referencing a boolean via bit level specification that will be addressed at a later time (this is being tracked at #19).

from node-ethernet-ip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.