tommyears
Industrial
- Apr 18, 2006
- 3
Hi,
I am looking for some exmaples or pointer regarding the following problem. I have a piece of electronics connected to my computers serial port which sends data over RS232 to my computer, an exmaple string is:
2D 78 EB FA 80 78 67 0A
There are 8 bytes send, with the 8th byte being the terminator, LF.
I have tried many methods to get these packets into MATLAB, however MATLAB seems to read and store them as ASCII not as HEX as I would like. So I may receive:
*???????
Is there a method of converting ASCII to HEX? Can I read in serially in HEX format?
I would also like to monitor these data packets for a 24hr period with the packets arriving every 4-5 seconds. Is there a method/example code etc... where I could do this and save the packet to an element of an array each time one is received?
Thank you for your time, I look forward to your thoughts and comments.
Regards,
Tom
I am looking for some exmaples or pointer regarding the following problem. I have a piece of electronics connected to my computers serial port which sends data over RS232 to my computer, an exmaple string is:
2D 78 EB FA 80 78 67 0A
There are 8 bytes send, with the 8th byte being the terminator, LF.
I have tried many methods to get these packets into MATLAB, however MATLAB seems to read and store them as ASCII not as HEX as I would like. So I may receive:
*???????
Is there a method of converting ASCII to HEX? Can I read in serially in HEX format?
I would also like to monitor these data packets for a 24hr period with the packets arriving every 4-5 seconds. Is there a method/example code etc... where I could do this and save the packet to an element of an array each time one is received?
Thank you for your time, I look forward to your thoughts and comments.
Regards,
Tom