Giter Club home page Giter Club logo

Comments (4)

herrJones avatar herrJones commented on August 20, 2024

from node-ads.

w570955342 avatar w570955342 commented on August 20, 2024

Thanks for your answer.
I did not use 0 and 1 instead of false and true.
var myHandle = [ {
symname: 'Main.c',
bytelength: ads.BOOL,
value: true
}]
or
var myHandle = [{
symname: 'Main.b',
bytelength: ads.INT,
value: 200
}]
is OK with multiWrite , but
var myHandle = [{
symname: 'Main.b',
bytelength: ads.INT,
value: 200
}, {
symname: 'Main.c',
bytelength: ads.BOOL,
value: true
}]
is not ok. Throw the error : parameter size not correct.

Did you try using 0 and 1 instead of false and true?JanOp 30 mei 2019 08:58 schreef w570955342 [email protected]:Hi @PLCHome , I was trying to use multiWrite to pass the array to the beckhoff machine. But when I pass the array I got an exception of 'parameter size not correct' Here is the handle that I pass through: var myHandle = [{ symname: 'Main.b', bytelength: ads.INT, value: 200 }, { symname: 'Main.c', bytelength: ads.BOOL, value: true }] Did I do something wrong?

from node-ads.

michal-kindl avatar michal-kindl commented on August 20, 2024

I also run into the same issue. And exactly as you write, with only single handle in the array it works, with more it always fails...

from node-ads.

CHoltschlag avatar CHoltschlag commented on August 20, 2024

Hello @ALL

there is a bug in the function multiWrite on line 384 to 386.
Change to the following code:
buf.writeUInt32LE(handle.indexGroup || ADSIGRP.RW_SYMVAL_BYHANDLE, index + 0)
buf.writeUInt32LE(handle.indexOffset || handle.symhandle,index + 4)
buf.writeUInt32LE(handle.totalByteLength,index + 8)

I hope this helps!

regards

from node-ads.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.