Home AMX User Forum NetLinx Studio

variable text lenght?

Hi All,
Does anybody know what is the maximum amount of characters that you can display in variable text field on a Modero Touchpanel. I cannot seem to get more than 195 chars. I am using the following command:
send_command TP,"'!T',count,titles[count]"
where titles[count] contains more than 200 chars.
Is there a better command to use in this instance?

Thanks,
Shane

Comments

  • jjamesjjames Posts: 2,908
    I ran into this problem when posting CNN stories on touch panels. Everytime it would seem to only send 188 characters - just a little bit different than your 195 - but nevertheless a restriction. I fixed this by appending text via the BAT command. Here's the code I used:
    cPart1 = LEFT_STRING(cDescription,188)
    cPart2 = MID_STRING(cDescription,189,188)
    cPart3 = RIGHT_STRING(cDescription,(LENGTH_STRING(cDescription)-564))
    
    
    SEND_COMMAND dvTP, "'^TXT-161,1,',cStory"
    SEND_COMMAND dvTP, "'^TXT-162,0,',cPart1"
    IF(LENGTH_STRING(cPart2)<>0)
        SEND_COMMAND dvTP, "'^BAT-162,0,',cPart2"
    IF(LENGTH_STRING(cPart3)<>0)
        SEND_COMMAND dvTP, "'^BAT-162,0,',cPart3"
    

    This is old code, and I'm sure could be written much better, but the concept is that you'll need to break up the string into "X" number of characters, and use the ^BAT command.

    P.S. - Does anyone know why when posting code, it sometimes splits right down the middle? Look at the variable cDescription . . . wierd.
  • I believe it's simply a limitation of the ICS packet size - but thanks for pointing out the ^BAT command - I hadn't seen that before!

    Be glad your panel isn't on Axlink - max 60-odd characters, including the command! (And no ^BAT on G3 panels!)

    - Chip
  • jjamesjjames Posts: 2,908
    I can't recall completely - but when I was having this issue, I spoke with tech support and I think they said there was a limit when sending text to a panel. I very well may be wrong.
  • shanemshanem Posts: 28
    Thanks,
    Ill give this a go. I never heard of the ^BAT command either. Where is this documented? I have looked through the G4 instruction manuals and havent come across it.
  • jjamesjjames Posts: 2,908
    Found in the latest Software History - perhaps one of the greatest programs / documentations ever.
Sign In or Register to comment.