07-09-2012 08:13 AM
Can anyone explain whats going on here??
I went into MAX and gave all my ni switches ( MUX) aliases. This is under channel/exclusions tab. Under the Schematics tab is a column named route groups. I can give my relay connection ( like close relay 2) an alias here..like "Close Relay 2". If I click on relay 2 in the schematic it shows a connection between ch2 and com. Fine. Now when I go into Teststand >Properties TAb>switching>enable switching...I have the "Operation" "Connect". Is this redundant?? I already connected it when I called it. If its because Teststand doesn't know what I want when I call that particular alias will it "Disconnect" when I select Disconnect from the drop down??
Would you suggest I leave ALL my relays open in MAX and just "Connect" "Disconnect " them in Teststand??
Can you suggest what the other options should be if:
I want to connect 1 or more relays for this sequence, do some testing, then disconect those relays?? Is that Connection Liftetime?? So "Step"??
What is multimode and when/how do I use it??
Included a few screen caps
Thanks!
Clint
Solved! Go to Solution.
07-09-2012 11:38 AM
Hey Clint,
NI Switch Executive exists in both MAX and TestStand (and LabVIEW, etc). You can program individual routes in TestStand, or you can precreate complex route groups in MAX and then call those routes/route groups in TestStand. Say for example that you want to connect A to B, C to D, E to F, you can create a route group called "awesome channels" in MAX, then add the explicit connections to that route group (A to B, C to D, E to F). Now in TestStand you simply need to connect "awesome channels" and NI Switch Executive will do the rest.
While you can connect channels in MAX, the intent is that you create the route groups in MAX and then use those route groups in test stand (if for no other reason that TestStand is automated while MAX is not). Ultimately, you can use the SW however you'd like, but we intend for the runtime execution to be automated in teststand. Think of MAX as the debug/configuration environment.
Connection Lifetime is how long the relays should stay connected. For example, placing lifetime at "Step" means that as soon as that particular TestStand step completes, the relays will disconnect.
Multiconnect mode is the concept that a relay can be connected more than once in software. As long as the connect count is 0, the relay is open. If the relay count is greater than 0, then the relay is closed. Say, for example, that you have two different tests that can run simultaneously and they share the same relay. Specifically, test 1 requires relays A and B, while test 2 requires relays B and C. If you're able to perform both tests simultaneously (a function of your DUT), then when you connect test 1 and 2 simultaneously, relays A and C will both have a connect count of 1 (they've been connected once), but relay B will have a connect count of 2. Thus, when test 2 finishes and disconnects its associated relays, test 1 could still be running; since relay B will have a connect count of 1 after test 2 'disconnects' relay B, relay B will still be closed and test 1 won't be interrupted. The concept takes a minute to wrap your head around, but ultimately it is quite powerful.
NI Switch Executive is a very powerful program. Once you've played around with it for a bit, it is intuitively easy, but there is a higher rampup curve versus our other switch programming software (NI-Switch, NI-DAQmx, etc). NI Switch Executive is particularly well suited for TestStand.
Let us know if you have any other questions or if my answers aren't clear. Have a great day!
07-09-2012 11:41 AM
Also, if you haven't found the NI Switch Executive Help file, it's worth the short read. It is on your machine in the switch executive folder, and also online here:
http://digital.ni.com/manuals.nsf/websearch/1743F23E01E4599486257A0D005998A6
07-09-2012 12:58 PM
Thanks John!! After I posted I noticed one other thing. My goal was to give the switches aliases ( MAX) so that I wouldn't have to remember which slot of my PXI Chassis I was refering to. When I went to Teststand under the "route(s) to connect" I had to have a route in MAX in the schematic config tab or it didn't show up in TS. Would you suggest I create a single "route" with nothing connect in MAX so it shows up in TS?? That way I can use the switching feature in MAX? If I create a route and accidentally make a connection in routes is there a way to disconnect it??
07-09-2012 01:12 PM
Creating a single route in MAX won't make any difference regardless of what's in it; just don't call that route if you don't want to use it... multiple routes can share the same physical channels, as long as the routing through the topology makes sense.
Is there a particular reason you want to manually make the connections in MAX versus automating in Test Stand? If you want a more interactive control, you can always create LabVIEW subVIs with NI Switch Executive commands and then load those VIs as a TestStand step. Ultimately, however you want to use the software is your choice; I'm just curious what you're trying to accomplish.
"If I create a route and accidentally make a connection in routes is there a way to disconnect it??"
Are you creating the route in MAX or TestStand? In MAX, under the test panel you can connect and disconnect route groups as you please. In TestStand, you'll need to change the code before entering runtime.
07-09-2012 01:50 PM
I guess in a nut shell my ultimate goal was to give my switches aliases so I didn't have to remember that PXI1Slot16 CH0 was channel 0 on mux1 of say...3 and PXI1 Slot 17 ch0 was channel 0 on my MUX2.
So if I don't create a route in MAX how do I access that alias in Teststand under "route(s) to connect?
07-09-2012 01:58 PM
Hi Clint,
the NI Switch Executive provides multiple levels of abstraction that you can use in your system. One is creating aliases for your switch devices. Another one is creating aliases for your channels. Yet another one is creating aliases for connections (Routes). Another one is for groups of connections (Route Groups).
You can choose the level you wish to use.
If you only want to alias the switch device, you can use the Connect function (in LV or TestStand) but then you will have to pass the explicit connect string to it, e.g. "dev1/ch0->dev1/ch1".
If you use virtual channel names, then your connect statement may look something like "MyVirtChan1->MyVirtChan2"
Having the Switch Executive define an alias, e.g. MyRoute0, then your connect statement can reference "MyRoute0" string as a connection string.
I would recommend the latter for your test system design as it is most flexible, and do not worry about connections being made in MAX - there is no live hardware interaction while configuring switch executive virtual device in MAX until you explicitly go and test the connections.
best regards,
-Serge
07-09-2012 01:58 PM
If that was too confusing then let me ask this.
I have 2 MUX (2527) cards that show up in MAX. If I don't do a thing with them in MAX ( except create a virtual device) how would I call them in Teststand?? I want to close MUX Ch0 on Card 1
1) Insert say a Action Step
2) Select Switching>Enable Switching
3) Switch Excutive Virtual device is the name I created of the Virtual device in MAX
4) Operation >connect
5) Routes to connect..its blank because I didn't do anything in MAXX??
07-09-2012 02:08 PM
Clint,
I understand what you want to do; however, unless you create some named routes, TestStand will not show you anything there. You will have to type a connection yourself. That's where the power of Switch Executive aliasing comes into play - you can visualize the connections in MAX and just refer to them in your applications. Again, unless you explicitly connect something in MAX's test panels, no connection will exist in the hardware.
Moreover, when you run your TestStand test, the initialization of the switch devices will put them in a known state, so your tests should not depend on the actual switch state when they start running.
-Serge
07-10-2012 05:53 AM
Thanks Srdan. Both you and John answered my question(s).
Gues I should have posted in 2 different places because your solution was a part of the whole and I could only accept one as the answer.
Again, Thanks.