LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView freezes during COM to COM session

Hi there!
I'm using LabView 2012's basic VI "Send Command trhrough COM port" and "Read Command trhrough COM port" betweem two computers. One computer sends a number and the other one reads it and transforms to the next VI. Everything is worknig fine, but sometimes LabView just stop working: it freezes, I cannot even relaunch it, the whole computer is needed to be restarted. Usually it happens after about 3-4 hours of normal communication. What is weird is that happens not always, so it hard to reproduce the error to analyse it. I'm using the following machine: Dell, Vostro 3560, Intel R Core TM, i3-3120M, 2.5 GHz, 4 GB RAM, 64-bit Win7. Cannot figure out what is the problem. Do you think it can be related to the insufficient memory volume of the computer? or something else?

 

thanks in advance!

0 Kudos
Message 1 of 8
(3,047 Views)

Post your VI's.  Can you watch the resources in Task manager, see if you have increased CPU usage or ever growing memory?

 

Is it possible you are continuously opening resources and never closing them?

 

Is it always the same computer or do both have the problem from time to time?  Are they identical computers.

 

Seeing the VI's can help tell us where the problem might be.

0 Kudos
Message 2 of 8
(3,037 Views)

USB-RS232 adapters involved?

0 Kudos
Message 3 of 8
(3,031 Views)

Thanks for the reply!

I use the basic Write/Read serial vi from here http://www.ni.com/example/27669/en/

I did not see any strange when two computers are commucating: no overflow of CPU or memory (cannot say for sure though that usually the error shows up after ~4 hours if normal work)

Computers are not identical. I specified parameters above of the computer which are taking the command. The computer that send the command is older, but it working fine when the receiver PC freezes.

0 Kudos
Message 4 of 8
(3,024 Views)

Thanks for feedback!

No, pure serial. No additional adapters

0 Kudos
Message 5 of 8
(3,021 Views)

That looks a lot like the example that ships with LabVIEW  (but for some reason, I can't find it in LV2014 example finder.)

 

How are you using this?  Are you using it as is?  Because this is a one shot VI.  It runs, configures the port, writes, reads, closes the port, then is done.  It doesn't have any loop in it to keep it running.  I hope you aren't using the Run Continuously button.

 

Do you get any error messages like a timeout, or a buffer overflow?

 

You need to attach the real VI's that you are using.  You can't be using this as is because it is purely an example to demonstrate how to use the serial port.  It shouldn't be the basis of a long-running application.

0 Kudos
Message 6 of 8
(3,009 Views)

That is right, this basic vi is a part of the progam.

One computer just sends numbers (integer) simultaneosly with some step (using FOR loop) through the basic Write VI. Then the other computer read all inputs commands from the COM port (basic read VI) and sends the numbers to next VI which is actually controls my device (using the library from the manufacturer). I attached the vi of the second computer below.  

 

 

And I do not see any error which is weird. Sometimes LabView just crashes suddenly..

0 Kudos
Message 7 of 8
(3,005 Views)

I don't see any serial port communication going on in this VI.   I do see a lot of dll calls.  If this VI is the one crashing, I'd suspect dll calls long before I suspect VISA calls.

 

Note:  You don't need to do an = "0" comparison where the 0 is a separate constant.  There is already an "=0" function in the comparison palette that does it in one step.

0 Kudos
Message 8 of 8
(2,987 Views)