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.
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
- Popular Resources
- Popular amplifiers
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Arduino Nano collects temperature and humidity data through LabVIEW and DHT11
- Modern Testing Technology and System Integration (Liu Junhua)
- Computer Control System Analysis, Design and Implementation Technology (Edited by Li Dongsheng, Zhu Wenxing, Gao Rui)
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- How should I choose PCB surface treatment? How should I choose between HASL and OSP?
- Playing with Circuits (1) - High-Side Current Detection
- 3 Benefits of Using Low IQ Buck/Boost Converters to Extend Flow Meter Battery Life
- Introduction to Power Factor Correction Technology in AC/DC Front-End Converter Modules
- Raspberry Pi Foundation Launches $4 Raspberry Pi Pico with MicroPython Support
- EEWORLD University ---- Overcurrent Sensing Technology
- [Zero-knowledge ESP8266 tutorial] Quick Start 23 Applying OLED
- SIMterix-Simplies~3~ Verilog-A
- C2000 Power-on Boot Mode Analysis
- CAN bus research notes