use multi read
heleon19 opened this issue · 4 comments
heleon19 commented
Hi
How can I use the multi read function? Tried to pass the handle as array, but didn't work.
Thank's for your advice.
Regards Heleon
roccomuso commented
Please paste the whole code
heleon19 commented
Connection is ok, read of single variable is ok.
Example of multi read:
var myHandles =[
{
symname: '.light.gp[0]',
bytelength: ads.INT,
},
{
symname: '.light.gp[1]',
bytelength: ads.INT,
}
];
var client = ads.connect(options, function() {
this.mulitRead(myHandles, function(err, handle) {
if (err) console.log(err)
console.log(handle.value)
});
});
roccomuso commented
Try to put this listeners to catch errors:
client.on('notification', function(handle){
console.log(handle)
})
client.on('error', function(error) {
console.log(error)
})
I'm investigating the issue.
PLCHome commented
@roccomuso it should work properly with 1.4.3