Overview
Timing is critical to all test, control, and design applications and must be considered as a key consideration in your system. Timing and synchronization techniques relate events to time when coordinated actions need to be performed. For software to perform these coordinated actions, programs must be synchronized based on time. NI LabVIEW includes timing structures that you can use to synchronize your programs in your system.
LabVIEW Timing Principles—Nanosecond Engine and NI-TimeSync
LabVIEW uses a software component called the Nanosecond Engine to keep track of time in your program. The engine runs in the background and interacts with the operating system to manage time. There are several functions and structures in LabVIEW that use this engine to keep track of time, such as the Wait function and the Timed Loop structure. The Nanosecond Engine can use the local real-time clock (RTC) or it can be driven by an external reference clock through the NI Timing and Synchronization Architecture (NI-TimeSync) (Figure 1).
Figure 1. LabVIEW nanosecond timing mechanisms work with NI-TimeSync to provide clocks for applications.
LabVIEW 2010 introduces a new clock in NI-TimeSync. The IEEE1588 plug-in in NI-TimeSync 1.1 provides a synchronized reference clock with up to 1 ms accuracy. You can configure multiple instruments on a network to use the same IEEE 1588 reference clock, allowing multiple platforms to be synchronized on a standard Ethernet network. You can also configure devices to use the software 1588 precision time protocol through the NI Measurement & Automation Explorer (MAX) tool (Figure 2).
Figure 2. Configuring the device's time synchronization source from MAX [page]
LabVIEW Timing Structure - Timed Loop
A timed loop is a loop structure that executes when a configurable timing source generates an event. It can use a variety of timing sources (detailed in the following tutorials). If you develop applications for multi-rate processing, precise timing and synchronization, loop execution feedback, dynamically changing timing characteristics, or multiple execution priorities, you can use a timed loop. In addition to the strict timing characteristics of the timed loop, the timed structure can also be used to allocate processor resources for multi-core programming. With the timed loop, you can specify multiple timing properties including period, priority, deadline, offset, and delay. Combining these properties with a rich set of timing sources, you can create complex applications no matter what timing method is required.
Figure 3. LabVIEW Timed Loop structure using timing constants to execute code
Timing Sources for Timed Loops
Timing sources control the execution of timed structures. You can select from three types of timing sources: internal timing source, software trigger, or external timing source (Figure 4).
Figure 4. Timing sources for a Timed Loop structure: built-in timing sources, software-triggered sources, and external sources
Built-in timing sources
The built-in timing sources keep track of time using a nanosecond engine. You can configure a timed loop on a real-time (RT) target using either a 1 kHz clock or a 1 MHz clock. You can use a timed structure with millisecond resolution using a 1 kHz clock. All LabVIEW platforms that can run timed structures support the 1 kHz timing source. Targets that support the 1 MHz timing source can provide timed structures with microsecond resolution. You can also configure a Timed Loop structure to use these built-in timing sources as an absolute time reference to start the loop execution with a timestamp. For example, you can configure a Timed Loop to start at a certain time each day.
Another built-in timing source is the Synchronous Scan Engine. It synchronizes a timed structure with the NI Scan Engine. With this timing source, a timed structure executes at the end of each scan. The loop execution period corresponds to the Scan Period (µS) setting, which you configure on the NI Scan Engine page.
Software-triggered timing sources
You can create a software-triggered timing source to trigger a timed structure based on a software event. The Create Timing Source VI creates a software-triggered timing source. The Fire Software-Triggered Timing Source VI programmatically triggers a timed loop controlled by a software-triggered timing source. You can use a software-triggered timing source as a real-time-compatible event responder or to notify a consumer loop in a producer-consumer model when new data is available.
External Timing Sources
You can create external timing sources to control timed structures with NI-DAQmx 7.2 or later. Use the DAQmx Create Timing Source VI to programmatically select an external timing source. You can also use a variety of NI-DAQmx timing sources, including frequency, digital edge counters, digital change detection, and task signal sources to control timed structures. Use the DAQmx Data Acquisition VIs to create the following types of NI-DAQmx timing sources to control timed structures. Frequency
—Creates a timing source that executes a timed structure at a certain frequency.
Digital Edge Trigger—Creates a timed structure that executes on the rising or falling edge of a digital signal.
Digital Change Detection—Creates a timed structure that executes on the rising or falling edge of one or more digital lines.
Task Signal—Creates a timed structure that can be triggered to execute using a signal.
Timing and Synchronization in LabVIEW
LabVIEW provides the necessary timing and synchronization capabilities for your system using the language's built-in timing structures, nanosecond timing engine, and timed loop structures.
If you are not familiar with synchronization, you can visit Implementing Synchronization to learn more. Or view case studies in the industry.
To learn more about LabVIEW, visit ni.com/labview/
Previous article:Analysis and Reporting Features of LabVIEW 2010
Next article:Monitoring a Historic Site Using LabVIEW and NI Wireless Sensor Networks
Recommended ReadingLatest update time:2024-11-17 00:58
- 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
- 【nRF52840 DK Review】Bluetooth Mesh Test
- Live broadcast has ended [Microchip uses dsPIC33/PIC24 and ATECC608 devices to simplify security application design]
- Protection circuit design specifications (Huawei internal data)
- Question about the output current of SN74LVC4245
- What does this statement about LDO mean?
- RISC-V developers say: IDE is not comfortable to use, but IAR already has a RISC version, but...
- Help: Some questions about Canaan K510 CRB-KIT development kit
- National Undergraduate Electronic Design Competition Training Series
- 2019 Electric Competition Comprehensive Evaluation Waveform Generator Help! ! Urgent! !
- Free application: Pingtou Ge CB5654 intelligent voice development board, quickly realize storytelling machine and other products