LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert text file data to hex display commands for UDP transmission

Solved!
Go to solution

Hello,

I am trying to read ethernet packets in from a text file containing the actual hex data packets to then send this exact hex data back out through a UDP write. I cannot figure out how to feed the data into the UDP write function as actual hex data instead of ASCII characters as it does by default. I have switched the display on the last VI before the UDP write to "hex display mode" and if I manually type hex values into this VI (Hex String to Binary String.vi - attached), then it passes the commands correctly. However,...when I feed the text string data from my text file into this VI, it seems to be overriding this hex display mode on the VI input and the resultant input into my UDP is still in ASCII character mode. I attempted to use a type cast inside this VI,..but that doesn't seem to be working right either. I have attached the main VI and the VI that attempts to prep the data before the UDP read. I have also attached a sample text file of the data I am attempting to parse. 

 

Any help would be much appreciated,

Thank you,

 


0 Kudos
Message 1 of 3
(5,917 Views)
Solution
Accepted by topic author jsrocket

Hi jsrocket,

the attached example should work as transformation.

 

Mike

Message 2 of 3
(5,906 Views)

Hey Mike,

I knew that I was thinking about it too hard,...but for some reason I just didn't try it as you suggested. Your suggestion worked and was exactly what I needed for this issue. Thank you very much for your help!

0 Kudos
Message 3 of 3
(5,897 Views)