LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

rs-232 comunication

Hi.

In my project I use the rs-232 comunication whith a microcontroller.
The microcontroller sends to computer a large quantity of information

using 19200 baud. I have used the multithread mettod to comunicate specialy

whith the microcontroller.

The microcontroller send to computer 900 bytes per second so I used a value

of 5000 for the input queque.

Normaly the transmision works very well, but there is a problem when I

start more windows programs (say 10 programs). In that moment the computer

loses some bytes (say 10-50). I have implemented a protection for this

problem so the microcontroller retransmits the information in case of lost

data.


I only whant to know if this is normal to happen and if so what could I do

to minimize this error.

Thanks.
0 Kudos
Message 1 of 3
(3,227 Views)
Hi,

The problem could be with the type of multi threading you are using now. Instead of using the User Interface timer controls for the multi threading, try using Async Timer or use multithreading by starting a new thread. When you use the User Interface Timer control it starts another thread on the user interface thread. So this could increase in your CPU usage. When you use the Async timer a new thread independent of the UI is run which depends on the windows multimedia timer. For more accurate multi threading and less dependency on the windows host try creating a new thread. Check out the examples of multi threading in CVI. Hope this solves your problem.

Regards,
Siddu
0 Kudos
Message 2 of 3
(3,199 Views)
Hello tmaxial,

You could also try the suggestions listed in the following post:

http://forums.ni.com/ni/board/message?board.id=180&message.id=12913.


Thanks!
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 3 of 3
(3,130 Views)