String programming is one of the difficulties in Labview programming . Sometimes, it is common to spend a whole day to make a string processing VI, especially for special communication protocols and frame structures of various special equipment.
Let's start with the simplest unsigned decimal integer
1. Unsigned DEC integer
For example, the string "1234" obviously includes all numbers, not characters (such as A, B, C, etc.). The question is how to determine it in the program.
Unsigned decimal integers only contain 0, 1..9, so we can use the C language method to determine it using ASCII values. The ASCII value of 0 is 0X30, and
1..9 are 0X31..0X39 respectively. By converting the string into a U8 array, the U8 array stores the ASCII value of the character.
LABVIEW provides a node for determining decimal characters, IS DEC DIGIT?, which can be used to simplify the program. At the same time, it is a polymorphic VI. LABVIEW has a special example program to illustrate its use. It should be noted that for a string, it only determines the first character.
Look at the input type it accepts.
Therefore, a simpler method for determining decimal unsigned integers is shown in the figure below:
Similarly, LABIVEW also provides nodes for determining hexadecimal and 8-forbidden, so the above method can be easily used to determine whether it is a hexadecimal and octal digital string.
LABVIEW does not provide a method to determine whether it is a binary string, but you only need to change the above 0X39 to 0X31 to determine whether it is a binary string.
2. Determination of unsigned floating-point numbers
. When comparing unsigned floating-point numbers, such as 1.234, with unsigned integers, you only need to determine whether it contains a decimal point. In addition, some integers use commas to represent the thousands separator, and similar methods can also be used to determine.
3. LABVIEW special type representation method
LABVIEW has several numerical representation methods
, so the judgment is very complicated, including the judgment of + - EKM, etc. The
following provides a general judgment method. Although it is general, the corresponding efficiency is relatively low. If you know the exact format, the above method is more appropriate.
You can directly judge +, -, scientific notation, SI, commas, etc.
Previous article:Labview tutorial on how to implement memory space sharing
Next article:Briefly describe the knowledge and understanding of virtual instrument technology and LabVIEW programming courses
- Popular Resources
- Popular amplifiers
- 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?
- In what situations are non-contact temperature sensors widely used?
- How non-contact temperature sensors measure internal temperature
- 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
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- American Internet celebrity man made his own rocket and fell to his death
- Send data to the serial port, and an error message appears.
- Xunwei IMX6 development board Android application-buzzer test
- Lithium-ion battery
- Sound Level Meter MASTECH MS6700 Disassembly Pictures and Information
- Design of Multi-channel Data Acquisition System Based on CPLD
- Could you please tell me what glue is used to stick piezoelectric ceramic sheets to ultrasonic sensors?
- Let's talk about what technologies we can use to help in the face of this pneumonia virus? ? ?
- EEWORLD University Hall----C2000 series new products bring convenience to servo and motor drive systems
- [GD32E231 DIY Contest] 01. GD32E231-start and creative content introduction