The preface to the previous article describes how to use Quickdrop to implement fast code placement, and today we'll talk a little bit about how to quickly place blocks of code. In the text labviwe program design, we always do the repetitive writing at the architecture level, take the most common event structure, place while loop and event structure is the most common supporting operation, simplifying these two steps, then will save a lot of time at the architecture level.
the effect of the final implementation is as follows:before the code is placedafter the code is placedDesign Step Implementation Step 1 design the code blocks that need to be reused, from the more complex architecture to the simple code, where I've designed a basic event structure
Key Features:1. Basic error handling 2. With a stop event, time-out, front panel shutdown event
Main uses:In the design of some simple test demo program, you can quickly build the required code framework implementation step two to save the code to
X:\Program Files (x86) \national Instruments\labview 2015\user.libUnderImplement step threeDesign an icon that facilitates subsequent differentiationImplement step four in the menu bar open tools-->advanced-->edit pallet Set ...
Implement step five find our saved VI, right-click on the VI, choose Place VI Contents
After the setup is complete, click Save Changes to open the right-click menu on the left side of the blank, and you can see the design code snippet click on the palette, drag the mouse to the back panel to achieve quick placement of code advanced usage code fragments can be not only architecture, but also some common tip, As shown: You can place comments in a specific format: You can also place some specific notation and comment fragments and you can also put some FGV
If you feel that some code use frequently, combined with shortcut keys, more quickly into the code to place the link PostScript some LabVIEW programming skills will greatly improve the efficiency of programming, here only to introduce these things, put in use, how to use, just to see a person's preferences.
Quick placement of the "LabVIEW Tricks" code block