Author Topic: Is there an easier solution - Menu navigation buttons  (Read 101 times)

Offline SJ Industries

  • PLUS+1 Developer
  • ***
  • Posts: 13
  • Karma: +0/-0
Is there an easier solution - Menu navigation buttons
« on: December 01, 2019, 07:04:18 AM »
Are there any easy solutions out there for menu navigation? I have an application with multiple screens and the menu buttons bring up another layer of menu options. Using a DM430E with the navigation arrows etc, I am finding it difficult to have a selected menu option (button 1) with between 1-8 options pop up, scroll to select which can either move to next page or another pop up of options to scroll through and select, trying to keep the layers priority and the previous layer of menu options from being selected inadvertently with the next button press.

I am using value connects but the logic gets big quickly, I have a feeling if I knew how to program in structured text (or what I was doing in general) I could maybe call a POU in the display screen itself to reduce the code in the application? ST is on my list to learn but time constraints at this stage is not going to let me.

Any hints or tricks? I have rewritten this display a dozen times to try get it working the way I want.

Thanks.

Offline Mike

  • PLUS+1 Developer
  • ***
  • Posts: 13
  • Karma: +1/-0
Re: Is there an easier solution - Menu navigation buttons
« Reply #1 on: December 02, 2019, 03:33:23 PM »
There is a pretty decent video on the youtube page for the layout of a screen selection program.
https://www.youtube.com/watch?v=wlVSgQj6I6U

Essentially you need to use a state diagram to come up with what the buttons do when a certain screen is active. It will be important to lay it out beforehand to ensure that pressing a button cannot activate two separate screens at the same time.


Offline oiltronic

  • PLUS+1 Guru
  • *****
  • Posts: 157
  • Karma: +12/-0
Re: Is there an easier solution - Menu navigation buttons
« Reply #2 on: December 03, 2019, 09:01:29 PM »
For quicker development I just direct the left & right buttons to an up/down counter that wraps around in both directions, and use another button (like 'O' on the DP700) to get back to the home screen.  Then the output of the counter just goes to list of "equals-to" components to activate a boolean flag, which then goes to each screen object.  I figure an operator can hit the right arrow button 10 times before he can activate a pop-up menu, scroll, then select a new screen.  And this way I don't need to make a menu.  It also makes it quick to enable extra screens for things like diagnostics.

I keep a permanent narrow menu at the bottom of the display to indicate what the buttons do.