03-30-2026 02:15 PM
Hello fellow truth seekers,
I am currently implementing an error monitoring system in LabVIEW which on a high level involves a VI named ErrorCentral.vi that monitors all the errors taking place during test execution. This involves TestStand errors, Windows LabVIEW code and a cRIO-9038 target.
I've got the Windows LabVIEW code and cRIO-9038 code handled. I need to pass the errors thrown by TestStand steps into LabVIEW.
About my TestStand test framework architecture:
It has a main sequence that launches all my other test sequences using "use new execution" option in sequence call. So at any given time I'll be having more than 1 sequence context.
Now, I was hoping to use Process model callback with TS APIs and LV VI using ActiveX(Automation Refnum) to communicate from TS to LV.
I was trying to make use of ProcessModelPostStepRuntimeError so that everytime I can use the RunState.ThisContext.Caller to possibly supply the required error codes during run-time.
Important to note, that my test execution is driven by TestStand and hence I couldn't use ApplicationMgr to register and get UI_messages.
I came up with a following design (PFA, code in zipped file):
A TS seq which calls another seq in new execution and also launches a VI in new thread which is responsible for capturing RunTime errors using the technique mentioned above. However, the VI is not able to receive the messages.
I tried to change my approach(First I tried with PollUIMsgFromTS.vi and then switched for SeqContextFromTS.vi)
Could you please help me point out my inaccuracies with the TS sequence, model callbacks and async VIs. I have also shared the customized process model.
Thank you for reading. Regards!
Sam
Solved! Go to Solution.
03-31-2026 10:17 AM
I can't open your sequence (2023 Q4). I am using TS 2017SP1.
I also don't have ProcessModelPostStepRuntimeError.
But in SequenceFilePostStepRuntimeError, I can get the error: #NoValidation( Parameters.Step.Result.Error.Occurred ), and I can call a normal VI, pass the error to the VI.
04-01-2026 09:16 AM
Hello Zou,
Could you share your code so that I can try to open it at my end.
About using SequenceFilePostStepRuntimeError, my understanding is, it works locally for the sequence file it is part of. Whereas, ProcessModelPostStepRuntimeError caters to error across executions. Hence, why I chose it over the previous.
Regards,
Samarth K.
04-01-2026 03:04 PM
If you add SequenceFilePostStepRuntimeError to your Station sequence file, then it will work for all seqences on that station.
04-01-2026 06:02 PM
@SamarthKansal wrote:About using SequenceFilePostStepRuntimeError, my understanding is, it works locally for the sequence file it is part of. Whereas, ProcessModelPostStepRuntimeError caters to error across executions. Hence, why I chose it over the previous.
As I mentioned above, TestStand 2017SP1 doesn't have ProcessModelPostStepRuntimeError.
test code attached.
04-06-2026 09:57 AM
Zou,
In my case, I found this method to be working quite well. "RunState.Caller.GetRunTimeErrorMessageEx()"
To all, in case of any other solution do tell. This is what I could find based on my exploration.
I called this from ProcessModelPostStepRuntimeError callback. Same is available for SequenceFilePostStepRuntimeError.
It can be used inside an fx statement or called inside a VI like this:
Let me know your thoughts once you try it.
Merry Regards,
Samarth K.