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 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? Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted July 15, 2021 MVP 2023 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. 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! Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted July 17, 2021 MVP 2023 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now