Home AMX User Forum AMX Design Tools

Getting past the button text length limit

I'm sending some text from the master to a button on a touch panel. There is a limit on how much text can be sent (128 characters I believe). Is there a way around this?

Comments

  • Joe HebertJoe Hebert Posts: 2,159
    jabramson wrote: »
    I'm sending some text from the master to a button on a touch panel. There is a limit on how much text can be sent (128 characters I believe). Is there a way around this?

    You can append text with the ^BAT command.
    AMX-PI wrote:
    "'^BAT-<variable text address range>,<button states range>,<new text>'"

    Append non-unicode text.

    Syntax:

    SEND_COMMAND <DEV>,"'^BAT-<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.

    Example:

    SEND_COMMAND Panel,"'^BAT-520,1,Enter City'"

    Appends the text 'Enter City' to the button's OFF state.

  • amclainamclain Posts: 41
    jabramson wrote: »
    I'm sending some text from the master to a button on a touch panel. There is a limit on how much text can be sent (128 characters I believe). Is there a way around this?

    What's the data you're trying to send? I ask because 128 characters is A LOT of text to try to cram onto a button, so if you're running into the limit there may be a better way to design the interface to break up the data into more manageable pieces.
  • John NagyJohn Nagy Posts: 1,734
    Text areas are buttons too. The synopsis and actor list from a KSCAPE exceed 128 characters easily. There are legitimate uses for sending a lot of text to a "button".
  • mpullinmpullin Posts: 949
    Modules for devices such as Kaleidescape where lengthy metadata being passed all use ^BAT. It depends on where you are getting this big chunk of text from. If you have control over the source of the text, it is definitely better to divide this content into smaller sections. There are few situations where you would really want to be sending whole paragraphs to dynamically display on a touchpanel.
  • viningvining Posts: 4,368
    Of course if you're sending unicode to your buttons your limit is 35-40 characters so you're more likely to have to append to get over the widechars vt limit. Works like ^BAT but you need to break your vt into smaller chunks and use ^BAU.
    "'^BAU-<variable text address range>,<button states range>,<unicode text>'"

    Append Unicode Text. Same format as ^UNI.



    Syntax:

    SEND_COMMAND <DEV>,"'^BAU-<vt addr range>,<button states range>,<unicode 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).

    unicode text = 1 - 50 ASCII characters. Unicode characters

    must be entered in Hex format.



    Example:

    SEND_COMMAND Panel,"'^BAU-520,1,00770062'"

    Appends Unicode text '00770062' to the button's OFF state.
Sign In or Register to comment.