(2)| 9/11/2023 2:47 PM | |
|
Joined: 1/20/2022 Last visit: 9/3/2025 Posts: 369 Rating:
|
hi All Bit shocked but i am learning - is pointer data type not supported in 1200s PLCs? Regards |
| 9/11/2023 5:05 PM | |
|
Joined: 1/20/2022 Last visit: 9/3/2025 Posts: 369 Rating:
|
|
Last edited by: hewking103 at: 09/11/2023 17:07:04 |
|
| 9/11/2023 6:17 PM | |
|
Joined: 3/30/2020 Last visit: 12/11/2025 Posts: 5656 Rating:
|
The SCL instructions PEEK and POKE can in many situations be used where we would use pointers like the ANY pointer. Below code idea scans through DB1 (not optimized) that has only BOOL tags. The function returns a TRUE when all bits are FALSE. Code has been simulated in Step7 V17.0.0.6 for CPU1212 FW:V4.5. Attachmentexported-scl.txt (351 Downloads) |
Last edited by: qwazee at: 09/11/2023 18:20:33add ASCII export Activities of this user is voluntary. There is no obligation or liability placed on this user. Though optional, your 'please' and 'thank you' is highly valued. |
|
| 9/11/2023 7:07 PM | |
|
Joined: 7/7/2010 Last visit: 1/16/2026 Posts: 16379 Rating:
|
Many ways to solve the problem of detecting ≥ 1 bit is true within a contiguous set of bits (bools). If the bits are configured as an array of bool in 16 bit or 32 bit lengths, you can pass the array into an FB where you can overlay (using AT overlay method) the bits to a 16-bit WORD or 32-bit DWORD. Then it's easy to detect a single bit = 1 (TRUE). https://support.industry.siemens.com/cs/document/57132240 Let's assume there are 16 or 32 input bits mapped (overlayed) to tag named "ALARMS" as Word or DWord. To detect whether any alarm bits are set:
|
Last edited by: 0_Einstein at: 09/11/2023 19:08:43clarified word/dword science guy |
|
This contribution was helpful to
|
|
Follow us on