07-12-2023 05:51 AM - last edited on 11-01-2024 02:24 PM by Content Cleaner
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.
07-12-2023 06:31 AM
The report generation will be executed according to your report plug-in settings, this includes the location, where reports are saved to
07-12-2023 07:49 AM - edited 07-12-2023 07:54 AM
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-
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?
07-12-2023 08:36 AM
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
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
07-12-2023 09:06 AM
@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
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
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!