NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Customizing an IVI-like soft panel VI for TestStand to allow for user selectable configuration and then sequence triggered execution

All,

I would like to build a set of instrumentation VI's for TestStand, similar to the soft panels used with the IVI step types, but far less complex since I am only interested in accessing a couple of instrument functions for now. As an example, I would like to have the VI soft panel open when initially placed as a step in the sequence. The user can then change whatever settings are appropriate and close the VI. When the test sequence is run, the soft panel will not open, but a command string will be sent to the instrument, executing the measurement. I am new to TestStand, but I am able to build custom step types that automatically open in edit mode when placed. I am not sure if this is the right approach, since I don't really want the end user to have access to editing the workings of the VI, only the ability to change the front panel settings. I am not clear on how to preserve the changes the user makes, especially since there could many instances in the sequence. A simple case might be a user wanting to send a different pulse stream from a PG in each of ten steps in a sequence. This sequence may be looped 1000 times, so I don't want any front panels popping up during the measurement sequence asking for settings. Any thoughts on a strategy from anyone?

Thanks,

Skidsteer

 

0 Kudos
Message 1 of 7
(3,514 Views)

Yes you need a cusom step type. This is a good app note.

http://zone.ni.com/devzone/cda/tut/p/id/3193

Yours won't be exactly the same as this one but this note has all the info you need. If you want the Edit Panel to pop open automatically when you drop the step from the Insertion Palette, add a Custom Substep to your custom step type and make  it OnNewStep. You might need to call tech support about how to hook it up.

cc 

Message 2 of 7
(3,484 Views)

Hi Skidsteer,

 

dowNow provided the right link 5!

If you have TS4.0 or less you should also take a look at the source code of IVI-Step-Type at:

TestStand 4.0\Components\NI\StepTypes\IVISteps (written in C++)

Also take a look in Step-Type variables(in TS) of IVI StepType to see how NI has declared the variables

 

Greetings

juergen

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 3 of 7
(3,474 Views)

Thanks for the good suggestions. I am able to build a custom step type that opens to edit when dropped into a sequence. As you suggested, I am currently looking at the IVI variables, which seems to be my best clue as to how to build a VI that allows a user to configure say, a different pulse duration at each step when placed, and then executes those pulses during sequnce execution. I was trying to use the "get session manager" VI in LV8.6 to call a session name to an instrument in MAX, but then realized I will have to use instruments that do not have IVI drivers. Do you know if it is possible to to asign session names that can be called by a LV vi to get a session ID that would be sent to TestStand to non-IVI drivers? If not, is the standard approach to get a VISA refnum and pass it to a TestStand local?

Thanks,

Skidsteer

0 Kudos
Message 4 of 7
(3,417 Views)

There is a way to create the session mgr aliases for VISA instruments. You have to put the VISA addresses and aliases in the ini-type file C:\VXIPNP\WinNT\NISessionMgr.ini.

 

You can as you say pass the VISA handles to a Local or global. You might consider not passing the VISA handles around. Just pass the address string to each step  and use VISA Reads and Writes, don't use VISA Open. I have benchmarked this and there is Zero time saving with opening once vs opening many. It makes your sequences less messy too.

Message 5 of 7
(3,411 Views)

dowNow,

Wow, using the ini file worked great. It took a few tries to get the prefixes to match the drivers correctly, but it is functioning very nicely now.

Thanks again,

Skidsteer

0 Kudos
Message 6 of 7
(3,406 Views)

Hi dowNow,

 

Thank you for that hint! I am still learning every day Smiley Happy

 

Greetings from the lake of Constance, Germany

 

Juergen

Message Edited by j_dodek on 09-25-2008 12:33 AM
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 7 of 7
(3,390 Views)