RS232 sending/receiving commands in excel

C

Thread Starter

chevtrk49

I have not done any programming since college over 7 yrs ago in my one class on c++, so I need some help. After reading on here I know I need to use mscomm, but what I have not been able to find is how to send a command string and the hardware will send some command string back. To read/write to the hardware is in the format of: <STX>+<ADDR>+<WIN>+<COM>+<DATA>+<ETX>+<CRC>

so in hyperterminal it is something like:
0x02 0x80 270 0x30 0x03 86, then it will send back: 0x02 0x80 270 0x30 000003 0x02 8F.

I hope this makes sense b/c it doesn't really to me. I understand that it could all be entered in hex. I am mostly interested in the 000003 (or what ever value it sends) that the hardware sends back. I would then like that info to go into a specified column in a specific worksheet. i.e. data logging from the hardware but for the hardware to send information it has to receive a command so I guess I need to make it send the command in 1 second intervals so I don't get outrageous amounts of data.

Hope someone can help me. Thanks.
 
Top