LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Restarting a given COM port

Solved!
Go to solution

Hi,

I keep loosing communication with an instrument randomly. Sometimes data acquisition works trouble free for days , sometimes for a couple of hours. After I've lost the communication i must restart both the PC and the instrument.

Can i force a specific COM port to restart run-time in labview? I am using an RS232 DB9 connector with shielded cable of length 1 meter.

Have you got any ideas how to solve this technical issue?

Kind regards,

Balázs

0 Kudos
Message 1 of 6
(1,948 Views)

What do you mean by restarting the COM port? You can close it by calling VISA Close and then open/configure it again. Do you keep the port open all the time while the program is running? Any error when the communication is lost?

Lucian
CLA
0 Kudos
Message 2 of 6
(1,922 Views)

Yes, opening and configuring it again does not help. Please visit this topic to see the errors.
https://forums.ni.com/t5/LabVIEW/Communication-stucks-with-Ketihley-2700-data-logger/td-p/4021341

0 Kudos
Message 3 of 6
(1,880 Views)

At any point does your program go into a idle state for a period of time? Are you using a serial to USB converter?

 

It would help us if you uploaded your VI too.

0 Kudos
Message 4 of 6
(1,870 Views)
Solution
Accepted by topic author LTBALAZS

@LTBALAZS wrote:

 After I've lost the communication i must restart both the PC and the instrument.



Yikes! Assuming that the SW is written correctly, this might indicate a ground loop or ESD problem. Or maybe a power problem? Have you try using a laptop?

Another thing to try is to throw away the Keithley supplied instrument drivers and code up your own.

BTW. It is very hard to troubleshoot intermittent problems like yours.

 

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
Message 5 of 6
(1,864 Views)

Hi, it was ground loop problem.

0 Kudos
Message 6 of 6
(1,791 Views)