question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Changing PLC Scan Rate has no effect

See original GitHub issue

Changing PLC Scan rate has no effect. Tags are scanned as fast as possible

Current Behavior

Tags are scanned as fast as possible

Expected Behavior

Tags should be scanned every X ms

Possible Solution (Optional)

ethernet-ip\src\controller\index.js line 433 - should be “await delay(this.state.scan_rate);”

Your Environment

  • Package version (Use npm list - e.g. 1.0.6): ethernet-ip 1.1.1
  • Node Version (Use node --version - e.g. 9.8.0):
  • Operating System and version:
  • Controller Type (eg 1756-L83E/B):
  • Controller Firmware (eg 30.11):

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
MattCostcommented, Mar 27, 2018

Yup! Working as expected now.

1reaction
MattCostcommented, Mar 27, 2018

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);
	});
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to improve click PLC scan rate - AutomationDirect
I am building a click plc cpu c0-02dd1-d project which include one analog input module, 2 input module, 2 output module, rs232 serial ......
Read more >
pid update rate effect [Text] - PLCS.net - Interactive Q & A
That is correct. The problem with having it update at the Scan Time Rate, is you tune the PID, and it is working...
Read more >
Importance of PLC Scan Time in any Control System
When designing a PLC controlled system, one aspect that should not be overlooked is how the PLC scan time will affect your operation....
Read more >
PLC Scan Time - Instrumentation Tools
Suppose we have a PLC whose scan time is 5ms, and we need to assign an input for an encoder which generates a...
Read more >
Scan Classes not working - Inductive Automation Forum
The site I'm on has recently upgraded from 7.9.1 to 7.9.12 and it seems scan classes are now no longer having any effect....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found