Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use VB ComponetWorks to communicate with two PCs use its Serial Port?

I connect 2 PCs with serial Cable. 1Pc run program to write "A", CWserial.Write "A". The other PC to receive, I set the timeout very long, result=CWSerial.Read

Run the program on both computer, one read one write, I want the read PC can get something. But Not. Why??

Thanks!

Kevin
0 Kudos
Message 1 of 4
(3,203 Views)
You may be using the wrong kind of cable. You need to be using a NULL modem cable to communicate directly between machines not a normal serial cable. See our knowledgebase here.

If you are using a NULL modem cable is should work. It worked for me.

Best Regards,

Chris Matthews
National Instruments
Message 2 of 4
(3,203 Views)
Hi Chris,
Right now I use null modem cable, I can send file one PC to the other use hyper-terminal. I wonder how to use CWSerial to program send and receive on both PC? I try the old, still not work. Thanks!
0 Kudos
Message 3 of 4
(3,203 Views)
It worked fine for me. I used the BasicSerial.vbp example program from examples\instr\BasicSerial.

1) Open this example on both machines
2) Press configure on the writer machine
3) Press configure on the reader machine
4) Type in a message and press write on the writer machine.
5) Press read on the reader machine and you should get the buffer.

Remember, you have press configure in both applications first (before writing) since configuring the serial port will clear the serial buffer.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 4 of 4
(3,203 Views)