LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

viParseRsrcEx does not return alias string

After I saved alias names in MAX, I'm using the following code to extract instrument alias:

           // find next instrument:
           status = viFindNext (findList, instrDescriptor);  /* find next desriptor */
           // parse found instrument information:
           status = viParseRsrcEx (defaultRM, instrDescriptor, &intfType, &intfNum, rscClass, rscExName, rscAlias);

For some resources, the rscAlias string shows what I configured in MAX, for some it's an empty string.

Even though I typed the alias name and saved MAX configuration, and even reloaded MAX and restarted computer few times.

Nothing helps.

Please help!

 

Thank you

ALH
0 Kudos
Message 1 of 8
(4,996 Views)

Hey Alex,

 

What version of VISA are you using and also which version of CVI? This may help narrow it down a bit. If you don't have a newer version of VISA, it may be beneficial to download that and give it a try. 

Rob S
Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(4,975 Views)

@HeroOfHyrule wrote:

Hey Alex,

 

What version of VISA are you using and also which version of CVI? This may help narrow it down a bit. If you don't have a newer version of VISA, it may be beneficial to download that and give it a try. 


I'm using the latest VISA 14.0

As far as CVI, I program on my computer using CVI 2013 SP2, and on target computer using remote debugging (where the problem appears), I'm using CVI Runtime 2013 SP1.

You think the CVI SP diiferences may cause that?

I hope so, that's an easy fix...

 

thanks,

Alex

ALH
0 Kudos
Message 3 of 8
(4,972 Views)

If you are able to upgrade to the SP2 on the remote machine, I'm sure it would help. Not sure if that will fix this, but it's worth a shot. I'll see if I can find anything else that might help as well. 

Rob S
Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(4,951 Views)

I've updated everything to SP2 and still the same issue.

viParseRsrcEx returns empty string in rscAlias.

I noticed another interesting phenomena though...that when executing the same viParseRsrcEx function in different places, rscAlias does contain the alias given, for some instruments, and for some not. For example: I query different types of instruments on my system and read their aliases for further operation. What I noticed that for power supplies, scopes and TCP (networked) based instruments, returned alias string is empty regardless of what I do, but for other instrumens, such as DMM's, SMU's, DAC's and even COM ports (ASRL's), alias string is there.

 

Alex

ALH
0 Kudos
Message 5 of 8
(4,943 Views)

Alex,

 

I was able to find an example of how to get the Alias information that may be of some use to you. In the NI-VISA help manual on page 4-5 there is an example that you should be able to just copy/paste. I'll include the link to the document here for reference.  

Rob S
Applications Engineer
National Instruments
0 Kudos
Message 6 of 8
(4,919 Views)

@HeroOfHyrule wrote:

Alex,

 

I was able to find an example of how to get the Alias information that may be of some use to you. In the NI-VISA help manual on page 4-5 there is an example that you should be able to just copy/paste. I'll include the link to the document here for reference.  


Thanks Rob,

 

I'm aware of this example. However my s/w architecture based on viParseRsrcEx function (that doesn't work).

I'll check if I can change the s/w and implement the logic as per example, and will get back to subject if anything happens.

Still, the issue with viParseRsrcEx remains unresolved.

Funny, but this whole VISA user manual doesn't even mention the viParseRsrcEx function....

ALH
0 Kudos
Message 7 of 8
(4,914 Views)

Alex,

 

If you need further support with this you can contact an Applications Engineer at NI by opening a service request. You can do this by going to ni.com/support and creating the service request. Unfortunately I'll be out of town for the next 2 weeks, so they could probably help you more. 

Rob S
Applications Engineer
National Instruments
0 Kudos
Message 8 of 8
(4,872 Views)