LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

interactive execution window

Hi all,

I use CVI 8.5 but only now I started using the Interactive Execution window. I have some global variables in my main.c but they are not recognized in the interactive window ("Undeclared identifier panelHandle" for example).

Can anybody give me an example or a link of how to use this Interactive Execution window?

 

Thanks!

Kristel

0 Kudos
Message 1 of 6
(3,586 Views)

Interactive Execution Window is intended as a quick way to execute and test small portions of code; it has no interaction with the source code you are editing in other windows: all code and variable definitions must lie entirely within that window and some limitations apply to it.

Here you can read the online help page describing the IEW



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 6
(3,579 Views)

Roberto,

 

Although I use the IEW for small code snippets only and hence have not yet tried to use it together with global variables, the help on IEW says that the IEW can access functions and data declared as global in a Source window... Did I get it wrong, too?

0 Kudos
Message 3 of 6
(3,576 Views)

Well, I didn't noticed it! Smiley Embarassed

 

I made some test and IEW can effectively catch variables declared as global in a source file, but not if declared in a include file common to all source files in the project. Since all my global declarations are in such files I cannot get them in the IEW. I conformed with it and probably this is the reason I dodn't noticed that small note in the help.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 6
(3,570 Views)

Hello Roberto,

many thanks for your answer. Could you give me a little example of those tests you did? that would be very helpful!

 

Regards,

Kristel

0 Kudos
Message 5 of 6
(3,557 Views)

Well, it's no difficult...

 

Open a project of yours, run it in order to link it and have the variables filled with some value, next go to the execution window and type

extern int myVariable;

DebugPrintf ("%d\n", 'myVariable);

replacing 'myVariable' with one variables of yours: its value will be printed in Debug Execution window.

This works provided the variable is declared as global in a source file but not as static.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 6 of 6
(3,540 Views)