I'm trying to modify the CVI Operator Interface application to update the execute panel with some step information during the execution of the program. i.e. I want to display the measurement, high & low limits during the run WHEN TRACING IS DISABLED. (Doing this, when tracing is enabled is easy, all you do is access the step record that's been constructed (I can cope with that!))
I've successfully implemented a User defined execution event to signal the User Interface application when the current step is a result (using TS_UIMsg_UserMessageBase etc. I'm posting a UI Message in the Process Model under the ProcessModelPostStep so that I will only display if its a result step.) I've added a user defined entry in the execute.c module execution event switch statement which will call a function in the exedisp.c module to update the display. However, I don't have a context to the step that I can use. (I can't use e.g. the exeRec record since this is only completed with the context if tracing is enabled.) I've got a handle to the correct panel to write the information to, but how do I get the context to the current step when tracing is disabled?
Try using the PostUIMessageEx - it allows you to add in an ActiveX reference (you can use the reference to the step that you have inside ProcessModelPostStep) then in the same way as you get the numeric or string data from the UI Message in CVI, you can get the ActiveX reference too. (Don't forget to discard it afterwards)
Wow! That was quick! Thank You! (Unfortunately I've been looking at this using Teststand 1.0.2. The function only seems available in TestStand 2.0 (Never mind, however, the target project is in TS 2.0!)
Hi, no problem - btw, if you wanted to acheive this in TS 1.x, you could always write to a local variable with the ActiveX reference for the step concerned, and then use the msg reference that you have in the OI within the UI Message handler, to dig through to the Execution ->Sequence File->Sequence->Locals, or Execution->Thread->SequenceContext (and you can get almost anywhere from that).
Are these calls (i.e., PostUIMessageEx and TS_UIMsg_UserMessageBase) made from TestStand or CVI? I'm trying to do something similar with LabVIEW (I'm also working with the LabVIEW version of the TestStand3.5 OI) and I'm not sure how these commands translate.