LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial com configuration

Hi,

 

My Labview program need to fix a com port for my UUT (unit under test). But the problem is, every single UUT when

connected to my PC, it is allocated with new com port.

 

To explain my problem, for example, when i finished test my 1st UUT with COM8, then the 2nd UUT will be allocated with COM9, because window is saved COM8 is use for my 1st UUT, as attachement.

 

Is that anyway can solve this problem? Or can labview list out the latest detected com port? Thus i can select it and use for my program.

 

Appreciate your feedback.

 

Thanks.

 

 

0 Kudos
Message 1 of 3
(2,333 Views)

Hi TanTan,

 

Perhaps give the Find VISA Resources function a try.  It should detect and return a list of COM ports, as well as other resources such as GPIB.

 

If I recall correctly, you can even pass in a filter string so it returns, say, just the COM ports.  That would be an easy filter to write or post-process on the returned array if that turns out not to be a feature, and we can help with that too if you're having trouble.

 

Hope this helps!

 

Best,
JLS
Sixclear
0 Kudos
Message 2 of 3
(2,314 Views)

TanTan-

 

If I understand your issue correctly you want new devices to install at a specific COM port number (or VISA Alias) on a Windows system.

 

There are ways to do this with LabVIEW - but are not for the faint of heart!  CAUTION! you will be editing the Windows registry!  You will need adminstrative access on the PC.

 

Specific Hardware is associated with a COM resource in the HKEY shown below.  LabVIEW does have a Windows Registry access Palatte (Windows edition only of course) to programatically interact with the Registry keys. 

 

untitled.PNG

 

I would definately recommend that you start by READING the keys and testing the format of any thing you want to adjust by writing to a file BEFORE you even attempt writing to the registry.  AND BACK UP your development system FIRST (so you can recover if you write a bug). 

 

You may wish to co-ordinate with your IT department to learn more about interacting with the windows registry.


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 3
(2,304 Views)