1/23/2024 3:15 PM | |
Joined: 1/5/2021 Last visit: 10/22/2024 Posts: 15 Rating: (0) |
Hello everyone, I'm pretty new to the programming world and I would like to have some more experienced opinions to my programming skills For a project I need to use a function multiple times. first = sealing with a button second = sealing with 2 sensors high in Auto mode third = sealing with 1 sensor high and 1 sensor low. My main question with this is, am I doing it the right way? Because the machine buggs out sometimes when the power has been off for a longer time. Is there an easy way to do this better or easier? ? I think I am using the IF statement to much as well, so if there are people who have tips for me on how I can program more efficient, I would like to read them! I've inserted my program in the appendix for everybody to check. Using Tia Portal V17.0 If you would like to see how the code runs: https://youtu.be/7oxLi7dkQbE?si=P41C1z_qw6x8r1ZQ I'm hoping for some useful replies! Kind regards, Jobbbooo AttachmentStrapping machine program.zip (298 Downloads) |
Last edited by: Jobbbooo at: 01/23/2024 15:17:21Last edited by: Jobbbooo at: 01/23/2024 15:45:35Last edited by: Jen_Moderator at: 01/24/2024 04:52:35Video embedded. |
|
1/24/2024 12:08 PM | |
Joined: 9/23/2005 Last visit: 11/8/2024 Posts: 4781 Rating: (730)
|
Hi. Some additional remarks:
Regarding the last remark, check the links under this topic. FOR statements can be nested. This improves readability. See pic. There are logic contradictions.
|
Regards, |
|
This contribution was helpful to1 thankful Users |
Follow us on