LabVIEW or C?

Publisher:painterLatest update time:2015-04-15 Source: ck365Keywords:LabVIEW Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
“Why is LabVIEW better than C?” As a LabVIEW product manager, I get asked this question many times.

Honestly, this is actually the wrong question to ask. There has to be a specific application context for this question to make sense (e.g., "Which language is better for this task, given these constraints?"). Without those details, the question is as meaningless as why bread is better than flour.

If you want to build a measurement and control system, using NI LabVIEW system design software can help you reduce risk, save money, and avoid unnecessary trouble, unlike low-level languages ​​such as C. I am not implying that LabVIEW is a "better" programming language than C - especially considering that most of LabVIEW is not only written in G, but also in C and C++. On the contrary, these two languages ​​have different advantages, and programmers should choose them reasonably to achieve their goals.

 

 

Why is LabVIEW compared to bread? Read on

LabVIEW and C are like bread and flour. If you want to make a sandwich, you must first choose bread. If you want to make a cake, you must first use flour. Baking bread from scratch with flour is expensive and time-consuming (especially if you just want a snack), but if you want to make a cake, flour is essential. Similarly, you will find that choosing the best programming language is not an easy task. It comes down to using the right tool for the right job.

C language provides low-level control

C is more effective when application resources are limited and must be tightly managed. Because C is a relatively low-level language, even the smallest details, such as memory allocation and threads, must be considered carefully. Good programmers can use low-level control to eliminate most of the overhead caused by high-level applications. In addition, they can take full advantage of the target architecture or host operating system properties to achieve higher performance.

For these reasons, NI programmers write most of the LabVIEW libraries in C or C++. LabVIEW and C can run operations such as file I/O and analysis at speeds comparable because these operations are written in low-level languages ​​and optimized for the different platforms and operating systems supported by LabVIEW.

Efficiency Vs Control

Sometimes, if developers are efficient enough, there is no need to manually optimize the code. Reducing a little control and borrowing solutions to similar problems can greatly promote the high-quality development of the project. Programming languages ​​continue to move towards higher levels of abstraction, allowing you to focus more on the problem at hand instead of being bogged down by computational details.

LabVIEW: Parallel Execution and Real I/O

Regardless of the language used, high-level system design and low-level implementation are independent.

In measurement and control applications, programming is only one of the tasks of the system designer. Engineers rarely have time to update or rewrite old versions of software to meet improvements in computing and measurement hardware or operating systems. They make improvements by acquiring, processing, and presenting real data—not by exploring new ways to handle memory allocation and thread pools. With LabVIEW, you can create applications using the tested, supported, and maintained NI low-level code libraries. Choosing C means you need to implement, support, and maintain your own low-level libraries or purchase them from vendors (NI offers NI LabWindows™/CVI software and NI Measurement Studio)

From a grammatical point of view, C language has a strong ability to execute instructions continuously, and the CPU can process them at the fastest speed. For pure data calculations, when executing a single task and the instructions are relatively basic, C language is very suitable. LabVIEW uses a graphical syntax, which is more suitable for parallel execution tasks with real time constraints.

 

 

With LabVIEW, you can skip the basic building steps and go directly to customization.

LabVIEW is more than a programming language and an associated code library. When you use the LabVIEW integrated development environment (IDE) with NI hardware, you create a development experience that is greater than the sum of its parts. LabVIEW accurately identifies available hardware resources and displays available I/O channels and execution targets in drop-down menus and project names. During the editing process, you can prevent or detect incorrect configurations that can lead to costly, difficult-to-debug run-time errors. New generation measurement hardware, such as the NI PXIe-5644R vector signal transceiver, even allows LabVIEW to redefine its firmware to achieve performance levels that are not possible with traditional, disparate programming languages ​​and instruments.

Many projects are late or over budget because engineers underestimate the overhead required to pull together all the resources. When you use LabVIEW, hardware drivers return data in the same format as data analysis libraries, and UI widgets display technical data in the same format, eliminating the need to piece together disparate components.

Which is better: LabVIEW or C?

The best answer to this question is, "Anything is possible." As the Hitchhiker's Guide to the Galaxy says, unless you know your question or understand the problem you are trying to solve, the answer is meaningless. For skilled users, both LabVIEW and C are very useful tools that can solve almost any problem: LabVIEW is suitable for high-level test, measurement, and control applications, while C makes it easier to implement low-level, computationally intensive tasks.

If someone asks you which is better, LabVIEW or C, you can answer that both are possible. This may be the only way to guide the question in the right direction.

Keywords:LabVIEW Reference address:LabVIEW or C?

Previous article:NI LabVIEW and NI USRP Hardware Accelerate Cognitive Radio Research
Next article:When Mobile Technology Meets LabVIEW

Recommended ReadingLatest update time:2024-11-23 10:41

Developing Integrated Avionics with NI LabWindows/CVI, LabVIEW, and PXI
  challenge: Develop an integrated avionics test system   using commercial off-the-shelf (COTS) hardware with several non-standard video interfaces and a proprietary serial communication bus to reduce development cost and time.   solution:   Using NI LabWindows ™/ CVI and the Labview FPGA Module, a PXI chassis
[Test Measurement]
Developing Integrated Avionics with NI LabWindows/CVI, LabVIEW, and PXI
Ventilator Testing Based on LabVIEW
introduction With the development of testing technology and bus technology, automatic testing systems marked by virtual instruments have begun to appear. The so-called virtual instrument is based on the computer and bus system equipment as the hardware platform, and the software realizes the functions that original
[Test Measurement]
Ventilator Testing Based on LabVIEW
Wind Tunnel Data Acquisition and Control System Based on LabVIEW
The Challenge: Develop a comprehensive, flexible and reliable test system for static and dynamic force measurements of aircraft configurations and components, for inlet testing of power equipment (i.e. inlet compatibility studies), for micro-oscillation testing for stability derivative evaluation, and for h
[Test Measurement]
Wind Tunnel Data Acquisition and Control System Based on LabVIEW
Development of Solar Jet Refrigeration Measurement and Control System Based on LabVIEW
1. Introduction  The development of air conditioning systems towards new energy and reducing electricity consumption is an inevitable trend. At present, worldwide, the research and application of solar-driven jet refrigeration, absorption refrigeration and adsorption refrigeration have received widespread attention
[Test Measurement]
Design of temperature and humidity LabView host computer monitoring system based on single chip DHT22
1. System plan This design uses AT89C52 microcontroller as the main controller. The LCD 1602 displays the temperature and humidity. LabView communicates with the host computer. The host computer displays the temperature. At the same time, the host computer can set the upper and lower temperature limits. When the measu
[Microcontroller]
Design of temperature and humidity LabView host computer monitoring system based on single chip DHT22
Storage of test measurement data in LabVIEW (2)
           Before analyzing the advantages and disadvantages of the TDM model, I think it would be best to list some technical requirements for data file formats.            There are many different file formats for test and measurement data on the NI software platform, several of which support the TDM model. It is no
[Test Measurement]
Design of Pulse Signal Detection System Based on LabVIEW
Application areas:Automated measurement Challenge: According to the human body impedance characteristics, measure the human pulse signal by picking up the impedance change. Use the powerful digital signal processing function of LabVIEW to restore the pulse waveform, and extract and store the characteristic information
[Test Measurement]
Design of Pulse Signal Detection System Based on LabVIEW
LabVIEW applied to real-time image acquisition and processing system
1. Introduction LabVIEW, a virtual instrument development platform of National Instruments (NI), uses a graphical programming language, has a friendly interface, is easy to learn, and its matching image processing software package provides a wealth of image processing and analysis algorithm functions, greatly f
[Test Measurement]
LabVIEW applied to real-time image acquisition and processing system
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号