Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Converting a HEX string

Hello All

I'm using "modCOMM - Written by: David M. Hitchner" to send data out of the
serial port. I need to send HEX strings (eg 0E0E00000505000C20450164A5A5 ) to
external devices. Each part of the string is 2 HEX characters. If I send a
HEX string directly to it, I get incorrect data at the other end.

By using 2 HEX programs and a null cable, I can pass the strings correctly
to the equipment, and also monitor what Excel is sending out of the serial
port.

If I send this - I get this on the HEX comms program

0E0E00000505000C20450164A5A5 -
30453045303030303035303530303043323034353031363441 35413500

0 - 30
1 - 31
A - 41
a -61
0E - 3045
Chr(1) & Chr(255) - 01FF

So, I can see that there is a way to get the correct data out, but I don't
want to have to encode each and every pair of HEX digits into a "chr()".
Whats the intelligent way of getting a string?

Thanks a lot!!
Andrew
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting string to number kenppy New Users to Excel 9 March 5th 10 07:18 PM
converting a string to long Ciar?n Excel Programming 1 October 28th 04 12:36 PM
Converting a Date to a string Sworkhard Excel Programming 2 July 27th 04 09:44 PM
converting number to string No Name Excel Programming 5 January 23rd 04 07:38 PM
Converting a range to string Robert Stober Excel Programming 1 October 3rd 03 09:39 PM


All times are GMT +1. The time now is 03:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"