Aaron1 Posted July 15, 2021 Report Share Posted July 15, 2021 Hi, currently I have it so that if either of the two HMI buttons are pressed either of them when pressed power the increment function which in turn is supposed to increment the value in the MI i have placed there but this does not happen. I just want to simply display on the HMI a variable that shows how many times these buttons have been pressed. I can force a value into the MI variable and this then displays on the HMI okay but the increment function will not manually increase the MI but perhaps I am using it in the wrong way Any insight appreciated! https://imgur.com/gallery/zFdqOjG Quote Link to comment Share on other sites More sharing options...
Cam Posted July 15, 2021 Report Share Posted July 15, 2021 it's hard to say with out seeing all the code but couple of questions and things to check Is the increment done in a sub-routine or main routine? if in a sub-routine are you calling that sub-routine? is MI 38 being reset or stored to somewhere else in the program? Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted July 15, 2021 MVP 2022 Report Share Posted July 15, 2021 42 minutes ago, Cam said: if in a sub-routine are you calling that sub-routine? This is the most likely reason, but if not, post your program here and someone will be able to help you. Quote Link to comment Share on other sites More sharing options...
Aaron1 Posted July 16, 2021 Author Report Share Posted July 16, 2021 Quite embarrassing but yes it wasn't called, the subroutine had been sitting idle from a previous project it wasn't used in that I built on top of and I never thought to check. Thanks for the input! Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted July 17, 2021 MVP 2022 Report Share Posted July 17, 2021 Aaron, the issue is not hard to do, because when online any subroutine will still show power lines on operands that are active. It is very easy to mistakenly believe the ladder area you are looking at is actually doing something. There are many references in the forum to this quirk, with various solutions/indicators done by users so that they can visually check the sub is actually running as they watch it. cheers, Aus Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.