LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Run a TestStand sequence from CVI

Hi all,
I'm trying to write a simple C program that does the following:
 
1. open an existing .seq file.
2. modify few parameters (such as parameters for a for loop)
3. run the sequence.
 
I've been looking for the commands to issue that program, but could not find anything relevant. if someone can direct me to a written example for doing something like that it will be appriciable.
 
 
thanks,
Ido
0 Kudos
Message 1 of 8
(4,356 Views)
Ido,

what version of TestStand are you using?

From what you are writing in your post, you are looking for customizing an User Interface (TS 4.x), formally known as Operator Interface (TS 3.5 and earlier).

Norbert B.
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 8
(4,357 Views)
The final code should be running from computers running both TS 3.5 & TS 4.0.
Does TS 4.0 has backward capability?
 
I can write it both for TS 3.5 & TS 4.0. I prefer writing to the more simple API.
thanks
Ido
0 Kudos
Message 3 of 8
(4,348 Views)
Ido,

backward compatibility is true for all sequences which do not use features newly introduced by the newer version. You can downconvert the sequences by selecting "save as" and the choosing the correct version in the "files of type" dropdownbox.
Regardign UIs, backward compatibility isn't that easy. Since the UIs have to work with the API from TS, there can be changes which cannot be downconverted. UIs were redesigned in TS 4.0 and new functions were introduced. One functionality is to switch between two modes of UI: editor mode and operator mode. The first one is the mode you want to take a closer look at.
In TS 3.5, OIs have only one mode: operator mode. So you have to include all functions for editing on your own...

All in all i advise you to use TS 4.0 since many functions you will need are already implemented. On the other hand, those are maybe already too much for your application, but you can change the UIs just as you need them since the sources are installed with TS.

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 8
(4,338 Views)

Norbert,

Thanks for the quick response. I will work with TS 4.0 then; Do you know where can I find a simple example which does what I wanted to implement above?

Ido

0 Kudos
Message 5 of 8
(4,333 Views)
Ido,

the best place to start is: check out the User Interfaces installed with TS. You can start one by selecting Start->Programs->National Instruments->TestStand 4.0->User Interfaces. You can then choose the ADE the UI was built in (they all look the same!) and then choose the mode you want to run the UI initially.
You can change the mode during execution of the UI by pressing Ctrl+Shift+Alt+Ins.

If the functionality you are seeing is ok for you, you propably want to change the design of the UI. In order to do this, you have to change the sources. You can find them in \User Interfaces\NI\. There are two versions: full featured and simple. The UI you have used before is the full featured.

IMPORTANT NOTE: If you are going to change something in the sources, please copy the whole application files from the \NI-folder to the \User-folder first! Please leave the subfolder-structure unchanged...


hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 8
(4,331 Views)

Norbert,

I took a deep look on both projects (simple & full featured).

The simple one gave me a good idea on how to implement the sequence opening. actually I think I'll use the same project (copied as another one of course...) with few changes.

The only thing is missing is how to change the parameters of a one of the steps (suppose I have a FOR loop inside the sequence). the full-featured sequence does it, but it is done all inside the TS engine, and the code does not provide an example on how to do it. I need to change it automatically inside the code (without the user interference). Can you provide a small example or maybe just point out the relevant functions I should use?

Thanks,

Ido

0 Kudos
Message 7 of 8
(4,315 Views)
Hi Ido,

In order to modify the parameters of a step, you need to access the Step.Module property. This will return a reference to a Module object that you can use to access the Parameters property. For instance, for a step calling a DLL, navigate to the DllModule.Parameters help section to see what you can change on a DllParameter item. There are different Module types (one for each Adapter type), so you either need to know what type Adapater the step is using ahead of time, or you need to interrogate the Step.Adapter property at run-time (and choose the appropriate Module type). I have attached an example sequence that modifies a step only if it uses the LabVIEW adapter. I understand you will be working in C, but the methods you need to call will be the same.

Regards,

Message Edited by James M on 09-07-2007 11:23 AM

0 Kudos
Message 8 of 8
(4,297 Views)