NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Scheduling Tests with TestStand

Hi,
    I was curious to know if anyone has made a module which schedules and runs a sequence at a specified time. What I am looking for is to be able to have a sequence run at a certain time every day. Any design suggestions or any add-ons already available?  I guess this is something that should be added to the operator interface, right?

Thanks,

Louis
0 Kudos
Message 1 of 11
(4,782 Views)
Hi Louis,

There are no particular add-ons or plug-ins for this type of operation, however I think what you want to do is possible. Here are a few options:

The simplest method to run any sort of application at a given time of day, if you're using a Windows system, is to use the Windows Task Scheduler. The "Scheduled Tasks" folder can be found in your Windows control panel.

There is a time function in TestStand ( Time() ) that returns the computer system time. You could use this in conjunction with preconditions and some sort of while loop to have TestStand sit and wait for a particular time of day before executing a step in your sequence.

If you have your operator interface running all day, and you just want a particular sequence file to run at a particular time, you can add in code to the OI that is constantly checking the time in the background, and once a particular time is reached your sequence file could be called.

If you aren't always running your operator interface, you could create a simple executable (in LabVIEW for instance) that would do the same thing, checking the time and executing your sequence at a particular time of day.

Any one of these options may work depending on your application. If you could provide a little more description of the overall purpose maybe we can nail down a more specific solution.

Thanks Louis, have a good one!

Dan Weiland
Applications Engineer
National Instruments
Dan Weiland
0 Kudos
Message 2 of 11
(4,774 Views)
For now I have it working with windows scheduler. I launch the OI and automatically start my daily tests. The only problem I have now is that the OI stays open after execution. Is there any way to have the OI closed automatically after the sequence ends?

Thanks,

Louis
0 Kudos
Message 3 of 11
(4,760 Views)

add /quit to your command line.

TestStand Reference Manual Chapter 8 >> Customizing and Configuring TestStand >> Configuring TestStand >> Sequence Editor and Operator Interface Startup Options document the available command line arguments.

0 Kudos
Message 4 of 11
(4,754 Views)

Hi,

I also have the same problem as described above, but after going through the answers, I could easily run my sequence using the "Command Line Arguments". But the problem is, it is not able to generate the report file... is any other command to run a sequence and generate the corresponding report?

Please Help.

Regards,

Sreedhar.

0 Kudos
Message 5 of 11
(4,619 Views)
Hi Sreedhar,

Running a sequence using command line arguments should have no impact on whether or not you are generating a report. Check your Report Options (Configure >> Report Options) to ensure that report generation is enabled and that you are not only generating a temporary file.

Let us know Sreedhar, Thanks!
Dan Weiland
0 Kudos
Message 6 of 11
(4,594 Views)

Hi Dan,

What I am doing presently is: I made a Batch file, in which I wrote the command line arguments. Now, in the batch file, I am loading the SequentialModel.seq and in the MainSequenceCallback (subsequence in SequentialModel.seq), I am hardcoding its parameter for a particular sequence, so that whenever I run the .bat file, only that particular sequence is getting executed and accordingly a report is being generated. My .bat file looks like this:

"C:\Program Files\National Instruments\TestStand 3.1\Bin\SeqEdit.exe" "C:\Program Files\National Instruments\TestStand 3.1\Components\User\Models\TestStandModels\MySequentialModel1.seq" /runEntryPoint "Single Pass" "C:\Program Files\National Instruments\TestStand 3.1\Components\User\Models\TestStandModels\MySequentialModel1.seq" /quit".

I have named sequentialmodel as MySequentialModel1.seq, please find it attached.

I found only this way to generate report. Because, without running the SequentialModel, how can cater for generating a report.

Please tell me if there is any other way.

 

Thanks and Regards

Sreedhar.

0 Kudos
Message 7 of 11
(4,586 Views)

Hi,

You shouldn't be running the process model sequencefile like that.

In your command line, if you have a normal sequencefile instead of a process model, the fact that you had an entry point as well means the sequencefile will load and run the MainSequence using the process model entry point "Single Pass".

eg

"C:\Program Files\National Instruments\TestStand 3.1\Bin\SeqEdit.exe" "C:\Program Files\National Instruments\TestStand 3.1\Examples\MyExamples\MySequenceFile1.seq" /runEntryPoint "Single Pass" /quit.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 8 of 11
(4,584 Views)

Hi,

 

I have replaced my batch file with the following text: "C:\Program Files\National Instruments\TestStand 3.1\Bin\SeqEdit.exe" "C:\Seq2.seq" /runEntryPoint "Single Pass" /quit.

on doing this the teststand is throwing me an error saying : Command Line arguments missing.

What I did is, instead of this path i.e. "C:\Program Files\National Instruments\TestStand 3.1\Examples\MyExamples\MySequenceFile1.seq", I replaced with the path of my sequence file as I have shown above.

please correct me.

Thanks

 

also I am attaching, the error message that was thrown...

Message Edited by TSreedhar on 04-05-2006 01:15 AM

0 Kudos
Message 9 of 11
(4,584 Views)
Hi,
 
Change the order so that its /runEntryPoint <entryPoint> <Sequence File>
 
"C:\Program Files\National Instruments\TestStand 3.1\Bin\SeqEdit.exe" /runEntryPoint  "Single Pass"  "C:\Seq2.seq" /quit
 
Hope this helps
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 10 of 11
(4,577 Views)