Giter Club home page Giter Club logo

Comments (6)

MattCost avatar MattCost commented on July 22, 2024 2

Yup! Working as expected now.

from node-ethernet-ip.

MattCost avatar MattCost commented on July 22, 2024 1

https://github.com/cmseaton42/node-ethernet-ip/blob/master/src/controller/index.js
That version doesn't have the await

const { Controller, Tag } = require("ethernet-ip");

const PLC = new Controller();

// Add some tags to group
PLC.subscribe(new Tag("TestRead")); // Controller Scope Tag

PLC.connect("10.115.45.52", 0).then(() => {
	console.log("Connected to PLC!");
	console.log(PLC.properties);
 
	PLC.scan_rate = 1500;
	
	// Begin Scanning
	PLC.scan();
});

// Catch the Tag "Changed" and "Initialized" Events
PLC.forEach(tag => {
	// Called on the First Successful Read from the Controller
	tag.on("Initialized", tag => {
		console.log("Initialized", tag.value);
	});

	// Called if Tag.controller_value changes
	tag.on("Changed", (tag, oldValue) => {
		console.log("Changed:", tag.value);
	});
});

from node-ethernet-ip.

cmseaton42 avatar cmseaton42 commented on July 22, 2024

Hmmm, the master branch shows line 433 as what you are recommending already. Can you add your code so I can get a look at what you are doing?

from node-ethernet-ip.

cmseaton42 avatar cmseaton42 commented on July 22, 2024

Ahhhh, good catch. Patching now.

from node-ethernet-ip.

cmseaton42 avatar cmseaton42 commented on July 22, 2024

@MattCost v1.1.2 should resolve the issue. Let me know if everything seems to be working when you upgrade.

from node-ethernet-ip.

cmseaton42 avatar cmseaton42 commented on July 22, 2024

Sweet, Thanks for the heads up!

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.