Home AMX User Forum AMX Control Products
Options

Moving Dial

I'm trying to animate a dial when the respective arrows are pressed..up, down, left, right
I created a multi state general button with 5 states. main, up, down, right, left
In netlinx im trying to see that dial change but nothing happens....HELP PLEASE

here's my code for the up button. Note that Navball is the name of the button in TPD4 and 99 its address code
CASE 45:
{
SEND_COMMAND Navball, "'^ANI-99,2,2,0'"
}

Comments

  • Options
    Spire_JeffSpire_Jeff Posts: 1,917
    You need to send the command to the touch panel device, not the button name. Make sure the port you are send it to is the same port defined in TPD4.

    Also, if you only have 5 states, you should probably be using a level to control the dial. You could then just send a level to the button to go to the appropriate graphic. (If you feel really ambitious, you could write code to move from the current state to the appropriate state 1 step at a time.) Make sure the button is setup to only have 5 states and the high value is 5 and the low is 1.

    Jeff
  • Options
    hmmm....

    I did change the name to the TP and still dont see any movement
    The value I'm giving the button is the address code right ?????
  • Options
    Spire_JeffSpire_Jeff Posts: 1,917
    Try:

    SEND_COMMAND dvTP,"'^ANI-99,0,5,1'"
    followed by
    SEND_COMMAND dvTP,"'^ANI-99,0,2,1'"


    I would start by sending these commands using the diagnostics Control a Device utility. This will eliminate any other code problems and let you see if the command is actually doing what you want.

    Jeff
  • Options
    iT DOES WORK

    It works !!
    now I need to make it a momentary push...since it stays on the position that is pressed, it will keep scrolling forever!!!
Sign In or Register to comment.