LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending multiple data with TCP in labview


@PincoG wrote:

Reciving routine convert again ascii CRLF to x0D0A, and then it's all ok: my images are fine and working.

The only thing is that, in this way, I cannot send ascii CRLF into strings or others, because they are my special cchractr sequence. Maybe I can find and use a more special sequence, like a kind of "***CRLF***", but I think it's not so different. 


You are on the right track to inventing a proper escape character scheme! Now that you have defined your escape sequence, (i.e., out of all character combinations, you took out one to have a special meaning), you need a way to let the decoder know that sometimes, you actually *do* want that sequence to be there. A common trick is to always discard the escape sequence/character, then transform the following sequence/character by simple rules.

 

Coming up, implementing, testing and maintaining with such a ruleset yourself is a great learning experience! On the other hand, it also forces anyone trying to work with your system to first learn your particular rules for escaping, which is generally an unpleasant experience for everyone involved. I recommend using some of the standardized systems that have already been mentioned. They are well tested, speed up development time and increase code maintainability.

0 Kudos
Message 21 of 22
(70 Views)

Check out the Simple TCP-example (Help -> Find examples)

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 22 of 22
(48 Views)