NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Load sequence file dynamicly

Hi
 
I'm developing a process model (PM) that can load a sequence file automatically. So each time the OI is executed it will load the a sequence file based on path specified in an INI file (required so I cannot specify the sequence file from shortcut). Currently I'm using the GetSequenceFileEx (to get the sequence object) and set the ClientPath based on sequence object. It s working. At the same time I'm also updating my OI progress using the ProcessModelPostStep callback. The problem now is that if use the ClientPath to set the sequence file my process model will not execute the ProcessModelPostStep callback.
 
I'm attcahing a Process Model and sample sequence file for reference. It is a standard NI 3.5 sequentialmodel with few modification
 
1. I add the GetSequenceFileEx and ClientPath in Test UUTs callback (under setup) -> the sequence file path is C:\\SeqExample1.seq
2. Change Test UUTs properties to show entry point for all window.
3. Add ProcessModelPostStep to update the OI progress.
4. Disable the Optimize Non-Reantrant option for the  ProcessModelPostStep  callback.
 
I used the sample OI provided by NI to run the sequence file. I think problem is that I'm not loading the sequence file correctly. Moreover,  I'm not sure if this is the correct way of of loading a sequence file but so far this is the method that i know. Please help me on this.
 
FYI This problem only occured in TS3.5 initially i developed the PM using TS3.1 and this problem didn't occured. Thanks
 
Download All
0 Kudos
Message 1 of 6
(4,186 Views)
Hi,

It's probably best to have the OI load the sequencefile.  To do this, the ApplicationMgr has a property ReloadSequenceFilesOnStart, set this property to a value of 0 (ReloadFile_None).  Now, again call the OpenSequenceFile method from the ApplicationMgr.  It takes a string parameter of the sequencefile that you want to load. 

By doing these two steps, every time you open the OI, it will read from your .ini file and automatically open that sequencefile.  Let me know if you have any questions.
0 Kudos
Message 2 of 6
(4,163 Views)

Hi,

Thanks for the info. However where should I put the code that you suggested. I'm using MFC to develop my code so I think i should put it in OnInitDialog function. Is this correct?

I haven't try your method yet. For now I'm using UImsg_OpenWindow to load my sequence file. The problem now is that I need to do this in the Sequence fileload callback. Its working but I'm not sure if this is the correct way .My original plan is to get the sequence file loaded when user press the Test UUT button. I'm also having problem with releasing the sequence file I loaded in the callback.

FYI, I prefer to do all this loading using process model (PM) and I try to reduce the amout of modification inside the OI code.I hope you can provide me some solution on the PM side.

Thanks

  

0 Kudos
Message 3 of 6
(4,130 Views)
Hi caviars,

After reviewing what Terry posted, I agree that modifying the OI is a better solution. In this case, you can put the additional code in OnInitDialog and everything should be fine.

As far as your original plan, you can't click the Test UUT button until there is a sequence file loaded, so this is still going to require OI modification. If want to modify the process model instead, it would probably involve changing the Test UUTs entry point to load your particular sequence file; however, I have to discourage this practice as it goes against the original intention of the process model (to work with many different sequence files).

Regards,
0 Kudos
Message 4 of 6
(4,098 Views)

Thanks for the suggestion. I tried it today and it worked.

I know that TestStand can Load multiple sequence file but I'm not sure why I need such capability. Usually I just create a sequence file and put all my test step inside it.  Can TestStand execute multiple sequence file at one time? If it does I hope you can tell me more about how to implement this feature.

.   

0 Kudos
Message 5 of 6
(4,082 Views)
Hi caviars,

Often times users want the ability to test multiple units simultaneously with the same test system (to reduce costs). There is actually great DevZone article that discusses the Benefits of Parallel Testing on our website. Essentially, you can accomplish this by using the batch or parallel process model.

For other DevZone articles that touch on parallel testing, refer to:
Another great starting is the MultiUUT example program which shows the batch process model in action:
<TestStand>\Examples\MultiUUT

Regards,
0 Kudos
Message 6 of 6
(4,073 Views)