Open planetixin opened 2 years ago
function doesn't work inside PLC.foreach()
PLC.foreach() should work.
const PLC = new Controller(); var number = 0;
PLC.connect('ip adress', 0).then(async () => { PLC.forEach(tag =>{ number++; }); console.log(number);
});
1. 2. 3. 4.
npm list
node --version
the forEach method is available for a TagGroup instance not on a Controller instance.
forEach
TagGroup
Controller
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)
1. 2. 3. 4.
Your Environment
npm list
- e.g. 1.0.6):node --version
- e.g. 9.8.0):