Latching controls will toggle their value for a short period of time. Unlike switching, latching controls will return to their original value at some point in time. Latch-when-pressed Booleans will make the toggled value available as soon as the user clicks the control. Latch-when-released Booleans are toggled for a short while after the user releases the control. Latch-until-released controls will retain a toggled value while the control is activated by the user, and for a short period of time after the user releases the control.
Often it is undesirable for operations to occur in parallel. The technique used to ensure that nodes execute in a programmer-defined order is forcing the order of execution. There are a number of mechanisms available to a LabVIEW programmer to force the order of execution. Using error clusters is the easiest and recommended method to guarantee that nodes operate in a desired order. Error Out from one subVI will be chained to the Error In of the next VI. This is a very sensible way of controlling the order of execution, and it is essentially a given considering that most programmers should be using error clusters to track the status of executing code. Another method of forcing the order of execution is to use sequence diagrams; however, this method is not recommended. Sequence diagrams are basically LabVIEW’s equivalent of the GOTO statement. Use sequences only when absolutely necessary, and document what each of the frames is intended to do.
Most VIs have a wire diagram; the exceptions are global variables and VIs with subroutine priority. Global variables are memory storage VIs only and do not execute. Subroutine VIs are special cases of a VI that does not support dataflow. We will discuss both of these types of VIs later. LabVIEW is responsible for tracking wire diagrams for every VI loaded into memory.
Unless options are set, there will be exactly one copy of the wire diagram in memory, regardless of the number of instances you have placed in code diagrams. When two VIs need to use a common subVI, the VIs cannot execute concurrently.The data and wire diagram of a VI can only be used in a serial fashion unless theVI is made reentrant. Reentrant VIs will duplicate their wire diagrams and internal data every time they are called.
1.5 MENUS AND PALETTES
LabVIEW has two different types of menus that are used during programming. The
first set is visible in the window of the front panel and diagram. On the Macintosh, they are visible along the menu bar when the application is active. These are typical
pull-down menus similar to other applications.
FIGURE 1.7
The second set of menus are called pop-up menus (also referred to as popping up). Pop-up menus are made to appear by right clicking and holding down. Macintosh users must hold down the apple key while pressing the mouse button down.The pop-up menu that appears when the cursor is on a blank part of the front panelor block diagram is the Controls palette. Similarly, the Functions palette appears on the block diagram. You can select specific objects on the front panel or block diagram and pop up on them. The menus that
appear allow you to customize, modify,or perform other actions on the object.These menus can vary depending on theobject that you pop up on. Figure 1.7shows the pop menu that appears for adigital indicator.
The Tools palette is made visible selecting Show Tools Palette from theWindows pull-down menu from eitherthe front panel or block diagram. Figure1.8 displays the movable Tools palette.The first tool is known as the Operatingtool. This is used for editing numbers and
text as well as changing values on controls. The arrow represents the Positioning tool for selecting, positioning, and resizing objects on the front panel or block diagram. Next is the Labeling tool for editing text and creating labels. The Wiring tool is depicted by the spool and is used for wiring data terminals. The Object Pop-up tool is located under the arrow. This is exercised for displaying the pop-up menu as an alternative to clicking the right mouse button. Next to this is the tool for scrolling through the window. The tool for setting and clearing breakpoints is located under the wiring tool. The probe tool is used with this when debugging applications. Debugging tools and techniques are explained further in Chapter 6. Finally, at the bottom is the paintbrush for setting colors, and the tool for getting colors is right above it. trols. The arrow represents the Positioning tool for selecting, positioning, and resizing objects on the front panel or block diagram. Next is the Labeling tool for editing text and creating labels. The Wiring tool is depicted by the spool and is used for wiring data terminals. The Object Pop- up tool is located under the arrow. This is exercised for displaying the pop-up menu as an alternative to clicking the right mouse button. Next to this is the tool for scrolling through the window. The tool for setting and clearing breakpoints is located under the wiring tool. The probe tool is used with this when debugging applications. Debugging tools and techniques are explained further in Chapter 6. Finally, at the bottom is the paintbrush for setting colors, and the tool for getting colors is right above it.