NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple switches inside one test sequence

Solved!
Go to solution

Hello All,

 

I'm trying to do a few different stages of switching within one Multiple Numeric Limit Test, so what I did is embedded all the switch commands in labview. Sadly I hit an error when it got to the step with all the switching (An error has occurred while attempting to access device PXI1Slot6
Another process has already opened a session to this switch module.).

 

Is there a way to disconnect the teststand from the switch so that the labview vi can use it without interruption, or is there another way to do multistage switching within teststand that I'm not aware of?

 

Thanks for taking the time to read.

0 Kudos
Message 1 of 9
(5,082 Views)

Are you using Switch Executive or are you just using NI-Switch?  With Switch Executive you can have the steps in TestStand handle all the switching for you. 

 

There is an example that demonstrates it:  <TestStand Public>\Examples\Switching\SwitchExecutive.seq

 

Also, you can have the Route(s) to Connect: Look in the TestStand help for Route Specification Strings.

 

Hope this helps,

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 9
(5,076 Views)

Hello jigg,

 

I am using Switch Executive, I am predefining all the different switches in MAX and then loading them into test stand as part of each individual test.

 

I looked over your suggestions and I think thoes might work but correct me if I'm wrong here but you will need to break it up into different steps within the test itself so instead of having 1 multiple numeric limits test ill have to have 2 multiple numeric limits test, which is what I'm trying to avoid. Which is why I was trying to do the switching in Labview.

 

What I was doing earlier was pretty much what I suggested above I had two tests in place of one, I would like to keep it to one if possible.

0 Kudos
Message 3 of 9
(5,060 Views)

Throggdor,

 

Is there a way to disconnect the teststand from the switch so that the labview vi can use it without interruption

Have you tried looking at this KB? Step 2 (and the attached .seq file) will allow you to close the open Switch Executive session in teststand and allow you to do your switching in LabVIEW without issue. If you re-open the teststand switch executive session later though, your signals will be disconnected. (As Switch Executive call disconnect all on each device)

 

is there another way to do multistage switching within teststand that I'm not aware of?

Do you mean multi socket testing? I have heard of users creating separate routes for each socket and using the "RunState.TestSockets.MyIndex" value to determine which socket it is currently running on. Then the user can programmatically create the name of the route based on the socket.

 

ex:

MyRoute_Socket1

MyRoute_Socket2

MyRoute_Socket3

Frank,
National Instruments
Software Group Manager
0 Kudos
Message 4 of 9
(5,053 Views)

You can do multiple switches inside of one step.  Separate them with a &.  That's why I pointed you to the documentation in the TestStand help.

 

Cheers,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 5 of 9
(5,039 Views)

Hello Jigg:

 

I did see that, my problem is that I cant have the switches all flip at the same time. I'd like to be able to switch to one device and do something then after thats done switch somewhere else and doe something else; all within the same switch.

 

I appreciate your help 🙂

0 Kudos
Message 6 of 9
(5,029 Views)

I would break it out into multiple steps.  Then just do the proper switching for each step.  So basically like this:

 

Step 1: Switch to RouteA, Do Something

Step 2: Switch to RouteB, Do something else

etc...

 

The other trick is getting switch executive set up correctly.  You can add as manay routegroups in there as you'd like.  Set up each switchgroup appropriately to work with your application.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 7 of 9
(5,018 Views)
Solution
Accepted by topic author Throggdor

One more thing....

 

You can use the Sequence Adapter with a Multi-Numeric step.  Then create a sequence that will have multiple steps.

 

I demonstrate this in the attached sequence file.

 

Let me know if you have any questions.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 8 of 9
(5,017 Views)

Jigg,

 

Thats exactly what I was looking for, thanks so much for your help.

 

~Daniel

0 Kudos
Message 9 of 9
(4,980 Views)