From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Visualize real-time sequence execution from Workspace

Hi all !

Is there any custom control which would allow visualizing (in the Workspace) the step currently running while executing a real-time sequence ? (just like you can see it from TestStand Sequence Editor when you run a TS Sequence.)

If not, any advice to let me start its development ?

 

Thanks !

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 1 of 8
(6,620 Views)

Hey zyl7,

 

Do you want to see the steps in the real-time sequence running on the target (.nivsseq), or the steps of the stimulus profile editor (.nivsstimprof)? I am not aware of any current workspace objects that do this. The overall idea though, is that you want want to make a workspace object that calls into the NIVS Gateway via our .NET API's to get this information, and then display it to the user. Unfortunately, I dont know that we will get this level of detail for the real-time sequence side though, as I dont think that information pipes back up to the gateway. You will likely only get information on whether the sequence is running, idle, or finished.

 

I would first check to see if we have any further detail in the NET API. I dont know if we'll find exactly what we're looking for, but its a good first place to start. The Client API, specifically will give us a lot of execution information.  I did find some interesting things of note in the NIVS .NET API Help,

 

ISequenceControl (ClientAPI) - Looks like there are a list of functions here for interfacing with a sequence. Specifically in this list there is a "State" property that "Gets the current execution state of the sequence.". This sounds promising, but I believe it will only give us the properties I listed above. Nothing very detailed.

 

Another neat one though, is the GetSequenceTime, which gives you "Gets the relative time since the sequence started, as determined by the delta t at which the sequence executes and the number of executed iterations.". You may be able to use this as a way to back calculate where your sequence is currently executing.

 

If you can't find anything in the Client API that already yields this information, you may just need to add something like "Check Points" to your Sequence. You can create a new channel in the System Definition that is a state indicator for the sequence. When your sequence gets to different stages, you can update the integer number in the engine to correspond with a specific type of step (basically like an enum). You can then create a workspace object that reads that channel in the engine and interprets the integer to something more verbose.

 

Those are the best approaches I can think of at the moment. I would keep looking around through the .NET API to see if there is anything else that might suit your needs. Let me know what youre thinking on how you might proceed and we can talk about pros and cons!

 

 

 

 

Tim A.
0 Kudos
Message 2 of 8
(6,515 Views)

Hi Tim,

 

Here are some answers :

 

"Do you want to see the steps in the real-time sequence running on the target (.nivsseq), or the steps of the stimulus profile editor (.nivsstimprof)? "

=> My goal is to inform as much as possible what is the step currently running. This current step could be either part of the sequence running on the target ot the global execution definition.

 

"I would first check to see if we have any further detail in the NET API. I dont know if we'll find exactly what we're looking for, but its a good first place to start. The Client API, specifically will give us a lot of execution information.  I did find some interesting things of note in the NIVS .NET API Help, 

ISequenceControl (ClientAPI) - Looks like there are a list of functions here for interfacing with a sequence. Specifically in this list there is a "State" property that "Gets the current execution state of the sequence.". This sounds promising, but I believe it will only give us the properties I listed above. Nothing very detailed."

=> I tried using this API to get information needed, but as you said the level of details is not enough precise : you can only info at the sequence level (running, idle, or finished). I would need the same thing for each basic steps.

 

"Another neat one though, is the GetSequenceTime, which gives you "Gets the relative time since the sequence started, as determined by the delta t at which the sequence executes and the number of executed iterations.". You may be able to use this as a way to back calculate where your sequence is currently executing."

=> Using timed info is not very efficient to get the execution position because it would vary according to flow steps (if, while, for...). I don't think this is a good solution.

 

If you can't find anything in the Client API that already yields this information, you may just need to add something like "Check Points" to your Sequence. You can create a new channel in the System Definition that is a state indicator for the sequence. When your sequence gets to different stages, you can update the integer number in the engine to correspond with a specific type of step (basically like an enum). You can then create a workspace object that reads that channel in the engine and interprets the integer to something more verbose."

=> This would mean that the sequence have to be built to be specifically displayed... not very generic. Moreover this adds some work to the real-time engine... Most of the time it has more than enough to do Smiley Tongue

But I guess this solution would be the best choice...

 

The best thing would be that the real-time sequencer get inspired by what is done in TS : generate specific events to send state info to registerd receivers... These events should be generated for each basic steps executed.

 

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 3 of 8
(6,506 Views)

That approach in TS isn't too difficult to realize, because TS is not as execution time dependent as the VS Engine on an RT target. Adding the ability (assuming it isn't already there) to report changes in the step in the real-time sequence would create jitter which is not preferred. But each approach has drawbacks... even the checkpoint idea mentioned before introduces a bit of delay/complication to the execution.

Tim A.
0 Kudos
Message 4 of 8
(6,503 Views)

The difference is that TS generates events to send informations about running execution(s). Sending these info could be done by the engine in a specified thread, so it wouldn't include that much jitter.

 

"Adding the ability (assuming it isn't already there) to report changes in the step"

=> I don't want to 'see' any changes in the step, I just need its execution status (idle, running, done).

 

"assuming it isn't already there"

=> Could you confirm it's not already there ?

 

Thanks !

 

Cyril

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 5 of 8
(6,498 Views)

I can definitely confirm. Looking into it now.

Tim A.
0 Kudos
Message 6 of 8
(6,495 Views)

Hey zyl7, 

 

It looks like our suspicions were true. Doesn't look like there is currently anything with how real-time sequences currently operate that will give us execution step information other than what we found in the .NET API. It sounds like a big part of why this wasn't originally implemented was due to complexity with getting very granular results. Abstracting all of the sequence information for all cases isn't quite that straightforward particularly when subsequences and multitasking comes into play.

 

For your testing, what level of detail are you looking for? Just a top level view of 1 overall sequence or do you want every detail even on the lowest level of subsequences and steps in a multitask? I'm just trying to get an idea of scope.

 

 

 

Tim A.
0 Kudos
Message 7 of 8
(6,480 Views)

Tim,

 

I just need to get an event fired when a step launch and finishes. This event could only contain the step group, step name, state (running, done ; more pieces of information could be added).

A step could be define as every action listed in the stimulus profile editor. Here it could be 'Real-Time Sequence :Seq_AutoFilght.nivsseq' or 'While Altitude <3' or 'Roll=30' etc...

 

stimprof.png

 

 

 

 

 

 

 

 

 

seq.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

As it could be done by event, you could have a specific thread in charge of publishing such information and that would not impact (or only sligthly) CPU load and slow down RT execution.

Even better, this event generation could disabled (option) if its execution disturb the execution.

 

The stimulus generator looks like to TS too much to not giving basic TS functionnalities ! Smiley Tongue

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 8 of 8
(6,461 Views)