NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Execution Display Panel Handles

Does anyone out there know how to get the panel handle for an execution display.
I need to write some status information out to the display but cannot find
out how to get a handle to the panel.

Thanks in advance.
0 Kudos
Message 1 of 4
(4,717 Views)
Martin,

If you are going to use an operator interface in your system, it may
make more sense to merely modify your operator interface panel to
include this information. By modifying the operator interface, you
don't have any extraneous panels floating around.

From an execution, you can post custom UI Messages to your operator
interface to update data. If you aren't familiar with UIMessages,
refer to the TestStand 1.0.1 ActiveX API Reference help file. If you
don't have TestStand 1.0.1, you can download the help file, tsapi.zip,
from ftp://ftp.ni.com/support/teststand/updates/1.0/
tsapi.txt in the same directory explains how to install this file.
In this help file, there is a section, Writing an Application, which
contains a discussion of UIMessages. In addition, I made available an
example that shows how to modify the operator interface to use a custom
UIMessage. Download CVIOperatorInterfaceWithYield.zip from
ftp://ftp.ni.com/incoming/. If you aren't using CVI, let me know.

If you really do want a separate panel to display your data, you can
make DLL and store the panel handle as a global variable. Make an
exported function that opens the panel. Make other exported functions
to update your panel and close the panel.

There is an example, Open Panels During Execution which you can
download from:
http://digital.natinst.com/explprog.nsf/web%
2Fswgrp?OpenView&Start=1&Count=500&Expand=7.1#7.1
Yes, this is one long URL.

Paul Mueller
National Instruments

P.S. You can get the free update to TestStand 1.0 from
www.ni.com/advisor/ Just specify that you will upgrade from TestStand
to TestStand.

In article <38750d80@newsgroups.ni.com>,
"Martin Vincent" wrote:
>
> Does anyone out there know how to get the panel handle for an
execution display.
> I need to write some status information out to the display but
cannot find
> out how to get a handle to the panel.
>
> Thanks in advance.
>


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 2 of 4
(4,717 Views)
Thanks! Outstanding answer. That solved my panel handle problem. I can
now write out to the CVI operator interface execution display through a user
UIMsg_. But now I have another problem. To post a UIMsg I must have a thread
object. Some of the functions that I am using are pretty far down the call
stack. To access the Sequence Context passed by test stand to the original
test function call I would have to pass it through a number of other functions.
I may be digging a big hole here but is there a global that I could use
as a starting point to determine what thread I am in from a called function
without passing the sequence context as a parameter to every function? If
not, do you have an idea if there would be an object that I could store
as a global that would allow me to determine what thread I am in from a called
function. Or is there a static location that I can access the thread index
or id from?

paulemueller@my-deja.com wrote:
>Martin,>>If you are going to use an operator interface in your system, it
may>make more sense to merely modify your operator interface panel to>include
this information. By modifying the operator interface, you>don't have any
extraneous panels floating around.>>From an execution, you can post custom
UI Messages to your operator>interface to update data. If you aren't familiar
with UIMessages,>refer to the TestStand 1.0.1 ActiveX API Reference help
file. If you>don't have TestStand 1.0.1, you can download the help file,
tsapi.zip,>from ftp://ftp.ni.com/support/teststand/updates/1.0/>tsapi.txt
in the same directory explains how to install this file.>In this help file,
there is a section, Writing an Application, which>contains a discussion of
UIMessages. In addition, I made available an>example that shows how to modify
the operator interface to use a custom>UIMessage. Download CVIOperatorInterfaceWithYield.zip
from>ftp://ftp.ni.com/incoming/. If you aren't using CVI, let me know.>>If
you really do want a separate panel to display your data, you can>make DLL
and store the panel handle as a global variable. Make an>exported function
that opens the panel. Make other exported functions>to update your panel
and close the panel.>>There is an example, Open Panels During Execution which
you can>download from:>http://digital.natinst.com/explprog.nsf/web%>2Fswgrp?OpenView&Start=1&Count=500&Expand=7.1#7.1>Yes,
this is one long URL.>>Paul Mueller>National Instruments>>P.S. You can get
the free update to TestStand 1.0 from>www.ni.com/advisor/ Just specify that
you will upgrade from TestStand>to TestStand.>>In article <38750d80@newsgroups.ni.com>,>
"Martin Vincent" wrote:>>>> Does anyone
out there know how to get the panel handle for an>execution display.>> I
need to write some status information out to the display but>cannot find>>
out how to get a handle to the panel.>>>> Thanks in advance.>>>>>Sent via
Deja.com http://www.deja.com/>Before you buy.
0 Kudos
Message 3 of 4
(4,717 Views)
Martin,

You will have to pass the thread object or sequence context object through
your call stack. If you are already passing the sequence context, you can
get the thread object from the sequence context. In your functions, tou
might use a struct to pass data if you intend to pass more data at a later
time.

Alternatively, if you are using a DLL, you can store the thread or seq context
as a global variable, but this won't be thread safe if other threads will
access the same DLL.
Of course, you can use thread safe variables. CVI 5.5 and VC++ support this.

Thanks,
Paul

"Martin Vincent" wrote:
>>Thanks! Outstanding answer. That solved my panel handle problem. I can>now
write out to the CVI operator interface execution display through a user>UIMsg_.
But now I have another problem. To post a UIMsg I must have a thread>object.
Some of the functions that I am using are pretty far down the call>stack.
To access the Sequence Context passed by test stand to the original>test
function call I would have to pass it through a number of other functions.>
I may be digging a big hole here but is there a global that I could use>as
a starting point to determine what thread I am in from a called function>without
passing the sequence context as a parameter to every function? If>not, do
you have an idea if there would be an object that I could store>as a global
that would allow me to determine what thread I am in from a called>function.
Or is there a static location that I can access the thread index>or id from?>>paulemueller@my-deja.com
wrote:>>Martin,>>If you are going to use an operator interface in your system,
it>may>make more sense to merely modify your operator interface panel to>include>this
information. By modifying the operator interface, you>don't have any>extraneous
panels floating around.>>From an execution, you can post custom>UI Messages
to your operator>interface to update data. If you aren't familiar>with UIMessages,>refer
to the TestStand 1.0.1 ActiveX API Reference help>file. If you>don't have
TestStand 1.0.1, you can download the help file,>tsapi.zip,>from ftp://ftp.ni.com/support/teststand/updates/1.0/>tsapi.txt>in
the same directory explains how to install this file.>In this help file,>there
is a section, Writing an Application, which>contains a discussion of>UIMessages.
In addition, I made available an>example that shows how to modify>the operator
interface to use a custom>UIMessage. Download CVIOperatorInterfaceWithYield.zip>from>ftp://ftp.ni.com/incoming/.
If you aren't using CVI, let me know.>>If>you really do want a separate
panel to display your data, you can>make DLL>and store the panel handle as
a global variable. Make an>exported function>that opens the panel. Make
other exported functions>to update your panel>and close the panel.>>There
is an example, Open Panels During Execution which>you can>download from:>http://digital.natinst.com/explprog.nsf/web%>2Fswgrp?OpenView&Start=1&Count=500&Expand=7.1#7.1>Yes,>this
is one long URL.>>Paul Mueller>National Instruments>>P.S. You can get>the
free update to TestStand 1.0 from>www.ni.com/advisor/ Just specify that>you
will upgrade from TestStand>to TestStand.>>In article <38750d80@newsgroups.ni.com>,>>
"Martin Vincent" wrote:>>>> Does anyone>out
there know how to get the panel handle for an>execution display.>> I>need
to write some status information out to the display but>cannot find>>>out
how to get a handle to the panel.>>>> Thanks in advance.>>>>>Sent via>Deja.com
http://www.deja.com/>Before you buy.
0 Kudos
Message 4 of 4
(4,717 Views)