07-27-2010 04:05 PM
I am cloning a PC to replace it, so the new PC must have the hardware clone setup of the old PC. It needs ASRL15::INSTR set to COM15. Instead COM15 is ASRL18::INSTR whenever I open up MAX version 4.5.
How do I clear up ASRL15::INSTR (NOT SHown in MAX) and bind it to COM15!!! Is this possible using MAX?
07-27-2010 04:24 PM
With VISA, 'Com-anything' is just an alias. You can assign any alias you want in MAX (i.e. Com15). You can also go into windows device manager and change the port. You could also write your program to detect all available com resources and use the port that is actually connected to your instrument.
07-27-2010 06:29 PM
An Alias is not the issue. The software is not changeable at this time. I must setup the hardware identical to an doner PC.
VISA selects or sets-up the ASRL# ::INSTR number that persist even if the port is deleted. This prevents me from manually swapping port number and Alias.
How do I make my COM15 -> ASRL15::INSTR and make my COM10 -> ASRL10::INSTR. My current setup is COM15 -> ASRL18:INSTR and COM10 -> ASRL11::INSTR. These setting prevent the code from running on the cloned PC.
Here's a paste of the report:
COM15 |
---|
Property | Value |
---|---|
Resource Name | ASRL18::INSTR |
Device Type | Serial Port |
VISA Alias on My System | COM15 |
Device Enabled | True |
Port Binding | COM15 |
Baud Rate | 9600 |
Data Bits | 8 |
Parity | None |
Stop Bits | 1 |
Flow Control | None |
COM10 |
---|
Property | Value |
---|---|
Resource Name | ASRL11::INSTR |
Device Type | Serial Port |
VISA Alias on My System | COM10 |
Device Enabled | True |
Port Binding | COM10 |
Baud Rate | 9600 |
Data Bits | 8 |
Parity | None |
Stop Bits | 1 |
Flow Control | None |
COM11 (LPT1) |
---|
Property | Value |
---|---|
Resource Name | ASRL10::INSTR |
Device Type | Parallel Port |
VISA Alias on My System | COM11 |
Device Enabled | True |
Port Binding | LPT1 |
07-28-2010 01:18 AM
So you have a hard-wired COM-Port (ASRL::xxxx) in your code which you cannot change?
This is a reason why such hard-wired settings are nearly always a bad idea.
Does tge program try to open "COM15" or does it try to open "ASRL15::INSTR". It's a world of difference. If it uses "COM15" then what Dennis described WILL work.
Shane.
07-28-2010 09:26 AM
@Intaris wrote:
So you have a hard-wired COM-Port (ASRL::xxxx) in your code which you cannot change? no the code uses index numbers that call out a come port (comxx). I'm not the author, its working code that not worth manipulating, company restrictions.... get it.
This is a reason why such hard-wired settings are nearly always a bad idea. no information here, just trivia as you put it.
Does tge program try to open "COM15" or does it try to open "ASRL15::INSTR". It's a world of difference. If it uses "COM15" then what Dennis described WILL work. It does use a COMXX. You cannot recreate an Alias thats name after an existing alias (COM10, COM15). The problem: Notice the printer (LPT1) occupies COM10, but the original PC COM10 IS ASRL10::INSTR.
Shane.
My original question is not yet addressed. I don't want another alias name to put in the poorly written LV code. Anybody???
07-28-2010 09:40 AM - edited 07-28-2010 09:45 AM
richjoh wrote:
no the code uses index numbers that call out a come port (comxx). I'm not the author, its working code that not worth manipulating, company restrictions.... get it.
First of all, let's get something straight. I'm a volunteer trying to help you (somebody I never met or likely ever will) solve a problem. You have half-described the problem and I'm doing my best in my own non-National Instrument employee time to solve it for you. If you don't adopt a more friendly tone then you can basically get lost and find some other sap to solve your problem for you.
no information here, just trivia as you put it.
Bad attitude will reap you no benefits here.
It does use a COMXX. You cannot recreate an Alias thats name after an existing alias (COM10, COM15). The problem: Notice the printer (LPT1) occupies COM10, but the original PC COM10 IS ASRL10::INSTR.
Without wanting to come over all condascending.... Have you ever throught of renaming COM10 to something else before trying to create a duplicate alias. Rename the offending port to "RESPECT", rename the port you need to that alias and then re-re-name the "RESPECT" port back to whatever you like. Make sure to save the changes for each port individually as you're going along.
My original question is not yet addressed. I don't want another alias name to put in the poorly written LV code. Anybody???
Your original question HAS been addressed, but you've not realised it yet. Luckily many of us have enough patience to deal with this kind of stuff on a purely volunteer basis.
You're welcome.
Shane
07-28-2010 10:28 AM
And clearing aliases is simple. MAX>Software>NI-VISA. Then in the right side window, select My System>General Settings>Aliases.
And as I already mentioned, you can reassign the port in windows device manager. These are USB-RS-232 adapters, correct?
07-28-2010 04:56 PM
It was an 8 port serial adapter PCI causing the issue that conflicts with the LPT1 port. It appears, the PC motherboard bios assigns the LPT1 to COM10 (shown in MAX). LPT1 port cannot be setup as a serial in XP device manager. Thus, no communication on COM10 whenever LV reads/write on COM10.
After I swapped COM port number and set com10 PORT to COM something other than 10, the labview worked. The code reads an xml conf file for com settings (was not sure since notorious test benches here are hard coded...).
There is no way to assign asrl #, (I assume), you have to juggle COM Ports and watch out that printer ports are not occupying potential COM setups.
07-29-2010 03:38 AM
Correct, tha ASRL# you have essentially no control over (Unless somebody out there has some great insight on that).
The other names are all user-defineable. The standard windows nomenclature for ports (LPT1, COM1 and so on) have essentially no meaning in VISA. YOu can rename the ports as you see fit. You can rename a COM port to LPT1 if you wish to (though I can't imagine why).
Glad you got it working.
Shane.
06-11-2020 01:21 PM
I had a similar problem
I too, like the original poster needed to use the ASRL enumeration instead of the alias as I could not change existing software.
The problem was LP1. It at one point had taken the ASRL 10 resource name. Even if I no longer was using LP1 (I changed it to LP2)
NI MAX would not enumerate ASRL10 (which I needed)
The solution is to use this KB article: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PAT9SAO&OpenDocument=&l=en-US
To manually modify the visaconf.ini file using a text editor to delete the "stuck" resource being used.
Once it was deleted. NI MAX can now reuse it.