10-14-2008 10:33 PM
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:
http://zone.ni.com/devzone/cda/tut/p/id/4562.
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
10-14-2008 11:40 PM
PS:
the code I had meantioned is a part of niSwitch.vb.
10-15-2008 08:48 AM - edited 10-15-2008 08:50 AM
Hi C.,
Verify the resource descriptor in the program is identical to the resource descriptor in MAX.
Program Resource Descriptor:
MAX Resource Descriptor:
Hope this helps!
Chad Erickson
Switch Product Support Engineer
NI - USA
10-15-2008 08:55 AM - edited 10-15-2008 08:56 AM
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)