11-05-2020 08:18 AM
Hi There,
I'm new to TestStand, and I'm asking if there is a plug-in or some other tool ( API for example ) that can give you access to the live status of the TestStand sequencer.
Something like: => the sequence is Running or stopped, or there is an error in the sequence. this kind of informations.
Thank You.
11-05-2020 08:47 AM - last edited on 11-04-2024 02:41 PM by Content Cleaner
Hi Hanoub,
Short answer: Yes.
Long answer: there's a few ways with the API to get execution status, which depend on where you're asking from:
From the Test Executive Application:
ApplicationMgr.GetRunState ( exec)
Use the following constants with this data type:
and
ApplicationMgr.GetTerminationState ( exec)
Use the following constants with this data type:
If you're looking to get it from an execution of a sequence or via the process model:
Execution.GetStates ( runState, termState)
Returns the current state of the execution.
I hope this helps.
11-05-2020 09:03 AM - last edited on 11-04-2024 02:37 PM by Content Cleaner
You might be interested in SystemLink, specifically SystemLink Test Module:
SystemLink does this by using a results processing plugin in TestStand to send data through the SystemLink client back to the server. You could use a similar approach and write your own plug-in if you don't want to use SystemLink but I would definitely encourage you to check it out... it solves a lot of the hard problems you're likely to run into (intermittent connectivity, authentication, etc...)
Hope this helps!
Trent
11-05-2020 09:05 AM
Hi Capitain_Jack
it's really helpful all the suggestions you've mentioned above, I'm positive that by using a custom solution (3rd party solution) the application could be achieved successfully using those methods.
What I'm trying to achieve is to continuously send the status of the TestStand sequencer to a Local server to see it TestStand is free or still running, or even mentioning an error, etc... . That's why I'm asking if there is a clean way to do it, using a plugin or something developed already by NI.
Thank You, your answer was very helpful 😉
11-10-2020 11:02 AM - last edited on 11-04-2024 02:40 PM by Content Cleaner
Thank You Mr. WireWeaver,
Well, the SystemLink Test Module seems to be a great solution, but due to the licencing fees, we cannot go any further with this solution.
What I found instead is the use of the native UI Messages that are sent continuously by TestStand Engine & Process Models to the User Interface.
The problem is that I don't know how to implement HomeMade Man-in-Middle API in order to get this information and send them to my local server.
08-10-2023 01:07 PM
I know this thread is a few years old but are there any TestStand.seq file EXAMPLES out there ANYWHERE that I can use to implement these 3 methods?
The TestStand "Examples" folder does not show anything and I am not an expert enough in TestStand to understand how to write the expression.
08-11-2023 12:16 AM
To clarify: the purpose of there API commands is to enable other applications like operator interfaces to interact with the TestStand Engine.
So some of this stuff can be found IIRC in the operator interface examples that come with TestStand
08-14-2023 07:15 AM
I found something of an example here: https://forums.ni.com/t5/Example-Code/Determining-the-Termination-Status-of-a-TestStand-Execution/ta...
//pass 0 for the RunState parameter because we are not using it
RunState.Execution.GetStates(0, Locals.TermState)
Just advocating for more/better examples available for TestStand.seq steps like there is for LabVIEW.vi's.