From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Setup Standard IO and DLLs

Hi,

 

This isn't really a big problem, but something that I'm curious about.

I use TestStand with CVI DLLs. I like to use the standard io window to show the operators data during a long test.

 

Can someone please explain to me why

these call won't work in a DLL

//SetStdioWindowVisibility (1);
 //SetStdioWindowPosition (740, 40 );
 //SetStdioWindowSize(240, 800);
 

but this one does.
 SetStdioWindowOptions (10000, 0, 400);

 

Just wondering

 

Curt

0 Kudos
Message 1 of 4
(2,016 Views)

Hi!

Only for double checking, which version of TestStand and CVI are you running?

Any particular step to reproduce it? 

0 Kudos
Message 2 of 4
(1,986 Views)

Hi,

 

Thanks for the reply.

I'm using TestStand and LabWindows 2012

 

Here's the function called from TestStand.

The first 3 functions return error -3.

"This function can be called only from the main thread of your program ".

 

As I stated in the previous post, it's not a big deal but it doesn't make any sense why the set  options function works and the others throw an error

 

void __declspec(dllexport) setupStandardIO(CAObjHandle seqContextCVI,
        char reportText[1024], short *errorOccurred, long *errorCode, char errorMsg[1024])
{
	    
	sprintf (reportText, "Setup Standard IO Window");
    
    logMessage(LOGFILENAME,"%s\n", reportText);

	//these functions don't work in a dll!
	
	//SetStdioWindowVisibility (1); 
	//SetStdioWindowPosition (740, 40 );
	//SetStdioWindowSize(240, 800);
	
	SetStdioWindowOptions (10000, 0, 400); //max 10000 lines, 0 = bring to front off, show 400 lines
    
	return; 
}

 

Thanks,

 

Curt

0 Kudos
Message 3 of 4
(1,962 Views)

Thanks for the steps,

Let me try to set up everything.

Curt.

 

0 Kudos
Message 4 of 4
(1,952 Views)