jisotalo / ads-client

Unofficial Node.js ADS library for connecting to Beckhoff TwinCAT automation systems using ADS protocol.
https://jisotalo.fi/ads-client/
MIT License
80 stars 17 forks source link

exported code of matlab has type MatSim.DINT #107

Closed JarmoCluyse closed 10 months ago

JarmoCluyse commented 1 year ago

the interface communicates with matlab/simulink generated code. We never had an issue before, with the new code generator if we generate a int32 it changes to this type and the package crashes with this error:

\node_modules\ads-client\src\ads-client-ads.js:956 throw new Error(Error: Base type ${name} not found from BaseDataTypes - If this should be found, report an issue)

Error: Error: Base type MatSim.DINT not found from BaseDataTypes - If this should be found, report an issue

jisotalo commented 1 year ago

Hi @JarmoCluyse!

I had somehow missed this issue, sorry.

Could you elaborate more? Any code example? It seems that instead of the basic type DINT the Simulink code is using MatSim.DINT or something. I have never used the converter myself.

JarmoCluyse commented 1 year ago

This is indeed what happens, The type DINT get's replaced by the type MatSim.DINT the problem is I only write the tooling and I don't have the matlab licence

jisotalo commented 1 year ago

Could you provide an example of the matlab-generated PLC code?

JarmoCluyse commented 10 months ago

Hi, we eventually found the issue, it was a bug in the matlab compiler, this has been fixed in newer versions

jisotalo commented 10 months ago

Thank you for confirmation, that's good!