06-22-2010 06:23 PM
I am using a PXI-2527 and I have a need to change the topology during the test. I would like to be able to get the current topology and compare it with what I need for that test. That way I only change it if needed. I have looked through all the available VIs and property nodes but can not find one that returns the current topology. Is this available?
06-23-2010 04:12 PM
Hi dirque-
Here is a KnowledgeBase article that discusses how to do this. It specifically mentions how to do it in text-based programming, but the VI you would use in LabVIEW is niSwitch Initialize with Options.vi. Here is the explanation from the LabVIEW Help pages:
"Returns a session handle used to identify the switch module in all subsequent NI-SWITCH calls and optionally sets the initial state of the session.
This VI creates a new IVI instrument driver session for the switch module specified in the resource name. If multiple topologies are valid for that device, NI-SWITCH uses the default topology specified in MAX. The topology is also configurable in option string."
I hope this helps. Best of luck with your application!
06-24-2010 05:53 PM
No, that does not help.
I want to find out what the current topology is, not set one. The goal is to save time by NOT re-initializing the switch unless I have to change the topology. That vi, which I am already using, always sets a new topology.
06-25-2010 03:27 PM
dirque-
My mistake, I thought you were trying to do something more difficult than what you are actually trying to do.
The current topology is set with the niSwitch Initialize with Topology.vi. It has an input string that enumerates the topology for the switch. That is the current topology. Why don't you just take that topology input string and compare it to a string that contains the topology name that you need? Then you can change the topology using the VI I referenced above.
06-25-2010 04:17 PM
There is no way to read the current topology that is set. Or at least that I know of. Maybe there is some secret property node that could return this value.
Create a variable to store the current topology enum. When you set the topology, store it into the variable. Now you have something to compare against. You could use a Global or a Local, or even a shift register to store the topology.
06-25-2010 04:34 PM
I spoke too soon. There is a property node that returns the currently set topology. The property you are looking for is Inherent IVI Attributes -> Advanced Session Information -> Driver Setup. This returns a string of the topology setup.