11/17/2021 12:13 PM | |
Joined: 6/19/2019 Last visit: 9/5/2024 Posts: 697 Rating: (73) |
Hello, You can use like this example link HERE or i will try explain: rewrite your needed bools to word place like if word will be MW10 so bools to this word will be M10.0; M10.1; M10.2; M10.3; M10.4; M10.5; M10.6; M10.7; M11.0; M11.1; M11.2; M11.3; M11.4; M11.5; M11.6; M11.7. so you can change any bit and take them all (16) then will be word if you need DWORD take 32 bits lengt data |
Last edited by: Jen_Moderator at: 11/17/2021 14:16:03Optimized link. |
|
11/17/2021 12:20 PM | |
Joined: 3/2/2016 Last visit: 5/29/2024 Posts: 72 Rating: (14) |
Hello ITA2021, If you are using an S7-1500/1200 CPU, then you can access to an individual bit with slice access, for example, if you a word variable called "MyWord" and want to modify the bit0, you can access to this byte as: MyWord.%X0. Here you will find a more complete example. Hope it helps. |
11/17/2021 2:41 PM | |
Joined: 1/12/2021 Last visit: 5/16/2023 Posts: 4 Rating: (0) |
Thank you very much :) |
Follow us on