Switch Hardware and Software

Showing results for 
Search instead for 
Did you mean: 

IVI issue fo PXI 2532 based on VB.NET

I using PXI2532 based on VB.net programing to control the switch box.  I had posted another question ashttp://forums.ni.com/ni/board/message?board.id=320&thread.id=1362 before. That isuee had solved well.


But when I transfer my program code to another PC, I met another issue. I found a error as:



Public Shared Function ThrowError(ByVal handle As System.IntPtr, ByVal code As Integer) As Integer
            Dim status As Integer
            Dim size As Integer = PInvoke.GetError(handle, status, 0, Nothing)
            Dim msg As System.Text.StringBuilder = New System.Text.StringBuilder   
            If (size >= 0) Then
                msg.Capacity = size
                PInvoke.GetError(handle, status, size, msg)
            End If
            Throw New System.Runtime.InteropServices.ExternalException(msg.ToString, code)
        End Function
    End Class
End Class


There is a external exception in blue part. It says:

"Invalid resource name.    If the resource descriptor is an IVI name, it must match the entry in the IVI Configuration Store in a case sensitive manner. "


I try to run a NI exampl in VB.net http://zone.ni.com/devzone/cda/epd/p/id/4577.

There is a error in same code. It says

"Insufficient location information or the device or resource is not present in the system.    Common errors when initializing a session:  - Mismatch between the device and topology.  - Resource descriptor is a device that is not a switch.  - Chassis not powered on."


I check this page for help:


But  I can't used none of two method to deal with this, for

I can't add "niSwitch_32.dll" as a  reference cause I used VB.net.

I can't find measurement studio , instrument driver cause I'm unable to use measurement studio.


Does anybody have idea? PLZ help


0 Kudos
Message 1 of 4



the code I had meantioned is a part of niSwitch.vb.

0 Kudos
Message 2 of 4

Hi C.,


Verify the resource descriptor in the program is identical to the resource descriptor in MAX.


Program Resource Descriptor:


Program Resource Descriptor 


MAX Resource Descriptor:


 MAX Resource Descriptor


Hope this helps!


Chad Erickson

Switch Product Support Engineer


Message Edited by Chad PSE on 10-15-2008 08:50 AM
Download All
0 Kudos
Message 3 of 4

What does the Measurement and Automation explorer say your switch device name is? Does it match what you're passing to the initialize function?


(edit to add: what Chad says above)

Message Edited by Srđan Zirojević on 10-15-2008 08:56 AM
0 Kudos
Message 4 of 4