LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

disable/enable the serial port

Solved!
Go to solution

Hello All,

I am using Labview to communicate with a Microchip PIC virtual serial port. Ocassionally the serial comms is lost. To recover the connection I open Device Manager then right click the faulty comm port then select disable ( a red cross appears on the icon). Next right click the port again and select enable. The port now communicates correctly again.

 

Is there a way to use System Exec to drive this behavior automatically once a fault occurs or some other method to drive DM using methods and properties?

 

Many Thanks

 

Chris

0 Kudos
Message 1 of 3
(3,896 Views)
Solution
Accepted by topic author CB
There's a commandline tool called "devcon" that offers the same functionality as device manager, just from the commandline.

0 Kudos
Message 2 of 3
(3,877 Views)

Thanks for that, I am surprised at how simple it is to use DevCon however I still dont understand why cant I detect when the serial port fails.

Excellent workaround though

0 Kudos
Message 3 of 3
(3,833 Views)