Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S7ItemGroup.writeItems having troubles writting booleans! #114

Open
flacohenao opened this issue May 28, 2020 · 3 comments
Open

S7ItemGroup.writeItems having troubles writting booleans! #114

flacohenao opened this issue May 28, 2020 · 3 comments
Labels
Milestone

Comments

@flacohenao
Copy link

Hi Ghuilherme!

Writting a boolean value on a bit separated area like this:

itemGroup.writeItems("DB2,X0.1", true)

throws me this error:

ERROR WRITE TAG NodeS7Error: Write error [0x7]: Data type inconsistent
    at S7ItemGroup.writeItems (C:\Users\ACER\Documents\NODE PROJECTS\tot-bend\node_modules\nodes7\src\s7itemGroup.js:548:27)   
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  code: 7,
  info: undefined

I also have tried passing the value as a (1 or 0), even string as ('true', 'false')

I guess that the error there didnt catch any info coz its obvious that you know what's the item you attempting to write

@gfcittolin
Copy link
Collaborator

Hi, I can confirm the issue. It is related to writing to boolean items only. This have been fixed in the past, but got intentionally reverted for some reason. I'm checking why that was the case, and will provide unit tests that cover this to prevent from happening in the future.

@flacohenao
Copy link
Author

Thank you very much!!

@gfcittolin gfcittolin added this to the v1.0 milestone Jun 1, 2020
@gfcittolin gfcittolin added the bug label Jun 1, 2020
gfcittolin pushed a commit that referenced this issue Jun 1, 2020
Fix again bug wrongly reverted by 3193ee0 and add test case for it
@flacohenao
Copy link
Author

@gfcittolin Hi!!!

is the commit the final fix? can you please explain what was causing the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants