LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected termination of the VI after accepting 3 lines of values from a serial port transmitting continuous data.

Solved!
Go to solution

Hello,

 

I am currently working on data acquisition from a Hairball 2 unit installed with a Zilla Controller on an electric vehicle. The hairball lets other devices communicate to the unit via a serial port. The DAQ option to displays information like speed, voltage etc. 

 

I use Teraterm, a terminal communicator to start the communication with the hairball device. After navigating through the various menus, I can access the DAQ feature which provides continuous data of the status of the various components of the vehicle. I saved the log file from teraterm (Teraterm - Results.txt). 5B 01 0B C8 03 53 02 39 27 OMFS for example is a sample data from the DAQ module. 

 

When the serial port is configured to send out such data, I close the Teraterm program and run the LabVIEW VI (Serial Read and Write.vi). It accepts 2-3 rows of data (LabVIEW Error - In Motion 2.jpg) and then stops. I know there is an error message involved, but I think its regarding storing the information in the file (that is another problem I need to solve, the file is always empty).

 

Could anyone please help me with this problem. Why does the software terminate execution after just 2-3 loops. Sometimes it starts accepting the data from the middle (@ 1 0B C8 03 53 02 39 27 OMFS for example) and stops after displaying it. 

 

If there is any information required please do let me know.

 

Thanks in advance.

0 Kudos
Message 1 of 4
(3,985 Views)
Solution
Accepted by topic author Akhil Kumar

The error you are getting is:

 

1073807252 VI_ERROR_ASRL_OVERRUN An overrun error occurred during transfer. A character was not read from the hardware before the next character arrived.

 

Your buffer is probably overflowing with data.

 

See here and here for possible solutions.

http://www.medicollector.com
Message 2 of 4
(3,978 Views)

Hey Josborne,

 

Thanks for the insight. In my case, I am pulling data out of a serial port on a controller. How would I be able to change the number of values being accepted by LabVIEW? I am sorry, but I am a bit new to the software.

 

To reiterate, how can I reduce the number of samples coming from the serial port or just accept 1 sample every second/every 5 seconds etc and discard the rest?

 

Thanks.

0 Kudos
Message 3 of 4
(3,951 Views)

Hi Josborne,

 

I went through the links provided by you, but I was not able to find of an effective solution for the problem. 

I am unable to change the output from the DAQ device. In fact, the DAQ device has no controls what so ever. So all the adjustments required needs to be done in LabVIEW.

 

I have reposted the question with the latest VI in use and the error message. I have also posted a sample output file retrieved from the vi (before it automatically stops in around 25 seconds) in .xlsx (converted from .tdms).

http://forums.ni.com/t5/LabVIEW/Termination-of-the-VI-after-about-20-seconds-of-accepting-values/td-...

 

If you have any insight with regards to this problem, do share it with us.

 

Thank you.

0 Kudos
Message 4 of 4
(3,885 Views)