LabVIEW programming skills--copying function of conditional structure and event structure

Publisher:jiaohe1Latest update time:2012-01-05 Keywords:Labview Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

When writing a medium-sized program, state machines and event structures are common design patterns. SR (SHIFT REGISTER) is often used to transfer data between various cases. When there are many cases, it is often the case that SR is forgotten to be connected or a new SR needs to be added. This is very troublesome and requires switching between dozens of cases and rewiring.

LV's case structure and event structure have a very important function "case or event copy function". With this function, the above problem can be easily solved.

When designing a program, some SRs must be reserved. When not in use, set them to BOOLEAN type, which will not take up a lot of memory space.
For conditional judgment, SR can be set to BOOLEAN ARRAY, so that an SR can represent the state of multiple bits, which is equivalent to the M intermediate relay of the PLC.

For common structures, they should be stored as templates (.VIT). The following is a template for a continuous single loop. Taking


the case structure as an example (the event structure method is the same)


, all SRs can be automatically connected by copying. When using the state machine, a "BLANK" is often designed. Blank CASE, this CASE does not perform any actual operation, the only function is to be a copied CASE, the proper use of the copy function can greatly improve programming efficiency.

Keywords:Labview Reference address:LabVIEW programming skills--copying function of conditional structure and event structure

Previous article:Several issues that must be paid attention to when using virtual oscilloscopes
Next article:In-depth exploration of labview--time node function in LABIVEW

Recommended ReadingLatest update time:2024-11-16 20:43

Developing Algorithms with LabVIEW MathScript: Part 2 - MathScript Interactive Window
Overview This series of articles provides you with exercises to get familiar with LabVIEW MathScript. This article describes an example of using the LabVIEW MathScript window. Table of contents MathScript Meaning LabVIEW MathScript Window Using the MathScript Window for Algorithm Development Related Links
[Test Measurement]
Developing Algorithms with LabVIEW MathScript: Part 2 - MathScript Interactive Window
Design of automatic beverage machine based on virtual instrument technology labview
Automatic beverage machines are common in daily life, such as those commonly found outdoors, in shopping malls, on buses, and in subways. There are many ways to design an automatic beverage machine system. For example, small and medium-scale integrated circuits can be used to form an automatic beverage machine system,
[Test Measurement]
Design of automatic beverage machine based on virtual instrument technology labview
LabVIEW Image Acquisition Related (I)
When acquiring images once, Snap.vi is often used for programming. If we acquire images continuously, we will think of the following mode. snap However, the mode in the above figure is slow in acquiring images, because Snap.vi includes initialization and shutdown, and the fastest case takes 120ms. In order to
[Test Measurement]
Development of a portable automobile instrument tester based on LabVIEW -- purpose and term explanation
  The content of this paper is a portable automobile instrument test system based on LabviEW. Therefore, we must first study the types and structures of instruments, understand and analyze the structural principles and display principles of the speedometer, tachometer, water temperature meter, fuel meter, odometer, va
[Test Measurement]
Development of a portable automobile instrument tester based on LabVIEW -- purpose and term explanation
In-depth exploration of labview-how to implement C-like function pointer calls
The concept of function pointers exists in C language. For the same number of parameters and parameter types, as well as the same function return value, different functions can be dynamically called to achieve different functions by passing function pointers. Let's first look at an example of a function pointer call
[Test Measurement]
In-depth exploration of labview-how to implement C-like function pointer calls
Monitoring Historical Sites Using LabVIEW and NI Wireless Sensor Networks
The Challenge: Protect historical relics by monitoring environmental factors without affecting their original appearance. The Solution: Developed a monitoring system for the Santa María de Mave Church using LabVIEW, NI Wireless Sensor Networks (WSN), and the NI WLS-9163 interfa
[Test Measurement]
Monitoring Historical Sites Using LabVIEW and NI Wireless Sensor Networks
LabVIEW Robotics Module - Special Algorithms in the Robotics Palette
Overview This tutorial introduces the robotics algorithms that come with the LabVIEW Robotics Module software. From sensors to path planning, you can use this product to design the next generation of complex automation systems. The LabVIEW Robotics Module comes with a new, fully functional Robotics pal
[Test Measurement]
LabVIEW Robotics Module - Special Algorithms in the Robotics Palette
Design of real-time monitoring system for photovoltaic power generation based on LabVIEW and RS485 communication
A photovoltaic power generation monitoring system based on LabVIEW data acquisition and RS485 communication is designed, which can monitor the operating electrical parameters and environmental parameters of the photovoltaic power generation system in real time and count the power generation information. The system col
[Power Management]
Design of real-time monitoring system for photovoltaic power generation based on LabVIEW and RS485 communication
Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号