NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Executing a Teststand sequence using command line options

Hi I am trying to create a python script to run a teststand 2020 sequence. I am using the command line call- "SeqEdit.exe /run MainSequence "c:\My Seqs\test.seq" " as mentioned in the link: https://www.ni.com/docs/en-US/bundle/teststand/page/configuring-sequence-editor-and-user-interfac.ht.... My doubt is that once i perform the execution, how can i extract the report programmatically. I dont see a command line option for this. I need to do it programmatically and not manually for the purpose of my work. 

0 Kudos
Message 1 of 5
(1,304 Views)

The report generation will be executed according to your report plug-in settings, this includes the location, where reports are saved to

0 Kudos
Message 2 of 5
(1,291 Views)

Hi Oli, thanks for replying. I havent set any report plugin settings yet. How can i do that via python script?

 

This is the code i am using to run the sequence:

import time

import win32com.client
import os
import subprocess
from pynput.keyboard import Key, Controller
print("opening teststand")


cmd3 = '"C:\\Program Files (x86)\\National Instruments\\TestStand 2020\\Bin\\SeqEdit.exe" /run MainSequence \"C:\\Users\\pgupta23\\Desktop\\new ni plugin\\Simple Delay Sequence2.seq\"'

p = subprocess.Popen(cmd3, shell=True)

print("here")
time.sleep(35)

keyboard = Controller()
print("pressing enter")
keyboard.press(Key.enter)
keyboard.release(Key.enter)

Also, when i check after the test run, the reports section is emoty- 

pgupta23_0-1689166356652.png

 

I just now realised that my code "runs" the sequence and not execute it. Do you know how i can execute the sequence using 'single pass' process model via the python script?

 

0 Kudos
Message 3 of 5
(1,276 Views)

For report generation, a process model needs to be used, e.g. by using the SinglePass entry point

 

this can be achieved by using the a command line argument

 

Oli_Wachno_0-1689168072824.png

 

The appropriate config file for the result processing is ResultProcessing.Cfg which can be found in cfg\modelPlugins

 

It is a good thing you come here to ask those questions. Yet I strongly recommend to build up a basic TestStand knowledge before trying to remotely control it. There are a lot of resources out there

 

 

 

 

0 Kudos
Message 4 of 5
(1,256 Views)

@Oli_Wachno wrote:

For report generation, a process model needs to be used, e.g. by using the SinglePass entry point

 

this can be achieved by using the a command line argument

 

Oli_Wachno_0-1689168072824.png

 

The appropriate config file for the result processing is ResultProcessing.Cfg which can be found in cfg\modelPlugins

 

It is a good thing you come here to ask those questions. Yet I strongly recommend to build up a basic TestStand knowledge before trying to remotely control it. There are a lot of resources out there

 

 

 

 



@Oli_Wachno wrote:

For report generation, a process model needs to be used, e.g. by using the SinglePass entry point

 

this can be achieved by using the a command line argument

 

Oli_Wachno_0-1689168072824.png

 

The appropriate config file for the result processing is ResultProcessing.Cfg which can be found in cfg\modelPlugins

 

It is a good thing you come here to ask those questions. Yet I strongly recommend to build up a basic TestStand knowledge before trying to remotely control it. There are a lot of resources out there

 

 

 

 


Thanks so much Oli!

0 Kudos
Message 5 of 5
(1,249 Views)