LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with panels

HI

My system uses TS3.0 and CVI7.0.

I have created 3 panels, all in the same filename.uir and all have exactly the same size. In my application, I load the 3 panels into memory during the setup portion (of TS) without displaying them.

In the main sequence (of TS) I used DisplayPanel and HidePanel in order to show the approperiate one. (The 3 panel are located at exactly at the same coordinates).

Is there any problem doing that?
Is there any precocious I should be aware of?

Anyway, the problem appears at a certains place when i try to do DisplayPanel. It causes SystemException error (-17502). To make things worse, I'll add that sometimes (usually the first time) it does work and display the panel.

Any idea?

Meantime, I was chang
ing my applicatoin so that I will use only one panel. It seems to work that way, but I don't like this solution and prefer to be able to wrok with 3 different panels.

Thanks
Rafi
0 Kudos
Message 1 of 3
(3,149 Views)
Hi Rafi,
I've seen similar before usually when trying to discard or open panels that weren't loaded in the same thread as they were loaded in.
This example may be useful...

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3F12356A4E034080020E74861&p_node=DZ52195

As should this one :

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B9290F6A3A2A4E9AE034080020E74861&p_node=DZ52000_US

How are you storing the reference to the panels? Is it a global in the DLL or are you not using DLL's?

Thanks

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 3
(3,149 Views)
Thanks Sacha,

I will study the examples in the following few days.

In my program, I load the panel in the 'setup' portion (of TS) and store them in globals in the DLL. I'm attempting to discard the panel in the 'cleanup' portion (of TS).

When it fails, I see error -129 when I'm attempting to discard the panel. It has something to do with multithreading (I geuss) which is weird because niether use multithreading, nor do I know to do it...

Is it possible that, somehow, without realizing it, I run more than one thread?

Thanks
Rafi
0 Kudos
Message 3 of 3
(3,149 Views)