Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Send data to serial port

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Send data to serial port

Here are a few examples I found through Google:

http://www.pencomdesign.com/support/...re_example.htm

http://dev.emcelettronica.com/serial...tion-excel-vba

http://www.activexperts.com/activcomport/howto/vba/

http://stackoverflow.com/questions/5...-port-from-vba

HTH,

Eric


"Andrew P." wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Send data to serial port

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




"EricG" wrote:

Here are a few examples I found through Google:

http://www.pencomdesign.com/support/...re_example.htm

http://dev.emcelettronica.com/serial...tion-excel-vba

http://www.activexperts.com/activcomport/howto/vba/

http://stackoverflow.com/questions/5...-port-from-vba

HTH,

Eric


"Andrew P." wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Send data to serial port

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

"Andrew P." wrote:

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




"EricG" wrote:

Here are a few examples I found through Google:

http://www.pencomdesign.com/support/...re_example.htm

http://dev.emcelettronica.com/serial...tion-excel-vba

http://www.activexperts.com/activcomport/howto/vba/

http://stackoverflow.com/questions/5...-port-from-vba

HTH,

Eric


"Andrew P." wrote:

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

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
Retrieve Data from a Serial Port Marc Cowlin Excel Programming 0 October 12th 06 05:48 PM
entering data from a serial port to excel David C Excel Programming 2 February 20th 05 05:33 PM
probing the serial port for data Jeff[_42_] Excel Programming 1 December 6th 04 12:00 AM
serial port data acquisition jgseas Excel Programming 2 March 3rd 04 04:33 PM
need help re send/recieve com port data from excel and auto CR/LF Ftca Excel Programming 4 October 12th 03 05:16 PM


All times are GMT +1. The time now is 06:44 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"