node-ethernet-ip
node-ethernet-ip copied to clipboard
PLC.foreach() doesn't work
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):
the forEach
method is available for a TagGroup
instance not on a Controller
instance.