LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview 5 serial communication

Hello Board

I am working on a project with LabVIEW 5 (BridgeVIEW) for a customer. He is not willing to upgrade so I have to use the old LabVIEW. In this software I am controlling to process controllers via RS-232 (read/write). I am using the old serial drivers. Now the read/write process is only working when I do a initialization of the serial port in every loop.
The problem is that the software crashes after running between 4 and 8 hours. It is connected to the serial communication, because when I run a version without the serial communication, the software does not crash. I think the problem lies in the initialization in every loop. But without it's not working.
I experianced problems with the old serial drivers before so I am using the VISA serial drivers normally. For me it seems that the VISA drivers for serial communication are not integrated in Labview 5, or?

I would be very grateful for help on this topic.
Best regards
Dermot
0 Kudos
Message 1 of 6
(2,846 Views)
I use Labview 5 to support some older projects with serial comms
If you could post a sample that fails I could donate some test hours on a computer for you.

Normally I don't have problems with the serial comms on Labview 5

What OS are you running, I guess if they won't upgrade the software it is old systems as well?
0 Kudos
Message 2 of 6
(2,837 Views)
What OS are you using? I have successfully used the LV5.1 serial port VI's on a couple "legacy" projects and have had better results under Win98 than Win95. Remember, the old serial port VI's call the Windows 3 style API's, meaning that they run on the UI thread. This can lead to unexpected interactions with other parts of your code.

Also, you mention that you must repeat the serial port initalize function for every iteration. I've never found that necessary. (In fact if you drill into the underlying code I think you will find a test for existing initialization condition using a global.) Are you also calling the serial port close function at the end of each iteration?

Yes, the VISA serial port functions are more robust and better behaved, but the old Windows API based functions can still work assuming there are not a lot of other demands on system resources.
0 Kudos
Message 3 of 6
(2,821 Views)
See if the Read/Write Bufers are Flushed (there is a command for that) before the string command is sent.
I had a similar problem 4 years ago.
The program used to freeze (not crash) after running for some hours. Flushing the buffers fixed the problem.
Message 4 of 6
(2,807 Views)
Hello
thank you very much for your replies.

First, the operating system is Win2000 and modern hardware. It just the BridgeVIEW (Now called supervisory and controll kit) which will not be upgraded...

Without initialization in every Cycle one of the Com ports does not respond anymore after a while. The other one continues functioning.

I will try the flushing of the buffers after every cycle now, because LabVIEW freezes after a few hours. So, hopefully I get the same results 🙂

Best regards
Dermot
0 Kudos
Message 5 of 6
(2,795 Views)
Hello,

I have tested the software now and it works with flushing the buffers. No mor crashes.
Many thanks for th esolution.

Best regards
Dermot
0 Kudos
Message 6 of 6
(2,752 Views)