From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: labview not detecting COM port

My COM 6 is showing up in NI MAX and also in device manager. Is there any reason why there would be a connection issue? 

 

Kwan90_0-1591297021587.jpeg

 

Thanks in advance,

Kwan 

 

0 Kudos
Message 1 of 3
(1,684 Views)

Are you in any way connected to any of the previous posters in this thread?  Such as Ahed_123456

 

The original thread is from 2011.  Ahed was very recent, but seems to be a completely different problem.

 

If yours is a new problem, you should have started a new thread rather than hijacking an old one.

 

You say "Is there any reason why there would be a connection issue?"

But yet you failed to tell us what is the connection issue you are having.

Did you get an error message?

 

I see several problems with your code.

  1. Your while loop is running as fast as possible.
  2. I can't tell if you are sending a termination character with your Write command.  (I'm assuming you need to since it is a text based command and your serial port is set up to enable termination characters on read.
  3. You made the mistake of using Bytes at Port which is not required in 99% of serial communications.
  4. The mistake of Bytes at Port compounded with no wait after sending the command to give the instrument time to return a message.  I bet if you put a probe on the blue wire coming from Bytes at Port, it will show a 0 the first time you run this code.
0 Kudos
Message 2 of 3
(1,680 Views)

Ok, understood. Did not intend to hijack the thread but it looked like the previous problems has been solved and my connection issue is a variation of it.

 

Sadly, LabView fixed itself for now and I cannot get it to display the error message anymore. The problem was Labview said something along the lines of no connections were made with COM 6. I will make a new thread when this shows up again.

 

To use VISA read, it looks like it requires a Byte Count so that is why I used Bytes at Port, I'll make a thread for this with the updated changes you suggested.

0 Kudos
Message 3 of 3
(1,671 Views)