From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

the question about serial port

I'm doing the run of the mill check # of bytes then read all available. Everything goes along fine for minutes at a time. Then all of a sudden I get 4096 returned to me from the Bytes at Port property. During "normal" operation Bytes at Port stays <500.

What's the significance of 4096? I'm setting my receive buffer to 1024. Yes, my VI is very memory intensive and my data rate is high (baud=115200, 200Hz, packet length=42 chars) but sometimes it runs for 20mins without this occuring.

I want to konw this why??Who can help me???
 
THANKS
0 Kudos
Message 1 of 4
(2,588 Views)
Do the serial IO subVIs return any errors? Can you post the code?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 4
(2,580 Views)

I can only venture a guess.

Either there is a lot of noise on the line that is being seen as characters or your VI is not getting back to the port fast enough to get the data.

Look at the data to see if it is garbage (noise on line) or watch you Task Manager to see if your application is being preempted by other tasks runing on the machine.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 4
(2,566 Views)

Hi, I got a problem when reading the serial port.  Normally, when data is comming in with delays between packets it is ok (I can read every strings).  But when the data scrambling in at a fast pace, all I got is garbage (except some time I can see section of the strings I'm supposed to get). 

 

In the 2 scenarios, the parameters of the com port are the same i.e. 115200 / 8 / no par / 1 stp / no ctrl. 

 

Any hints?

 

I use LV8.6

 

thanks 

 

FB

0 Kudos
Message 4 of 4
(2,332 Views)