NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get TS::SequenceContextPtr from customize UI

Solved!
Go to solution

I want to set value to sequence file from customized UI, so need to get the pointor of TS::SequenceContextPtr, do anyone know how to get this pointor.

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

This example is in LabVIEW but it applies to any language: http://www.ni.com/example/27606/en/

 

Also, check out these:

http://www.ni.com/white-paper/4532/en/

https://decibel.ni.com/content/docs/DOC-20423

 

Basically anything on UIMessages.

 

The idea is that you pass the SequenceContext as a UIMessage from your client sequence file.  Then in the UI you can capture that and access any parts of the sequence like you want.

 

Regards,

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5
(4,168 Views)

this is an approach to do it. but other from this one, can we get the pointer from IExecutionViewMgrPtr or IEnginePtr, since I already know these two pointers.

0 Kudos
Message 3 of 5
(4,165 Views)
Solution
Accepted by topic author Bendy227

Is there a reason that UIMessages are not sufficient?

 

Just off the top of my head here are a couple concerns with not using UIMessages:

  1. How does the UI know when the sequence file is at the point to set the value.  Without an event or some sort of synchronization you cannot accurately do this.  UIMessages not only ensure the right information but they also help with synchronization.
  2. The Engine doesn't know this information and the Execution View Manager only knows information for the current execution it is tied to (which changes throughout the life of a test run).  Basically the front end callback, the model and other factors can spawn short executions briefly tied to the execution view manager.  So if you grab the sequence context of the current exection it may not be the right one.
  3. Writing a UI in such a manner will couple the UI to your specific sequence file.  At this point you may as well use network variables or global variables or global queues.  These might even be better options.

 

The situation you described is exactly why UIMessages were created.  Maybe you can help me understand why you are set on using the pointers you already have?  There might be a better solution for your case if I am misunderstanding you.

 

Thanks,

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 5
(4,160 Views)

well, I was just thinking that once the execution is running, it is able to get or set value, but UIMessage maybe a good way to do it, and it works fine, so thanks for the solution.

0 Kudos
Message 5 of 5
(4,123 Views)