PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

viFindRsrc does not return PXI DMM

Hi,

 

I am developing a C++ application to control various PXI instruments, one of which is a PXI-4065 DMM.  Instead of hard-coding the resource names that will be used to initialize each instrument driver, I am using viFindRsrc to create a list of devices that are connected to the PCI bus.  I search through the list using viOpen, viFindNext, and viGetAttributes to find each device.  My program works, but the PXI-4065 DMM is not returned by FindRsrc.  Does anyone know why or have a workaround?

 

Thank you!

0 Kudos
Message 1 of 6
(4,058 Views)

Hi danzimmer,

        I've been looking into your issue and have a few questions for you:

  • Are you using an alias for the DMM?

                If you are using an alias, you may want to try changing the alias name to the actual connect sting name to find it that way.  Referencing a previous Discussion Forum, "You might want to use viFindRsrc in conjunction with viParseRsrcEx to match the resource name with an alias if it exists.  So, use one of the regular expressions in viFindRsrc to narrow down the resources you are interested in. Then call viParseRsrcEx and compare returned aliases to the one you are trying to match."

 

Thanks!

aNItaB

Applications Engineer

National Instruments

0 Kudos
Message 2 of 6
(4,035 Views)

Hi Anita!

 

Thanks for your reply.

 

I am using NI-VISA 4.4.1 and the NI-DMM 2.9 instrument driver.  These are all the latest versions and are supposed to be compatible with our DMM.

 

The system does not have an alias set up for any of the PXI devices, including the DMM.  The name of the DMM in MAX is PXI1::13::INSTR.

 

I am debugging my code on a PXI system that has a PXI-4060 DMM and two NI PXI switch modules.  My application will eventually run on a system that has a PXI-4065 DMM, but the system is still being assembled.  I developed my C code on a different machine and debugged much of it with a DMM set up in simulation in MAX.  When my program runs on the development machine, viFindRsrc returns 3 devices (COM1, COM3, and LPT1).  I assumed that viFindRsrc didn't see the DMM because the hardware wasn't actually installed - it was set up in simulation through MAX.  When my program runs on the system with the PXI chassis, viFindRsrc returns 4 devices (the two NI switch modules, COM1, and LPT1).  Now I'm wondering if viFindRsrc didn't return the DMM on my development machine because of a different issue unrelated to it being set up in simulation.  Do you know where viFindRsrc gets the data that is returned?  Understanding how the function works might shed some light on why it returns the two PXI switches but not the DMM.

 

Thank you very much for your help!

 

Dan

0 Kudos
Message 3 of 6
(4,030 Views)

Hey Dan,

       I was able to reproduce this, and it seems it's expected behavior.  The viFindRsrc works by calling the NI-VISA driver which then calls the associated VISA aliases.  There is a function in LabVIEW called the niModInst Get Installed Device Attribute which will display your DMM.  I am still looking into what the associate C++ code is for this VI and will get you some more information.  Have a great weekend!

aNIta

0 Kudos
Message 4 of 6
(4,016 Views)

Hi Anita,

 

Were you able to find any more information on this issue?  I don't understand why this would be expected behavior.  In my very humble opinion, viFindRsrc should find any device that can be accessed by VISA, and clearly NI's DMM can be accessed by VISA.  Why is this expected behavior?

 

Thank you very much!

 

Dan

0 Kudos
Message 5 of 6
(3,993 Views)

Hi Dan,

        I think this discussion forum exactly answers your questions: http://forums.ni.com/ni/board/message?board.id=232&message.id=7435&requireLogin=False.  Scroll down to about the 6th post to where pBerg replies.  Let me know if you have more questions after going through that.  Have a great weekend!!

aNIta

0 Kudos
Message 6 of 6
(3,973 Views)