02-13-2018 07:42 PM
Hi.
I am in the final stages of a project. The aim is to take a GPRMC ASCII string from my GPS enabled radio, convert it to HEX and send to my remote GPS tracking server.
The remote server is from a third party and only accepts HEX. I am new to LabView but have successfully got to the stage of converting the string to HEX. Please find below an example
HEX:
32302C3031303930373030303030302C31332C30322C31382C31362E3831363636372C39362E3136363636372C313330362C532C002A32380D0A0D0A
ASCII:
20,010907000000,13,02,18,16.816667,96.166667,1306,S,28
I have spent the last few days trawling the internet and support forums but have not been able to find (and not sure if its possible) how to send the HEX over a TCPIP: PORT connection. If anyone could kindly point me in the right direction while I still have hair left it would be greatly appreciated.
Regards
Dave
Solved! Go to Solution.
02-14-2018 01:10 AM
02-14-2018 01:15 AM
Hi GerdW.
Yes the HEX is currently a plain string.
Regards
Dave
02-14-2018 05:39 AM
When you say "hex", what exactly do you mean?
If you are just referring to the raw data, then it sounds like you are just a little confused by the display on the indicator. For example, an ASCII "2" is represented by a byte with a value of 0x32. So your data is the same at the byte level.
02-14-2018 05:55 AM
Hi Crossrulz
I am taking an "Array To Spreadsheet String" and passing it through a "Number to Hexadecimal String"
Output of "Array to SpreadSheet String" =
20,010907000000,13,02,18,16.816667,96.166667,1306,S,28
Output of "Number to Hexadecimal String" =
32302C3031303930373030303030302C31332C30322C31382C31362E3831363636372C39362E3136363636372C313330362C532C002A32380D0A0D0A
I hope this helps some. I ave only been using LabVIEW for about a week.
Regards Dave
02-14-2018 06:07 AM
Hi Dave,
I am taking an "Array To Spreadsheet String" and passing it through a "Number to Hexadecimal String"
Output of "Array to SpreadSheet String" =20,010907000000,13,02,18,16.816667,96.166667,1306,S,28
Output of "Number to Hexadecimal String" =32302C3031303930373030303030302C31332C30…
ArrayToSpreadsheetString outputs a string, NumberToHexString expects a numeric value at its input.
How did you connect those two functions???
02-14-2018 06:21 AM
Hi GerdW
The project has been a learning process and fun but have probably scurried up a number of wrong paths. However the end result appears to be near my goal. Happy for direction change if needed.
I used the following jpg to convert the CSV to HEX (If my terms are correct).
Regards
Dave
02-14-2018 06:31 AM - edited 02-14-2018 06:32 AM
Hi Dave,
I used the following jpg to convert the CSV to HEX (If my terms are correct).
So you used some more function than you have described earlier.
See the effect of providing more information?
Some changes to your code:
(You really should learn to clean up your block diagrams!)
So is your problem solved?
Is your GPS tracker receiving the data it needs/expects?
02-14-2018 06:38 AM
Noted on the tidy up. It is my plan once I have finished the continuous changes to make it good.
I now need to send that information over a TCP connection to my GPS server located offshore. This is my final headache.
02-14-2018 06:47 AM