Giter Club home page Giter Club logo

node-drivers's People

Contributors

dependabot[bot] avatar jakesjews avatar jmmoser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-drivers's Issues

Examples saying "TCP is not a constructor"

I tried running these two examples:

README

const { TCP, CIP } = require('node-drivers');

const tcpLayer = new TCP('1.2.3.4');
const logix5000 = new CIP.Logix5000(tcpLayer);

console.log(await logix5000.readTag('tagname'));

Logix5000

  
const { TCP, CIP } = require('node-drivers');

const tcpLayer = new TCP({ host: '1.2.3.4', port: 44818 });
const logix5000 = new CIP.Logix5000(tcpLayer);

(async () => {
  try {
    console.log(await logix5000.readTag('R03:9:I.Ch1Data'));
  } catch(err) {
    console.log(err);
  }

  await tcpLayer.close();
})();

And both examples when I run node script.js I get this error:

const tcpLayer = new TCP({ host: '192.168.1.100', port: 44818 });
                 ^

TypeError: TCP is not a constructor

Node version: 10.9.0.

Can not seem to use Float read or write functionality

code

const { Layers } = require('node-drivers');
const tcpLayer = new Layers.TCP({ host: '192.168.0.230', port: 44818 });
const eipLayer = new Layers.EIP(tcpLayer);
const cipPCCCLayer = new Layers.CIP.PCCC(eipLayer);
const pccc = new Layers.PCCC(cipPCCCLayer);

pccc.typedWrite('F8:1', 0, (err)=> { if (err)console.log(err);})
pccc.typedRead( 'F8:1', (err, value)=> {
if (err)
console.log(err);
else console.log(value);
})

return this
$ node test1.js
{ message: 'Invalid parameter or invalid data',
info:
PCCCPacket {
command: 79,
transaction: 1,
data: ,
status:
{ code: 240,
extended: [Object],
description: 'Remote: Error code in the EXT STS byte' } } }
2.2779507836064226e-41

Note:
F8:1 has a value 1.00000
F8:2 has a value 2.00000

Any help please ?
Thanks,
Gary


AB Micrologix

Hello everybody

Somebody know if its works in micrologix?

Regards

Cannot run examples on README.md

Hi,
I've tried running the example below after installing node-drivers:
"Read/Write a tag from a PLC-5, SLC 5/03, or SLC 5/04 processor using PCCC embedded in CIP:"
However, I keep getting the following error:

console.log(await pccc.typedWrite('N10:47', 1000));
^^^^^

SyntaxError: missing ) after argument list
at wrapSafe (internal/modules/cjs/loader.js:1001:16)
at Module._compile (internal/modules/cjs/loader.js:1049:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47

anyone have come across this issue?

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.