Hello,
I must filter out Hex data to a log screen and show the asci code.
so the hex data won't be show on the log screen only the asci data
is this posible and how wemust pick this up
best regards Erik
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Sam HobbsRank #108 · 20.5K reputationPosted Jul 30, 2010, 6:20 PM EDT
Erik Scholts5 reputationPosted Jul 31, 2010, 2:11 AM EDT
Sorry for the Concise quenstion. what I mean we have make a program to log out a rs232 comport,all the data that we read out is in asci. But now on newer version there is also a keep in live string on the rs232 port with that string you keep open the comport. So we also send out a keep in live string for sofar evertyhing works fine. this keep in live string is hex string:
byte[] keepAlive = new byte[] { 0x66, 0x99, 0x06, 0xf9, 0x00, 0x20, 0x00, 0x09, 0x01, 0x02, 0xd4 };
this one we send out every 2 seconds, and get back a string. Here come my problem The window that show the data do show now also this string that we get back. not the perfect hex string as above, but convert to asci data but that is normal we program the window to show asci data.
now I like to filter out the hex string (and al this kind of hex data) that i got back from the rs232 so it isn't show on in the window. so is it posyble to do?????
best regards Erik
Sam HobbsRank #108 · 20.5K reputationPosted Jul 31, 2010, 7:10 AM EDT
What type of data is the data coming from the serial port? Is it a string or a byte array or what? So in ohter words, what do you need to search in?
Will the keep Alivedata always begin with a x66? What parts will vary and what parts will be constant?
Erik Scholts5 reputationPosted Aug 1, 2010, 3:24 AM EDT
thanks for your reply
It is a processor that send out 2 type of data 1- in asci format and 2 real hex format.
I measure that with a rs232 logger.
Normaly we show that data in a debug window screen and can read normaly the data and can see what kinf of fault code the processor gives.
So from my rs232 port to my debug windows of my program I must filter out that data in hex format.
below what happend now in the debug window.
f??f???f??f??f???_________________?f???_________________?f???_________________?f???_________________?f???___________
f???
Last Error:
8f???-----------
6f???Res Code Class D?f???ate Time :f??? Startup sec. Deskf???
cription
?f???-----------------Ff???-----------------Ff???-----------------Ff???-----------------Ff???----
?f???19 05 R 1?f???7.02.09 15:08:40 ?f???