NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

questions on user message

Solved!
Go to solution

I'm using TS to run a verification sequence of ni scope and want to display measurement in UI developed with LV. I just want to fresh my UI waveform graph after one measurement is completed so i use postusermessageex method as attatch file. The question is that the UI will not responding to this message and i think something is wrong with my UI code. Can anyone pls look at my code and give me suggestions, thanks very much.

 

 

0 Kudos
Message 1 of 4
(3,824 Views)
Solution
Accepted by topic author royceking

From a brief look at the code I noticed the following issues:

 

  • It looks like you are passing in the SequenceContext reference to the UIMonitor, but the UIMonitor is expecting an applicationManager reference.  You should pass this (a reference to the current applicationManager) in from your sequence instead:

    RunState.Engine.GetInternalOption(InternalOption_ApplicationManager)

  • Additionally, you will need to change the applicationManager reference in your monitor to an activeX reference rather than a container (otherwise you will be creating a new instance of the applicationManager).  The easiest way to do this is to change it to a constand, then back to a control.

I am unable to run your code due to missing dependencies, so please let me know if you are still having trouble after implementing the above.

 

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 2 of 4
(3,778 Views)

Thanks very much for you reply.

I tried your suggestions about changing ActiveX Container to ActiveX control, but get no results. Actually, the AppManger control is just used to setup callbacks. And what the UI monitor.vi expects is still the SequenceContext which is passed in the sequence step " Pre Set" by RunState.Thread.PostUIMessageEx(UIMsg_UserMessageBase +1,0,"",ThisContext,True)

 

Attatched is the whole file

0 Kudos
Message 3 of 4
(3,740 Views)

Thanks again!

 Problem solved by passing RunState.Engine.GetInternalOption(InternalOption_ApplicationManager) to the UI Monitor.vi 

0 Kudos
Message 4 of 4
(3,735 Views)