Send data to serial port

A

Andrew P.

Hi All

I want to be able to send small bits of HEX data to the serial port from
Excel. I dont have any VB program other than the standard editor in Excel,
Acces etc.

I have read some posts that refer to MSCOMM32, but from what I understand,
it is for use by people with a full VB program. Is there any way to do it?

Thanks a lot
Andrew
 
A

Andrew P.

Thanks Eric

Im using the code in http://www.thescarms.com/vbasic/commio.aspx and I can
see that I have activity on the port now. The commands are not being
recognised by the connected equipment though. The equipment expects a HEX
string, I have the HEX data (which works if I send via another program) but
Im not sure how I should present it in this code. For example, one command is:

0E0E00000505000C20450164A5A5

The data is made up of groups of 2 HEX digits, so the first is OE, second is
OE, third is 00 etc

I tried using:
strData = "0E0E00000505000C20450164A5A5"

I tried also doing it as decimal:
strData = "014014000000005005000012032069001100165165"

and:
strData = "014" & "014" & "000" & "000" & "005" & "005" & "000" & "012" &
"032" & "069" & "001" & "100" & "165" & "165"

and also as:
strData = "0E" & "0E" & "00" & "00" & "05" & "05" & "00" & "0C" & "20" &
"45" & "01" & "64" & "A5" & "A5"

and a bunch of other ways of representing it, but always no good. Any help
would be greatly appreciated!

Thanks again

Andrew
 
E

EricG

Unfortunately it's been at least 20 years since I've had to deal with issues
like this, and my memory is fading fast! I do remember that there were
escape codes I had to send to whatever box or board I was working with to get
its attention before I sent it any commands or grabbed any data.

Sorry I can't be more helpful. Good luck in figuring it out.

Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top