Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

The NISwitch driver function is returning some garbage value.

Hi,

Thanks for your support.

I tried like what you have suggested that is i am freeing the library each time.

I am freeing the library only at the end.

But then also it is giving that error.......

Please suggest some solution for this..........

Regards,

Harika.

Bangalore.

0 Kudos
Message 11 of 18
(5,059 Views)
Hi,
I also included niswitch.fp in CVI project.It is not showing any pop up dialog box.
 
Regards,
Harika
0 Kudos
Message 12 of 18
(5,058 Views)
Hi Harika,

when you say that you've inclued niswitch.fp in your project, did you also replace the calls to your function pointers with the niSwitch API calls?

Did you try the CVI example?

What I'd like you to try is one of the examples, make it work (i.e. get the resource name and topology parameters right). and then apply the same values for the resource name and the topology to your code. These two are the parameters often mistakenly passed into the Init function.

best regards,

0 Kudos
Message 13 of 18
(5,054 Views)

Hi,

I have tried with that CVI example:niSwitchControllinganIndividualRelay

It is giving error:missing prototype for niSwitchCheckErr

Regards,

Harika

0 Kudos
Message 14 of 18
(5,049 Views)
niSwitchCheckErr is defined in the niSwitchErrorHandler.h
You should open the example project, e.g. c:\program files\ivi\driver\niswitch\niSwitchControllingAnIndividualRelay\niSwitchControllingAnIndividualRelay.prj

That project has correct include paths and niSwitch.fp already added to it, it is ready to run.

Try again and let me know how it went.

The next thing to try would be to double-check the device name for your 2532 (you can look into Measurement and Automation explorer to find the switch under DAQmx Devices) and verify that the name you pass in for the resource name is matching the name in MAX.

best regards,



Message 15 of 18
(5,041 Views)
Hi Harika,
 
Please let us know if you still have any problems running niSwitchControllingAnIndividualRelay.prj.
 
The only system-specific information that should be changed are the following values:
 
ViRsrc resourceName = "<Resource Descriptor (DAQmx Device name in MAX, i.e. Dev1 or PXI1Slot2)>";
ViConstString relayName = "kb0r0c0";
ViConstString topology = NISWITCH_TOPOLOGY_2532_1_WIRE_4X128_MATRIX;
 
Once you have the example working, try using similar values in your application.  Let us know if you have further questions or if this does not fully resolve your issue. 
 
Thanks!
 
Chad Erickson
Switch Product Support Engineer
NI - USA
Message 16 of 18
(5,037 Views)
Hello Harika,

Today is the 4th, and I sure hope you either got it to work or your deadline has been extended! (Being a fellow engineer I realize that deadlines are sometimes moved.)

I sure hope that it is the former that is the case, but just in case you still haven't been able to make it do what you want it to do, please do not hesitate to ask more questions. I'm sure that we'll be able to help you make it work.

best regards,

-Serge
0 Kudos
Message 17 of 18
(5,023 Views)

Hi,

My problem is solved

Thanks for your support.

Regards,

Harika.

 

0 Kudos
Message 18 of 18
(5,003 Views)