NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph function problem in DLL when called from TestStand. OK when called from CVI.

Hi,

 

I'm cross posting this from the CVI forum where it hasn't yet had a responce. It maybe more of a TestStand issue than CVI.

 

I have a DLL which I wrote using CVI.

There isn't a UIR file.

When the process attaches, I call a function which;

  • Creates a panel with NewPanel().
  • Creates a number of controls including a graph with NewCtrl().
  • Traps new panel and new control errors.
  • Sets various panel and control attributes.
  • It does not display the panel.

The DLL has two functions to use the panel and it's controls.

  • A function to add plots to the graph.
  • A function that displays the panel and waits for the user to close it.

If I call these function from a CVI test application they work as intended.

 

If I call the functions from TestStand with the CVI debugger attached they work as expected.

 

If I call the functions from TestStand without CVI debugging then about 95% of the time the functions fail.

 

Failure is always at the following functions;

  • DeleteGraphPlot()
  • PlotWaveform()

The error returned by the functions is -4 which is the error code for an invalid handle.

 

To try and debug this I have written the handles to a file as part of the error trap and compared them to the handles written to another file when the panel and controls are created. They are the same and therefore should be vaild.

 

There are several other functions in the DLL which work correctly with TestStand although none of them use a panel or controls.

 

I'd be grateful for any insights.

 

John.

John C
0 Kudos
Message 1 of 6
(4,398 Views)

Hi John,

 

To further allow me to understand the problem that you are having, could you please provide me with the versions of  software that you are using? (i.e. CVI, TestStand...)

 

Thanks

0 Kudos
Message 2 of 6
(4,371 Views)

Hi,

 

Development PC

Win 7 Home  64-bit Completely up to date.

CVI 2103 13.0.2 (278)

TestStand 2010

 

Deployment PC

Win XP Prof 32-bit. Completely up to date.

Does not have CVI development system installed.

TestStand 2014

 

I'm also happy to post the DLL project and a simple sequence file.

 

Cheers,

 

John

 

John C
0 Kudos
Message 3 of 6
(4,369 Views)

Hi John,

 

Yes posting those would be fantastic. 

0 Kudos
Message 4 of 6
(4,365 Views)

CVI project, DLL and a simple sequence attached.

John C
0 Kudos
Message 5 of 6
(4,352 Views)

.

0 Kudos
Message 6 of 6
(4,345 Views)