LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Why am I getting echo back from RS485 communication?

I wrote a RS485 communication program in LabWindows/CVI 6.0 using a USB to RS485 converter. The comm port is set to COM4 and the RS485 is set to 2 wires mode. The code below shows my comm port setup and Read / Write instructions:

int setCommPort (void) {
DisableBreakOnLibraryErrors ();
OpenComConfig (4, DEVICE[4], 115200, 0, 8, 1, 512, 512);
SetXMode (4, 0);
SetCTSMode (4, 0);
SetComTime (4, 2);
return 0;
}

FlushOutQ (acsport);
ComWrt (acsport, commandsend, 8);
Delay (0.1);
rcvlen = GetInQLen (acsport);
ComRd (acsport, rcv, rcvlen);


Every time when I read the rcv buffer, I always get the message that I send. I ran the sample RS232 program "serial.prj" and it works fine. In the sample progra
m, I will not get my send data unless I set the "ECHO" switch on my USB converter to ON.

Could somebody tell me what other setup parameters should I use to prevent the echo data getting into the receive buffer?
0 Kudos
Message 1 of 3
(9,384 Views)
There can be 3 possible causes for your "problem".

1. Your USB/485 convertor is set up to echo back all the commands send to it.
2. Your serial device is set up to echo back all the commands it receives.
3. Your wiring is wrong and the tx and rx lines are connected to each other on the serial port.
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 2 of 3
(9,384 Views)
Thank you for answering my question.

I found that if the COM port transmit buffer was set to the slowest setting. The echo disappear.
0 Kudos
Message 3 of 3
(9,384 Views)