LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LiCor Serial Read Errors - hex 0xBFFF006c

Solved!
Go to solution

Hello All,

 

I've been trying for the last few days to develop a serial VI to read the data from a LiCor-820 CO2 gas analyzer. I know what is sent to the device to request it to send the data back to the computer and how to parse that data once it gets back. The settings in its manual are Baud:9600, Data Bits:8, Parity:None,Stop Bits:1, and Flow Control:None.  I've been having problems with the hex 0xBFF006C -"An overrun error occured during transfer. A character was not read from the hardware before the next character arrived." In the Basic Serial Write/Read vi provided with labview, this error happens every time. In my own, which I've attached, I would get that error once every nine or ten times when run once each time. Sometimes the error would be present the first time I pressed run, but after I click OK, the next run would work fine until about the tenth time.

 

Overflow Error.PNG

 

Does anyone have any idea why this might be occurring? I really just need to be able to read the pressure, the temp, and the CO2 accurately as well as repeatedly without a problem. 

 

Much Thanks! Smiley Happy

0 Kudos
Message 1 of 29
(4,475 Views)

Attaching just the top level VI does no good. You have to attach all subVIs. They are separate files, remember.

0 Kudos
Message 2 of 29
(4,465 Views)

you're absolutely right. I'll attach all subs later this evening. Thanks for the quick reply.

0 Kudos
Message 3 of 29
(4,459 Views)

I believe this is the only sub VI associated with my top VI. Thanks again for your time.

0 Kudos
Message 4 of 29
(4,449 Views)

Adding this Bray Terminal output to help explain what the device is actually putting out. The lines that have the ack true after them are the results after the machine is queried.

 

terminal response of licor.PNG

0 Kudos
Message 5 of 29
(4,429 Views)
Solution
Accepted by topic author Cheeng

Ok. So I solved my problem with a colleague at work, but it took an unfortunate amount of time. I think the attached VI will work a LiCor-820. I think you can fix the buffer overflow problems by putting everything in a while loop with an error handler. Basically, the error handler can prevent errors from displaying, and at the same time, it can also pass a stop or continue condition to the while loop. I chose to make it continue after clearing the read buffer until there wasn't an error. I incorporated a for loop because the data on the first run is usually just a partial read of the entire data passed from the LiCor. I know this probably isn't the most elegant solution, but it works for this situation so far.

 

Thanks for everyone's views and suggestions.

0 Kudos
Message 6 of 29
(4,418 Views)

Hello Cheeng,

 

I have the same problem then you have. I've looked a possible solution in forums for a long time and I've found nothing and I'll be crazy when the situation continue like that 🙂

 

I'm working with almost the same settings that you have whit the exception of the speed of the serial communication:

 

Baud:57600

Data Bits:8

Parity:None

Stop Bits:1

Flow Control:None

 

Because I don't have any flow control from my hardware (a robot) and I'm transferring continually, both from the robot and towards the robot, I think that can be the reason of my problem and that's why I'm receiving the error menssage that you've already described at first.

 

I've already seen and proved your attachments and I haven't had any result.

 

Could you help me to find a reason of the problem or any possible solution pleace?

 

Thanks!

 

0 Kudos
Message 7 of 29
(4,289 Views)

Hello,

 

Are you able to communicate with the device using VISA test panels in Measurement & Automation Explorer?

 

Best Regards,

 

Adam G 

National Instruments
Applications Engineer
0 Kudos
Message 8 of 29
(4,258 Views)

I wish I could be of more assistance, but sadly, I don't know too much about LabView. This was my first venture into the program, and I wasn't 100% successul. It works on my desktop computer, but on the computer in the lab, where it matters, it does not. I'm still going to investigate it more in the coming weeks, but I am a little discouraged myself.

 

Thanks for the reply.

0 Kudos
Message 9 of 29
(4,299 Views)

I will be able to try in a few days, but currently the device is being used at work.

 

I will post up when I get a chance to check. I was getting information off the device after I did a bit of playing with my code, but two different computers behaved differently. One worked with the code, and the other got the same error as before. I should mention that the problem computer is running labview 7 and the one that worked is running labview 2010. I rebuilt the code in 7 to be compatible with a computer at work.

0 Kudos
Message 10 of 29
(4,249 Views)