LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rs232 so slow, why?

Hello
 
I'm using a serial Visa at 128000bps. I'm using a handshake thats working like this: I send a char from Labview to the Pic with Visa write then the PIC responds with 5 bytes of data that are read with a Visa read. The problem is that I need  a better sampling rate, right now the PIC is sampling at 96us and Labview is taking 62ms with the write-read-display cycle. So im loosing too much data.
How can I solve this problem?
 
Thanks in advance.
 
 
0 Kudos
Message 1 of 6
(4,815 Views)

"write-read-display "

Have you tried without the "display" part?

If it works better you should chase down a producer consumer design pattern to sepearte the I/O from the GUI.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 6
(4,808 Views)
Hi Ben, thanks for your reply.

The display part is only a wire connected to a waveform chart/graph. Yes, I've tryed without the waveform and the processing time continues above 60ms. There's something to increase the speed of loops?

Thanks.
0 Kudos
Message 3 of 6
(4,805 Views)
Hi RPalma,

move the code where you set the baud rate outside the while loop. You'll only have to set this once. Also try to code  a little tidier, use left to right  coding style.  And if you have to read faster, isn't it possible to read more than one sample at a time?

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 6
(4,802 Views)
Hi TonP, thank you for your reply. I will do what you've said about the baud rate. The code is a bit messed up because I had to rearrange to fit in the snapshot.


0 Kudos
Message 5 of 6
(4,799 Views)
Hi
I need some help about rs-232 communication. I want to make a vi witch can do this things:
-read a txt file (to simulate a serial port like when the datas are coming)
-write in a txt file or draw in a diagram (or both)
if anybody can help pls HELP ME because im a beginner in this problem.
I already do something but Im not sure that good.
Thx for all.
0 Kudos
Message 6 of 6
(4,788 Views)