fbarresi / BeckhoffJsonReadWriter

Read and write json file from a Beckhoff PLC
MIT License
23 stars 4 forks source link

No Read/Write #3

Closed adisita closed 1 year ago

adisita commented 2 years ago

Hi Frederico, Was trying to use the library ( locally on my laptop) ( both read and write) but I can't get it to work :( . The code runs but doesn't read/write to/from a JSON file. and I'm not getting any errors either. is there anything that I miss ? I appreciate any help

image

image

fbarresi commented 2 years ago

Hi!

I will look at this and report to you.

Best regards,

FB

fbarresi commented 2 years ago

I think in your case you just need a fully qualified variable name in the parameter content. In your case: MAIN.stJSON_write and MAIN.stJSON_read. Can you please give a try?

I know the parameter "ParserMethod" allows misunderstandings, but you used it well 👍 I will probably invert them in the next release even if would be a braking change.

Best regards,

FB

fbarresi commented 2 years ago

Did this change made the trick?

I just released a new version the should fix this misunderstanding with read or write. They now became ReadFile and WriteFile.

The software of the function will still work with older PLC implementations.

Best regards,

FB

adisita commented 2 years ago

hi, thanks for the clarifications. got it to work. also would this work for an array of structures :) ? Thanks

fbarresi commented 1 year ago

Sorry, I missed out you question. Yes it should.