Send_string Too Long !
Mathieu
Posts: 25
Hello !
I'm building an application in witch i need to communicate between two ni 3000 masters.
I need to send orders from one local system to the other far away.
I created a virtual device in each master, and send string to this virtual master. In each master i did a data_event with the string: keyword. It worked really fine! (Easier than ip client and server because lighter). it's write-and-play!
But today i need to send more than 100 caracters. I used a "string_to_variable" to convert my array into a string and send it, like before via my virtual device. But i get an error message on my diagnostics window :
Is there a limitation in buffer size of this string event? i used a buffer bigger than my variable converted in string.
Should i try with ip client and server my dialogue? I don't really want to change my way of programming...
How could i send lot of data between two master?
any other idea?
Thank you in advance !
math
I'm building an application in witch i need to communicate between two ni 3000 masters.
I need to send orders from one local system to the other far away.
I created a virtual device in each master, and send string to this virtual master. In each master i did a data_event with the string: keyword. It worked really fine! (Easier than ip client and server because lighter). it's write-and-play!
But today i need to send more than 100 caracters. I used a "string_to_variable" to convert my array into a string and send it, like before via my virtual device. But i get an error message on my diagnostics window :
Line 30 (19:27:07):: SendString 0:0:0 too long 2569 truncated to 274
Is there a limitation in buffer size of this string event? i used a buffer bigger than my variable converted in string.
Should i try with ip client and server my dialogue? I don't really want to change my way of programming...
How could i send lot of data between two master?
any other idea?
Thank you in advance !
math
0
Comments
The ...truncated to 274 message is only a diagnostic printout limitation, not a limitation of SEND_STRING.
HTH
I had an application where LED signs were connected to Axcent 3 serial ports. Axcent 3 serial ports have a buffer limit of something less than the 300-500 bytes that would need to be sent. I sent the data in 50 byte chucks with 300mS in between the sends. This worked well.
programing too much for nothing! I ll split my data into several packets and do multiple send_string with a number of send check into the first send...
Ok ! Thank you for all !!!
I know you'll have to change your programming but it' another approach that can cut down on traffic.
i need to send string from one master to an other. So on off channels aren't the right solution. in fact i send dynamic labels for my buttons from one master to the others...
I'm on the good way don't worry !
thank you for all
I once wrote a sneaky little routine to transfer strings from one master to another as level events. It was pretty simple, really. Just convert the ASCII code to its HEX value and send it as a level to a virtual device on the other master. then the receiving end sends the level back to verify the communication was sent properly (check sum of sorts) It wasn't fast, but it worked very reliably.
I do things completely differently now.
i solved my issue. I cut my data into smal parts and send it one after the one. I'ts a little slow but it's working fine. And this routine is called only when user start the application. So maybe one or twice a day.
Do you have an other way to send straing from a master to an other? without variable to string keyword?
thks for your answers