Hello, I did some cleaning up on the program. Sorry I cannot post the zip file itself; I can do that later after work today.
I think it terms of being simple I think I did the best I can. Let me know how it looks compared to the first version.
Also, I still need more information on how a subroutine works, I feel like I am still missing some key information that made my first version look nasty.
I also added more detailed comments this time around.
https://online.flippingbook.com/view/781801958/
I also made a version without the pre-test and post-test values so that removes one sequence. Now that I think about it, I probably will not have a post and pre-test pressure for the final version.
The reason why is because subroutine (Posttest checkups checks) if the pressure in the system is in between +/- 5% of the pressure setpoint. There is no reason for me to have a pre and posttest pressure because all we care about is if the pressure in the system is in the tolerance range of +/- 5% of the setpoint. If its below or above these thresholds, then the test fails and otherwise it passes. Also is simpler for the programming.
Here is the version without the post and pretest pressure, its simpler! How I use the subroutines is probably wrong so let me know my errors and mistakes or what I can improve and make simpler:
https://online.flippingbook.com/view/782048503/
I also have a question. After someone presses the start button on the HMI that button turns into a one and never goes back to zero. Then when the test ends and goes back to the main program, the start button will be 1 still so the pressure test will start again. Do I need to add somewhere to reset the start button, stop button, emergency button, and other things just like I did with the display messages?