Home AMX User Forum AMX Control Products

^UNI ^BAT??

Ok how?

How do you append when using unicode? The only other thing I've found is %UN in the BMF. Did we loose the string limitation when going ^UNI?

FYI, ^BAT specifically states that it's for none Unicode text.

Comments

  • viningvining Posts: 4,368
    If I take out the ^UNI and just send plain ^TXT to the TP my strings cut off at 191 which is in keeping with the 188-200 char string to TP limit that we've discussed in the past for which we use the ^BAT command.

    With the ^UNI in place I'm consistently cut short at 47 chars so what's a poor boy to do? I guess I could try ^BAT if & when strings over 47 chars are required and see what I get but shouldn't this have a solution already developed. Am I just an odd ball for wanting ^UNI strings longer than 47 chars.

    I guess it's probably that these are widechars so the byte limit is reached with less chars cuz these are fatter. Excuse the technical term but I still have brain issues grasping fundamental things like datatypes and bytes. Ok, since I'm really stupid when it comes to this stuff but if a char is 8 bit and a widechar 16 bit wouldn't my string for a Unicode cut off at 1/2 the char limit as plain text?
  • viningvining Posts: 4,368
    Unicode Send Command Limits:
    With the ^TXT command, if you want more than one line of text on a button, you include the pipe character | in the send command. The Unicode value of this character is 007C. Include that 4 digit sequence in the ^UNI command to make the line break:

    SEND_COMMAND dvG4,'^UNI-1, 1.255,0420043E04370443043C043D04380439007C04140456043C'

    After the above send command, the button will display:



    If you want to send more than approximately 45 Unicode characters, you will find the text gets truncated. The reason is that currently the G4 panels cannot process more than 199 bytes of a single ^UNI send command.

    A workaround for this is to split the Unicode text into multiple send commands with one line of text per button. The unicode.axi file, in the attached Studio 2 workspace, contains a subroutine, 'SPLIT UNICODE', that will do this for you. It limits each line to 45 characters (180 bytes, after Unicode encoding), in order to leave enough room for the command header. The ^UniTest.axs is the main file. Please see the comments in these files for specific coding information.

    Well this bytes! Not a very clean work around. How do you go about creating a paragraph made up of individual buttons of 45 unicode chars max each. If they are able to overcome the 199 bytes lmitation by creating the ^BAT command for plain text why couldn't they come up with a ^UNIBAT command? This technote reference I found was from 2006, they've had plenty of time unless maybe they're too busy, wasting time, taking stupid tests. What happened to priorities? Waste time on stupid s hit after every else is working the way it should.

    No problem, I'll just spend more time re-doing my GUI and modifying my code as a work around for something that should have been addressed long ago.
  • viningvining Posts: 4,368
    When did they sneak this in?
     "'^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.
    
    
  • DHawthorneDHawthorne Posts: 4,584
    Every time I see the title of this thread, I think of something that goes around my office now and then: "nothing wrong with that guy I can't fix with a half hour in a closed room with a wiffle bat ... ." Maybe we should be using a unibat for better results ...
Sign In or Register to comment.