SEND_STRING length to IP Client
Kurt
Posts: 16
When using a SEND_STRING to an IP_CLIENT is there a maximum string length it will accept? I remember an old AMX document that showed max string lengths and thought it was only a couple hundred bytes. Need to send a 1033 byte string to a device. The string must all go in one transmission for it to be accepted correctly. Tech Note TN156 seems to address this a bit but is a bit hard to interpret.
0
Comments
Was your TN a typo? 156 is quite old.
Those are the only numbers that come to mind in regard to send strings but I don't know if they pertain to your question. Maybe in the morning my brain will work better and I'll remember something else or something I've tried but for now I'm drawing blanks.
Please see TN886 "Calculating big file checksums and the 16000 byte string expression limit"
There are various other limits in AMX world depending upon what you are dealing with.
Are you seeing any errors from the master?
Cheers
Mush
Agreed. I send many times that to IP clients/servers when needed. There is a limit for a send_command that is around 200 bytes I believe, but I don't think send_string has any built in limit. Once that string is sent to a port, the firmware is responsible for the TCP magic so you don't have to worry about receive windows or any of that junk.
Paul
It is exactly 200 but that includes the entire command string including the AMX header.
eg is 9 bytes before you add your sting.
Did you mean send_command Vining?
The exception to the 200 byte limit is the ^TXT command. You can send much larger strings using than 200 bytes. All other commands, not so much.
Hmm.. Just tried that. Ran out at 200.
Interesting. TS told me that TXT wasn't bound to this limit as it would parse continually until the string was finished. Looks like that isn't the case. Fortunately I don't often have to send over 200 bytes to a touch panel very often, but was thinking of doing it for a new feature. I'll have to rethink that. That limit is also a pain when it comes to dynamic images as URLs can get very long.
Paul
Maybe they meant ^BAT which appends text to a button rather than overwriting?
It is still limited to 200 but you can break your string up and send it over multiple commands.
^TXT
^BAT
Uh oh. Another instance of the document not reflecting the real world! What ever shall we do?
:-)
That just means that you can only send 1-50 ASCII characters. You can send other non ASCII characters up to the 200 character limit.
Paul
Correction - You [highlight]KNOW[/highlight] the doc is wrong!
It was a bad joke on my part.
Paul