3/24/2023 10:32 AM | |
Joined: 6/28/2022 Last visit: 4/18/2024 Posts: 27 Rating: (0) |
I have different states that my program can be in. When in state 1 i run one Function Block, when in state 2 i run another Function Block. In order for P_Trig and other stuff to work i need to run all the Function Blocks all the time. But i feel like it makes more sense to check which state it is and then run the one correct Function Block. With the first method i need to check which state it is on EVERY network inside the function block, with latter i only need to check the state once, before running the FB. There are screenshots showing what i mean inside the rar-file. "DoesWork.png": is what works now, but not how i want it to be. Here i need to check multiple places which state it is. "DoesNOTwork.png": doesnt work but this is how i would like it to work. Here only the correct FB is running, only one at a time, and i only need to check which state it in one place. Is there a way to structure it so that it will be structured more like how i want it? Or is doing the same boolean comparrison on every network Status Quo and recommended? Or are there other ways? Attachmentscreens.zip (163 Downloads) |
Follow us on