LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

udp Byte stream and Text

I am trying to send a 2k byte stream and ascii using UDP to a target device ( my PC to a PC104- ethernet connection).  The vi I'm using is the one shipped w LV 8.0 ( UDP SEND.vi)  Tried concatentating the bytes with the text but that doesn't seem to work.  Anyone w suggestions.  Can you combine hex and text in a UDP message??  Another Engr can using "C" .

 

 Example what I tried ( hex from UDP Send.vi example)

0000 0000 0000 f359 0001 0008 READ ALL xxxxxxxxxxxxxx

 

According to the Engr his prog reads this info  ( 1st 12 bytes are fillers, the f3 = 2bytes  and the 59= 2 bytes tells the target it is getting something that it will use to do something, the 00 and 01 are ( 2 bytes each)  do it 1 time, the 00 and 08 is the number of bytes that follow are the text that it needs to read to preform a certain function.    The byte stream is 2 k so after the "Read All " it is of no interest and can be disposed of.

0 Kudos
Message 1 of 2
(3,181 Views)
Labview has many functions you may use for this purpose. "String to byte array" and "Byte array to string". And do not foreget the many usefull functions under palette numeric>>data manipulation. I use the "type cast function" a lot. With this function you can convert an DBL array to a string in one operation. Nice if you want to send the DBL array as data, and not numbers. On the other side you can easy type cast the string to a DBL array


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 2
(3,169 Views)