From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a step type "launcher" that would insert the appropriate built-in or custom step type at edit time

Solved!
Go to solution

Hi everybody,

 

I'm looking for tips, pointers,directions... to be able to perform this operation in TS 4.0 sequence Editor, if it's even possible...

 

I'm managing a test system with a "home-made" virtual instruments abstraction Layer complementary to IVI classes for instruments which do not have classes defined, customizing the sequence editor accordingly for developpers of my department.

So basically when the instrument is IVI, the developper uses the built-in IVI step-type type and when it is not, he uses the the custom step types that I developped for this particular class of instruments.  

However there are classes where I do have both IVI and specific drivers available and I do need to use both in the test sequence.

 

For example let's say there are two sources of DC power available in the testbench, one being a programmable IVI compliant DC power supply, and the other one composed of fixed "blocks" of DC power supply managed by externals relays and you need to use them both in the test sequence.

 

What I would like to be able to do in the sequence editor is inserting the appropriate step type at edit time just by selecting the source of power supply (by a ring or enum for eg), and if the first ressource is selected, it inserts IVI step type, and if the second ressource is chosen, it inserts the appropriate custom step type.

 

Any Ideas on how to accomplish this ?

 

Regards,

 

Cyril

Cyril Bouton
Active LabVIEW Developper
0 Kudos
Message 1 of 7
(4,111 Views)

Hello Cyril,

 

Thanks for posting on the National Instruments Forum. 

 

You have tried to contact us at NI France and due to a technical problem we don't have your contact information. 

Can you please contact us again (0033 1 57 66 24 24) to open a Service Request? 

 

Regards,

    Benjamin R.


Senior LabVIEW Developer @Neosoft


0 Kudos
Message 2 of 7
(4,071 Views)
Solution
Accepted by topic author Cyril
I'm not sure exactly when you expect this prompt to come up, but one option is to create a custom step type with a custom substep named OnNewStep. This will be called when your step is inserted into the sequence. You could then display your prompt and programmatically replace the custom step in the sequence with correct type of step based on the user's selection.
Message 3 of 7
(4,052 Views)

Hello Cyril,

 

Here is an idea that could be done:

 

You could create a dynamic step by having a step that holds all the properties for both configurations (the superset of the necessary variables) and an extra one that indicates which 'mode' the step is in.  Then you create the main Edit substep in whichever language you desire.  That substep window will then have a box/dropdown/etc. at the top you can use to choose between modes A & B.  When the user changes the value, you would dynamically change the rest of the window to contain the appropriate properties for mode A or B.  You then copy the property values in that window to the Step properties, and copy the mode to your variable and you can run the step in that mode.  When the step then runs, it checks the mode variable, and depending on its value, it will run the step in mode A or B.

Now we could add a dialog that allows us to choose when we put a step down but we should still allow the user to change later via the Edit substep we create.

I don't think we can create something that inserts a completely different step, but we can have one step that has the ability to do both and we can pick which one we execute.  Also note we still don't have the ability to edit the Panels for a step, so we have to use a new window that we call from our Edit substep to complete the step.

 

Hope this helps.

 

Regards,

Olivier L. | Certified LabVIEW Developer


0 Kudos
Message 4 of 7
(4,037 Views)

James,

 

Thank you very much for your help. This is exactly what I was trying to accomplish. I will post an example on this thread as soon as I as I am done coding it correctly (just tried a draft implementation this morning...).

I would also like to thank you for all the other posts answers you have been giving in the past. They are often times very insightfull and made me progress a lot with TestStand..

 

Best regards,

 

 

 

Cyril Bouton
Active LabVIEW Developper
0 Kudos
Message 5 of 7
(4,028 Views)

Olivier,

 

Thank you very much for taking the time to respond. As you can see with my latest post, I went for James implementation which works for my needs.

 

Regards,

 

 

Cyril Bouton
Active LabVIEW Developper
0 Kudos
Message 6 of 7
(4,026 Views)

Cyril,

 

Did you get this working ? Would you be willing to post an example ? I have exactly the same task to achieve.

 

Regards

Chris

Don't forget to give Kudo's for a good answer !

LabVIEW Champion
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 7 of 7
(3,282 Views)