tomcx / tame4

JS library for the access to a TwinCAT PLC. Current version V4.3.1 final.
GNU General Public License v3.0
44 stars 8 forks source link

TAME with angular2 #12

Closed sagishoffer closed 7 years ago

sagishoffer commented 7 years ago

Hello,

Thanks for a great library! My previous project built with Jquery. Today I have migrate the project to angular2 framework. There is a problem trying to read arrays or structs. I have followed your documentation but couldn't resolve the issue. Any idea what can be the problem?

tomcx commented 7 years ago

I don't know angular2. Can you provide more information? What exactly does not work?

sagishoffer commented 7 years ago

Apparently it was an angular scope issue, now it works fine. I have other problem now. When i'm trying to read an array of byte with 6 elements by using Plc.readArrayOfByte it works good but when i'm trying to read the same array inside Plc.sumReadReq it gives me only the first 2 elements. Any idea why?

tomcx commented 7 years ago

Not really. Do you use the TPY file?

sagishoffer commented 7 years ago

Actually i'm not sure what is TPY file, i'm using getHandles() method.

tomcx commented 7 years ago

I can't reproduce this behavior. Using handles I can read an array of bytes with a SumReadReq without any problems. Can you send me the code? Are there error messages?

sagishoffer commented 7 years ago

I have problems also with SumReadReq primitive types. I cant point exactly the problem but it wont work without declaring the type of each variable. Maybe its related to TypeScript that I use in the angular project. Thanks anyway!