-
Notifications
You must be signed in to change notification settings - Fork 124
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
Read boolean #2
Comments
@RTmaster read boolean is similar with read any types of data: |
I see there to be a problem with this approach. If the boolean is given in a byte it works. How can we have get booleans at the bit position in a byte. For example if i want to get the boolean value at 180 the position at bit 6. According to examples given. All the function does is read the record at position byte 180 but how do we get the value at the bit position off the byte. |
@sandeep51989: more specific: the buf is an array of bytes which stores the return values - maybe: bool, int8, int16...so on. The values arrange from the position 0. The helper: S7.GetValueAt will return an interface of value. |
sorry for reviving this old thread but when i read a byte containing 8 bool bits it returns 1 byte in the buffer array instead of 1 byte for each bool value. so i can not get individual bool values |
@pizzalord22 |
I have added the boolean support in the helper. |
Merge pull request #29 from ThinkontrolSY/master
It's good , but how about write a boolean to PLC, do we need to read it in a byte first, then change a bit in the byte, then we write to PLC , it's not a good idea. |
please can you advise if there is a function to read booleans?
@robinson
The text was updated successfully, but these errors were encountered: