LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with rs232 communication on a device (recieved the command I transmitted).

Hello,

 

I have a device that has a serial communiction.

The format of the communication is : "themassage" and \r at the end.

baud rate=115200.

 

When I try it with hyperterminal it works good.

When I try it with CVI rs 232 library I recieved the command that I sent.

 

Here is an example:

 

the command is "iquid\r"

 

hyper

 

cvi1.JPG

 

 

Thank you.

0 Kudos
Message 1 of 4
(4,356 Views)
Hi,

You receive what you send because the device echoes your commands back to you.
If you are expecting a reply, you can read it after you read the echo.

Hyperterminal normally displays only what it receives, not what you type.
If you can see what you type then it means the device is echoing your command characters.

Hope that makes sense..
S. Eren BALCI
IMESTEK
0 Kudos
Message 2 of 4
(4,346 Views)

Understand.

 

Thanks.

0 Kudos
Message 3 of 4
(4,335 Views)
I just noticed you attached some screenshots.
In ComRd call you entered 1000 as the number of bytes to read.
This is long enough to read the command you sent and the device's response.

If you look carefully to the tooltip, there is an opening (") character but no closing ("). I think it is because of the newline characters. If you click on he tooltip and hit the down key on the keyboard you'll the rest of the buffer.

If you want to read line by line I recommend you to use ComRdTerm.
You probably experience some delays (around 5 seconds) before ComRd returns.
This is because you wanted to read 1000 bytes and there are not that many bytes on the bus coming from the device, so the functions waits till the end of timeout period.

Regards,
S. Eren BALCI
IMESTEK
0 Kudos
Message 4 of 4
(4,330 Views)