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 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 copy function of conditional structure and event structure
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 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:LabVIEW Serial Port Debugging Notes
Next article:Converting strings to ASCII in LabVIEW
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Test Measurement Articles
- 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?
MoreSelected Circuit Diagrams
MorePopular Articles
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
MoreDaily News
- 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
- Sandia Labs develops battery failure early warning technology to detect battery failures faster
Guess you like
- The 2019 TI Industrial Applications Seminar is coming, and the Ningbo special session is waiting for you to sign up!
- [ST NUCLEO-H743ZI Review] Try to play with DAC2ADC
- 360 was reported to have a massive layoff, and the entire security service team was disbanded on the spot.
- [Anxinke UWB indoor positioning module NodeMCU-BU01] No.002-Hardware test environment construction
- GPS signal acquisition problem under ZSTACK protocol stack
- Powering Smart Homes with the bq25606 Simple Charger
- Active and passive cell balancing for battery packs
- Play with smart speaker design: Hold TI system solutions and look forward to unlimited possibilities in the future!
- Things you don’t know about Qorvo’s acquisition of Active-Semi!
- The problem of program running away