Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Errors in Creating Virtual Channel

I am creating a IVI switch driver. The driver passes the IVI Specific Driver Suite 2.2 and IVI Switch SFP testing. When I try to create the virtual channel the device is found (created IVI Logical Name and other fileds) but the channels displayed are empty on the Channels/Exclusion tab. What calls are made when creating the virtual channel? I want to create a CVI or TestStand program to simulate the sequence that Switch Executive performs.

When validating a configuration, are all possible channels used in SetPath loop? As an example, if three channels are defined (Front, rear, & base) but only the front->base, rear->base, base->front and base->rear are valid configurations. Will the vaildate try a front->rear configuration? Will a disconnect call be placed in between each SetPath call?

Thanks.

Randy
0 Kudos
Message 1 of 4
(7,309 Views)
Randy,

When you are referring to virtual channel I am assuming you mean Switch Executive Virtual Device.
We have published an application note where we highlight the process to follow to develop a IviSwtch compliant driver to work with Switch executive: http://zone.ni.com/devzone/conceptd.nsf/webmain/8314C4E7CE0D749686256F4A00819A61

When validating a configuration SetPath is only called on routes that are configured, Disconnect is called between each setPath. If you are trying to create a route between 2 endpoints in the route/route group tab, we call canConnect to find any possible routes.
0 Kudos
Message 2 of 4
(7,299 Views)
Hi Guy,

Yes I meant NiSE Virtual Device it was areally long day. I have reviewed that app note repeatedly. I have followed everything in the note to the letter as well as passing the ICP tests. The problem is that when Switch Exec doesn't error out then you are blind. Unlike in TestStand where I can step into the source code, this option doesn't exist for NiSE so that is why I need to know the sequence and calls that it makes so that I can duplicate the sequence to see if I can find the errors. The device works with every IVI wrapper (LV, CVI, TestStand, IVI SFP) except NiSE.

I am left in the dark without the sequence info or a way to step into the code from NiSE.

Thanks.

Randy
0 Kudos
Message 3 of 4
(7,294 Views)
Randy,
Although you cannot step through the NISE engine, you can step through your driver's code and debug its behavior. If you have problems with importing IVI virtual name into switch executive virtual device, then what you need to do is select nimax.exe as the process to debug and run it with the debug version of your driver. If you were using CVI, you can set the external process under Run>>Select External Process. If you're using MSVC, you can choose "open project" and browse to nimax.exe and then add symbols for your driver DLL in the project settings.

The entry points to monitor (for your particular problem) are the ones that deal with getting the number of channels and getting individual channel names and their attributes. Make sure that your driver returns the correct number of channels and that it also returns all these channel names correctly. If you see no error in switch executive (I.e. it just says OK after you import your ivi logical name), then my guess is that your driver returns 0 for the number of channels.

Please be aware that switch executive exercises much more than any of the IVI clients you mentioned. Yet it does not go "through the back door" for anything, it (obviously) uses public entry points in the driver to perform what it needs to do.

So, you can start by setting up debug project in your favourite environment, and check the behavior of the following functions in your driver:
getting the IVISWTCH_ATTR_CHANNEL_COUNT attribute
IviSwtch_GetChannelName (with your prefix, of course)

and see if those work. My guess is that something is not working correctly between these two functions.

Let me know

-Serge
0 Kudos
Message 4 of 4
(7,286 Views)