Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Increment Decrement Buttons usage help
#1
Hello, I am looking for some help using an increment button:

I have set up an increment button on the custval04 field on my Elk - Serial interface. This is something I can currently write to with a basic fieldwrite command button without issue. I'd like to simply add 1 or subtract 1 from this field when I press a button and thought the inc/dec. button's would be good for this.

When I load a template with this button and press the Increment button it doesn't do anything. No errors, and doesn't even act like it was pressed (the button graphic doesn't change from pressed to unpressed state)

CustVal04 is a Card4 Field so I think is valid for this action. Just for fun I also set up a variables driver Int4 field and tried the same. It acts the same way for me(can't press the button), however using a Boolean field seemed to work.

Would anyone be able to point me in the right direction here? I'm on Ver 4.10, wasn't sure to post in the Beta section or here. Please move if appropriate.
Reply
#2
In theory it should work, and maybe something is whacked with the inc/dec buttons, though I've not heard any complaints to that end. It may have something to do with the fact that those fields have no limits so the potential range of adjustment is very large.

But, in the meantime, if you just want to add or subtract 1, a regular command button would probably be just as useful. Just get the current value, check it to make sure it's not above (or below) some desired min/max value. If not add or subtract one and write it back out. The inc/dec buttons are generally better for continuous ramping of the values.

Since these fields have no limits, there would be nothing to prevent the values from being ramped a long distance. With the above scheme you can add some usage specific limits on the amount of travel.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Curious About Usage Post Public Domain kblagron 18 3,127 11-01-2022, 08:01 AM
Last Post: karenlee
  Old Version pushing CPU usage to 100% sic0048 7 1,766 05-25-2021, 03:34 AM
Last Post: sic0048
  Pico Buttons simplextech 10 3,159 01-07-2020, 05:06 PM
Last Post: simplextech
  Increment web image widget NishanF 5 2,297 10-24-2019, 08:16 AM
Last Post: Dean Roddey
  Hiding Command Buttons on template kfly 5 3,172 12-14-2018, 06:52 PM
Last Post: Dean Roddey
  Trapping Elk F5/F6 Buttons IVB 29 10,398 03-04-2018, 03:41 PM
Last Post: Dean Roddey
  Inc Dec buttons Ron Haley 1 1,887 07-26-2014, 06:44 PM
Last Post: Dean Roddey
  Learn>Videos>Buttons fotofreak 6 3,151 07-20-2014, 06:59 PM
Last Post: Dean Roddey
  Radio buttons dgeffs 8 4,472 09-11-2011, 07:19 PM
Last Post: batwater
  VK011 and high CPU usage lately Shaky 5 2,571 05-06-2011, 07:50 PM
Last Post: Shaky

Forum Jump:


Users browsing this thread: 1 Guest(s)