06-23-2009 01:05 AM
06-23-2009 05:18 AM
Hi ccds,
What kind of data are you using? Numbers, Strings or even Obejcts ?
I would use the feature of Local or FileGlobal variables.
Maybe find the anwer in this Thread.
http://forums.ni.com/ni/board/message?board.id=330&message.id=17663&query.id=281482#M17663
There is a small example which reads and write data from .net to TS
I also recomment to take a look on the
ProgrammFolder\National Instruments\TestStand 4.0\Examples\Demo\DotNet\computer.seq
that comes with TS
Hope this helps
juergen
06-23-2009 10:20 AM
Hi Juergen,
I think that my question was not clear, it will try to explain better.
I have .net code for several devices with a graphical interface to configure, measure ...
Now, for example lets focus on the code for a DMM.
I have an implementation to configure my DMM, another one to measure...
I want to use my existing .net code to create a sequence in TestStand, so I have made a class to instantiate the DMM, I have constructed this class from Teststand and called the appropriate method. Now, the graphical user interface is showed for the configuration. After changing some settings in the GUI, I want to store this settings into my TestStand sequence. In fact I want to be able to generate the code for my sequence, using the GUI's for my devices. All the settings made in GUI are stored into 1 string, so I am looking for a method to add this string content to the TestStand sequence for the current step executed. This is not possible using a local variable, because the settings are not added to the test sequence. This is also not possible using FileGlobal variables, because I need a universal method for all my devices.
After creating my complete Test sequence using my existing .net code, i want to be able to see all my configuration settings back in my GUI´s. So, for this reason I should have a method to dynamical add some data to the current executed Teststand step, this code has to be stored on disc.
best regards
I hope that the question is more clear now.
06-23-2009 10:48 AM
What you are describing sounds very much like the use case for creating custom step types. If you are not familiar with custom step types you should read about them in the documentation and search for articles here online (there is a best practices document available). If you do not already know, a step type is basically a custom data structure that you define (so you could add properties that you need to store the data that your configuration dialog needs to store) that the user can create instances of in their sequences as steps. Step types also can have builtin functionality which you can implement using code modules (C# or others) that are called as substeps. There are two main kinds of substeps, editsubsteps, and post/presubsteps. The editsubsteps show up as menu items in the sequence editor when you right-click on instances of your step that are inserted into the sequence. When the user selects your edit substep your code module for the edit substep is called and can then configure/set the properties on the step however you want it to (i.e. display your dialog). At runtime the pre/postsubsteps are called allowing your step type's code modules to implement additional runtime behaviors.
There are example step types in the TestStand examples directory (see the tcl example and StepTypes example).
Hope this helps,
-Doug
06-23-2009 02:09 PM
Hi
I agree with Doug. You have to write your own custom StepTye.
You are working with DMMs. So you should also read to source code of IVI-StepTypes
you will find it in the TS-Folder
I have also done my own StepType which i a have publicated at a NI-Event.
It deals with dmm, switches and power-supplies.
Maybe you can get some impressions for your task.
ftp://ftp.ni.com/pub/branches/germany/vip_days_sessions/teststand_step_type-mtu-dodek.pdf
Greetings
juergen
06-24-2009 07:52 AM
07-02-2009 01:11 AM