Home AMX User Forum NetLinx Studio

variable use in DMS txt string

hello, this is my first time i programming a AMX controller

i am trying to put a variable text into a DMS keypad,

SEND_COMMAND dvpanel,"'^TXT-33,1&2',settime"

settime is a number 1 to 10000

also i try to get the "time" (hh.mm) into a txt string, with a update every minute

thanks

Comments

  • You probably need SETTIME to be ASCII. So use ITOA() function. The TIME keyword in Netlinx already supplies time in ASCII format but it is HH:MM:SS. I would just do a wait 600 (that's 60 seconds) then do a left_string(time,5). I hope this helps.
  • Joe HebertJoe Hebert Posts: 2,159
    I might very well be mistaken but I thought there were built in time and date buttons. Is that not the case?
  • GermtGermt Posts: 10
    re
    Joe Hebert wrote: »
    I might very well be mistaken but I thought there were built in time and date buttons. Is that not the case?

    no i try to set a text(variable) into a DMS keypad.
    I have a value from 1 to 10000, and i want to count the value on the keypad with +/- buttons
    the counting is not the problem but i want to see the value of this variable also on the screen.

    i have.
    settime = 100
    SEND_COMMAND dvpanel,"'^TXT-33,1&2',1,settime"

    but this put not the number but a letter into de txt button 33
    can you also tell me what the ,1, is in the sting ,1,settime"

    i am also trying to set the real time on the keypad, but it is static when it is in the display

    thanks, it's all new to me and i?m glad some is helping me.
  • viningvining Posts: 4,368
    Is this a MIO DMS or a old PLK DMS?
  • GermtGermt Posts: 10
    vining wrote: »
    Is this a MIO DMS or a old PLK DMS?

    it is a mio DMS 8button keypad
  • viningvining Posts: 4,368
    "'^TXT-<variable text address range>,<button states range>,<new text>'"

    Assign a text string to those buttons with a defined address range.

    Sets non-unicode text.



    Syntax:

    SEND_COMMAND <DEV>,"'^TXT-<vt addr range>,<button states range>,<new text>'"



    Variables:

    variable text address range = 1 - 4000.

    button states range = 1 - 256 for multi-state buttons

    (0 = All states, for General buttons 1 = Off state and 2 = On state).

    new text = 1 - 50 ASCII characters.




    Try:
    settime = 100 ;
    
    SEND_COMMAND dvpanel,"'^TXT-33,0,ITOA(settime)" ;
    

    This will send the ascii string '100' into the variable text address 33. If you don't use the ITOA on the settime variable who will get the decimal ascii equivelent that is if it equals a printing character. Decimal 100 = ascii "d' w/o the double quotes.

    The 1 in your string must be a typo and shouldn't be there.
  • GermtGermt Posts: 10
    thanks

    thanks, it is working now.
  • ColzieColzie Posts: 470
    Joe Hebert wrote: »
    I might very well be mistaken but I thought there were built in time and date buttons. Is that not the case?

    Is this the case? I have been unable to see how this would be done, but would be nice to not have to do it through code.

    Each "button" can have an Address Port and Code, as well as a Channel Port and Code. However, entering a 0 for the Address Port produces an error "Port value must be in the range of 0-100". I was thinking I could just enter the appropriate address for the setup port to get the time to display, but no luck.
  • Joe HebertJoe Hebert Posts: 2,159
    Colzie wrote: »
    Is this the case? I have been unable to see how this would be done, but would be nice to not have to do it through code.
    It?s been a long time but I?m almost positive that the old PLK-DMS keypads had built in time, date, and temp buttons that you could setup with the old keypad builder program (I forgot the real name.) I can?t imagine why they would do it but maybe the MIO-DMS keypads removed those built in features?
  • ColzieColzie Posts: 470
    The KeypadBuilder (for new DMS) is pretty thin on features. It works, but don't expect any extras. Or apparently don't expect any of the standards, either.
  • mpullinmpullin Posts: 949
    Someone had to repost this. Might as well be me.
    Colzie wrote: »
    The KeypadBuilder (for new DMS) is pretty thin on features. It works, but don't expect any extras. Or apparently don't expect any of the standards, either.

    Also thin on spell checking:
  • iainshawiainshaw Posts: 133
    DMS - cul-de-sac

    With the constant harrying pressure from lower level players below AMX there is going to be a need to provide a lower level solution for residential. The new TPs shown at ISE are probably how to do it. The DMS series are certainly not how to do it. Sorry, this is probably an OT post but I think any effort expended on DMS is wasted effort.
  • iainshawiainshaw Posts: 133
    Sorry I forgot the the other point

    Keypad Builder is very poor indeed.
Sign In or Register to comment.