Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLC.foreach() doesn't work #95

Open
planetixin opened this issue Apr 5, 2022 · 1 comment
Open

PLC.foreach() doesn't work #95

planetixin opened this issue Apr 5, 2022 · 1 comment

Comments

@planetixin
Copy link

planetixin commented Apr 5, 2022

Current Behavior

function doesn't work inside PLC.foreach()

Expected Behavior

PLC.foreach() should work.

Possible Solution (Optional)

Context

const PLC = new Controller();
var number = 0;

PLC.connect('ip adress', 0).then(async () => {
PLC.forEach(tag =>{
number++;
});
console.log(number);

});

Steps to Reproduce (for bugs only)

Your Environment

  • Package version (Use npm list - e.g. 1.0.6):
  • Node Version (Use node --version - e.g. 9.8.0):
  • Operating System and version: windows 7
  • Controller Type (eg 1756-L83E/B):
  • Controller Firmware (eg 30.11):
@cmseaton42
Copy link
Owner

the forEach method is available for a TagGroup instance not on a Controller instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants