How to create a global variable. Everyone must know the difference between global variables and local variables, and if you don't understand the concept, then I'm afraid you won't be able to write a perfect, slightly larger program. In the surrounding of the software development time two or three years of college students, often find this concept unclear situation.
When we understand that a global variable is actually a variable that can be seen in every program file, it is not difficult to understand the creation of global variables. In the book I read, I introduced two ways to build global variables.
Method 1: In the back panel of a VI, select Window-->show Functions pallette-->all functions-->structures-->global. Then drag it to the back panel, Formed a blue ball with a "?" The icon, right--->open Front Panel, opens a VI. Then, create a control in the open VI that you need to create a global variable. In the back of the previous panel, right-click the control you created in the vi that you just opened.
Method 2: First file-->new from the back panel of the program ... To create a global variable, you actually select the menu after you open a VI. Here we create a control that creates global variables, and we can build many.
Next, we select Window-->show Functions pallette-->all functions-->select a VI in the program back panel. Select the vi that we just established. This creates a global variable in the back panel. But if we build multiple controls in the Global VI, we can click on this global variable and right--->select item...--> Select the global control we want to match.
If we have a good understanding, we can save some steps. You can use this method.
1. Controls that store global variables in a VI
2. What global variables are required in the program file-->new ... Create a global variable.
3. Click on this global variable, right--->select item...--> Select the control we want to create the global variable.
Creating global Variables