1. How can Labview achieve the sequence of three events triggered by one event, and the time interval between these three events is 50ms? Answer: You can design the program by referring to the state machine, use the trigger event as the state control parameter of the state machine, and the three events that occur later as the three sequential states of the state machine in turn, and set the state switching time interval to 500ms.
2. Labview cannot view the parameters of the sub-vi in real time through local variables in the main program. Answer: You can only get the results after the sub-vi is run through local variables. You can use the control reference method to add an attribute node to the sub-vi to lead out a reference. In the main program, create a reference for the control to be displayed and connect it to the reference input port of the sub-vi. It can also be implemented using the vi server method.
3. How to display multiple Y-axis scales in a graph or chart and make each channel correspond to each scale? Answer: On the front panel, right-click the scale and select duplicate scales to create a new scale. Then right-click again and select swap sides to display the scale on the left or right side of the graph. Then right-click the curve plot on the plot legend in the upper right corner, select Y scales and then you can select the Y-axis SCALES corresponding to the curve. When multiple curves correspond to multiple Y-axis scales, the method is the same.
4. How to open a PDF file from LabVIEW? Answer: The simplest method is to use system exec.vi. Create a constant in the command line port of system exec.vi, enter the path of Adobe Reader, and add several parameters such as the file name to achieve the above requirements. For example: If you want to open the 1234.pdf file located in the C drive, you can write "C:Program filesAcrobt 7.0AcrobatAcrobat.exe"/t "C:1234.pdf" "username" where C:Program filesAdobeAcrobt 7.0AcrobatAcrobat.exe is the installation path of Adobe Reader, /t is the command parameter, C:1234.pdf is the file name to be opened, and the last username is the user's name.
5. How to display the system time in the graph of the collected data, and refresh it continuously with the time of the collected points. Answer: There are two ways. One is to collect waveform data and then output it to the graph, choose to display absolute time on the graph, and remove the ignore time stamp option. The second way is to collect data files, and then use the vi that gets time to get the current time, and then build the collected data file and the current vi into a waveform file and give it to the graph. The settings of the graph are the same as the previous method. In this way, the effect of constantly refreshing the time of the collected points can be displayed.
6. What do standard and HTML mean in report generation? Answer: STANDARD and HTML are report types that LV has itself, and can be printed without installing other text editing tools. STANDARD is a report format built into LV, which can be printed but not saved, which means that our reports do not have an electronic version. HTML is a file in web page format and can be opened with a browser. In fact, it is equivalent to LV helping us write HTML code. This format cannot be printed directly, and you need to specify the web page path before you can print it out. Also note that if a program uses report generation's vi, when packaging it into an exe file or llb file, you need to add two dynamic vi: _excel dynamic vi and _word dynamic vi. If the generated report samples a template, you need to add the corresponding template in the self-support file.
7. If you want to store the channel name, the signal being measured, the sampling rate and other data together with the acquired data in a file, what method should be used? Answer: It is recommended to use a file structure that was basically ignored before - TDM FILE format. This file format is based on binary mode, and a lot of external information can be added during the storage process, such as free text; free interger, etc., so it is quite suitable for storing such applications.
8. What is the difference between selecting and not selecting the option reetrant execution in the execution under vi property? Answer: If the main program executes the same sub-vi twice or more at the same time, if it is not selected, the sub-vi will be used in sequence; if it is selected, the sub-vi will be executed in parallel, increasing the program running speed.
9. Why can I open the LABVIEW program flowchart all the time after decrypting it? How can I make sure that every time I open vi, it is encrypted? Answer: If you decrypt the program flowchart password in LABVIEW, close the program, and do not exit labview, you can always view its flowchart if you open it again. The reason is that lv is not closed, so the password will always be stored in the memory, so you can still see the flowchart when you open it again. If you want to encrypt it every time you open it, just close labview after opening it once, and you will need to enter the password next time you want to view the flowchart.
10. Using vi server technology, how to open and run a vi and read the value of a control in another vi? Answer: 1) Call Open vi reference.vi and enter the path of the subVI to its VI PATH port; 2) Call Ivoke Node.vi and set it to Open FP; 3) Call Ivoke Node.vi and set it to Run VI; 4) Call Ivoke Node.vi and set it to Get control Value [Variant]; fill in the name of the stop button control of the subVI loop in the Control Name port; the value of the Get Control Value [Variant] input port is set to the corresponding control type of the control through Variant To Data .vi, and then output to the front panel, which can achieve the value of the VI control; 5) Finally, call Close Reference.vi to close the VI Server.
11. The continuous acquisition program is divided into two parts: configuration task state and acquisition state. In the configuration state, a valid task must be configured. Enter the acquisition state at the appropriate time as needed. In the acquisition state, use start task and read two vi and execute them in a loop. An error is reported immediately after the program starts. Answer: Because start task and read two vi are used in the acquisition state and executed in a loop, if start task is used again after the acquisition has started, the same resource will be started repeatedly, resulting in resource conflict and error. It is recommended that the start part be a separate state, and only read.vi is used in the loop execution state.
12. I suddenly can't find the Scrollbar on the front panel of LV7.1. It is very troublesome to view or operate the control display outside the screen. How can I find the Scrollbar? Answer: There is an option of Show scrollbar in FileVI PropertyWindow AppearanceCustomize.
13. How to make the time coordinate of Chart consistent with the computer system time in LV7.1? Answer: Select Absolute Time in the Chart property Format And Precision, and change the display mode to System Time Format and System Data Format. In the program flowchart, use Get Data/Time In Seconds to get the current time, convert it to double-precision floating point type, and input it into the Waveform Chart property node Xscale. Offset. Set the property node Xscale. Format to mode 7.
14. How to design the time output format of LV7.1 as hours: minutes: seconds. milliseconds? Answer: Use Get Data/Time In Seconds to get the current time. Another function is Format Data/Time String. This function is used to define the format of the output time. Enter the string %H:%M:%S%.3u on the time format string port, and then connect the time stamp to the time output of Get Data/Time In Seconds. The definition of the time format can be seen in the help.
15. Why does the front panel always appear behind the main program when it is popped up when calling a subroutine? Answer: Select the three options of default floating and modal in window appearance, set the main program's options to a lower priority and the subroutine's options to a higher priority.
16. How to read data from Excel for analysis? Answer: Use Excel Get Data.vi and use a two-dimensional character array as the parameter data type to read data from Excel as a string.
17. How to save data in Excel files? Answer: Use Excel Get Last Row.vi to get the number of the last row of data in Excel, and then save data from that row.
18. How to save files in Excel format 1) Use ActiveX technology to use LV as an ActiveX server. You can refer to the Frequency Response.vi example program in the National InstrumentsLabview 7.1examplesappsfreqresp.llb VI library. 2) Use the Report Generation toolkit, which shields the underlying ActiveX and is relatively simple to use, but you need to purchase it. 3) Save it as text with the suffix .xls. This way, you can also open it with Excel, but you cannot modify and save it with Excel, otherwise it will be automatically modified to an Excel document, and you will not be able to operate it with LV in the future.
19. How to display both decimals and integers in a table? Answer: What is displayed in the table is a string. The display of decimals or integers is completed in the process of converting into strings before putting into the table. Therefore, you can convert integers and decimals into strings respectively and then merge them and output them in the table.
20. How to make a string control with a transparent border? Answer: Select a classic simple string control, use the coloring tool in the tool template, select the "T" in the upper right corner in the pop-up dialog box; the same as transparent, and then color the control.
21. How to implement loop collection and judgment of the collection results, place a Boolean alarm light on the front panel, save only the alarm data, and play it back? Answer: Store vi plus a case structure, and use the Boolean alarm light as a judgment. If it is true, store it, and if it is false, do not store it. There are two forms of playback, namely: you can store the test data and then call it back. You can also save the graph as a picture.
22. How to write the number of loops i of the While loop into the row header ColHdrs[] of the Table? Answer: Create a property node of the Table, with the property ColHdrVis=T to display the row header. Connect ColHdrs[] to a string array. Add 1 to the number of loops i, and then convert it to a character type through Number To Fractional String with a precision of 0. Add a shift register, assign an initial value of an empty string array, build the array, connect the upper input to the shift register, the lower end to the number, and the right end to ColHdrs[] and the other end of the shift register.
23. The serial port program is packaged and installed on a machine without LV environment. Why is the serial port unavailable? Answer: For LV7.1 version, select Advanced/Serial Port Support on the Installer page in Application Builder.
24. When using a CLF node to call a function in a DLL, if the data type specified in the original function is a structure, how should the data type be specified during the CLF configuration process? Answer: You can select the data type (TYPE) as Adapt To Type, and then connect a Cluster to the output or input port. The definition of this Cluster is the same as the definition of the structure in the original function. After selecting Adapt To Type, the data type connected to the port is the data type that interfaces with the function. [page]
25. During the running of the sub-VI, how to pass the data to the main VI that calls it in real time, instead of waiting for the sub-VI to finish running before obtaining the output data of the sub-VI in the main VI? Answer: Using the property node with control parameters can achieve the purpose of modifying the main VI properties in the sub-VI. Since the value of the control (Value) is also one of the properties of the control, the control parameter can be used to meet the above requirements. In the sub-VI, use the property node with control parameters to write the data to be passed to the main VI into this property (Value), set the control parameter to Control, and define it in the connector of the sub-VI; in the main VI, establish a control parameter for the control that receives the sub-VIshuju, and connect this control parameter to the sub-VI, so as to achieve the requirement of obtaining the sub-VI data in real time in the main VI. In fact, I don’t quite understand the above paragraph myself, what is the property node with control parameters. I looked at it these two days and found that the QUEUE of VI SERVER can realize the real-time transmission of data from SUBVI to MAINVI.
This is the front panel of a queue example, and the following is the block diagram
.
This is the block diagram of MAINVI
This is the block diagram of SUBVI.
26. There are two types of events in the event structure, one is the notification event (Notify), and the other is the filter event (Filter). What is the difference between these two events? Answer: For notification events, the program can sense the occurrence of the event and respond to the event, and then process the task defined in the event structure; for filter events, after the program senses the occurrence of the event, it first processes the task defined in the event structure, and then decides whether to respond to the event based on the setting in the time structure (Discard?). For example, the time is Panel Close, and a dialog box pops up when the event occurs. If it is a notification event, the front panel is closed by responding to the event first, so there is no way to process the task of "pop-up dialog box"; if it is a filter event, the task of "pop-up dialog box" is processed first, and then the value of Discard in the event structure is used to determine whether to close the front panel. If Discard is T, it will not be closed, and if it is F, it will be closed.
27. The LV7.1 main program has been completed. Before the main program runs, you want to execute another interface first. When you exit the interface, display the main interface again. How to achieve this? Answer: Before the main program block diagram, you can hide the main program front panel, call the subroutine, and then display the main program front panel after exiting the subroutine. This can be achieved through the VI property node. First call a property node, right-click and select Select Class/VI Server/VI, and then select the Front Pannel Window/State property in the properties, which is divided into Hide and Standard. For the demo program, see the "Main Interface Hiding" discussed in the AE-01labview programming technology in project process management.
28. How to save the contents of the LV7.1 front panel control (graph) as an image file in LV? Answer: Right-click the control to create an Invoke Node and select the method "Get Panel Image"; in addition, call the VI under Graphics & Sound/Graphics Formats to write the image obtained in the second step into the corresponding format file.
29. When using MATLAB in the LV program, after generating an exe file, it is found that the file can be run but the running interface cannot be popped up. Answer: If MATLAB is used in LV, a file named MATLAB script.dll needs to be added as a supporting file when generating the EXE file. In addition, the MATLAB software must be installed on the target PC.
30. In LV7.1, what settings are needed to call and run the VI on another machine using the VI Server method? (Both machines are in the same network) Answer: 1) Select TCP/IP for Protocols under Tools/Options/VI Server: Configuration so that the VI Server can be used in the network. Otherwise, the VI Server can only be used on the local machine. 2) Set the host IP of the accessible VI Server under Tools/Options/VI Server: TCP/IP Access. If this is not set, the remote machine will not be able to call the required VI.
31. In LV7.1, how to remove the windows close button on the front panel after running the program? Answer: You can go to LV's front panel FILE/VI properties/windows appearance/customize, uncheck allow user to close window, save the settings, and you can achieve the effect after running.
32. How to clear the Graph on the front panel in LV7.1, that is, to make the Graph display data again instead of displaying historical data each time it is run. Answer: In the Graph, this can be solved by creating a Local Varible and assigning it to null. In the Chart, this can be solved by creating a History Data property node and assigning it to null.
33. In LV7.1, how to extract the index values of all elements that meet the conditions in an array and save them into a new array? Answer: This can be done using shift registers, Build Array and Select functions. The specific methods are as follows: 1) Use a FOR loop, add a shift register on the loop border, and initialize it to a one-dimensional empty array of type I32; 2) Use the Select function inside the loop, and judge an element in the array each time the loop is looped, and send the judgment result (Boolean type) to the "s" input of Select; 3) Use the Build Array function each time the loop is looped to directly connect the left shift register to the "f" input of the Select function, so that the input of the Select function is the index value of all elements that meet the conditions; 4) Connect the output of the Select function to the shift register on the right. After the program ends, the data in the right shift register of the For loop is the required index value.
35 What is the difference between a shift register and a feedback node? Answer: The starting end of the feedback node arrow is equivalent to the right end of the shift register, and the end of the arrow is equivalent to the left end of the register. The difference is that the left end element of the shift register can be increased by pull-down, while the port of the feedback node cannot be increased.
36. How to display the front panel of the subVI? Answer: Right-click the subVI, select SUBVI NODE... and then select the second option SHOW... When the subVI is called, the front panel will be displayed.
37. The pop-up window cannot perform any operation and is blocked by the main interface. How to solve it? Answer: In the main interface VI properties, in the windows appearance, in the customs, set the windows behavior to normal, so the main interface remains in the forefront and should be set to default.
38. How to implement a pop-up window by pressing a corresponding key in the program, and continue to open other windows when the window is already open? Answer: Use parallel loops in the program flowchart. Each subVI that may be run (open its window) and its running condition (key press) each occupy a loop. Each loop is independent of each other and does not interfere with each other. When considering closing each window at the same time, you need to use global variables.
39. When scheduling Vi, some controls on the panel are often moved accidentally. It takes a lot of effort to rearrange these panel controls. Is there any way to fix the position of the designed controls? Answer: First, we can set the VI to run or edit mode through the Change To Run/Edit Mode command in the Operate menu. The movement of panel controls is only valid in edit mode. The position of any control cannot be moved in run mode. The second method is to select the specified control (multiple selections are allowed), and then select the LOCK command in the Reorder drop-down menu of the menu to lock the specified control. In this way, unless the Unlock command is used to unlock it, the position of the specified control cannot be moved.
40. Why is there no data transmitted from the output port of the subVI node? Answer: The main reason for this type of problem is that there is a loop in the subVI. If the loop in the subVI cannot be launched, the subVI node will keep running. For the data flow programming mechanism of LV, if a node is not executed, all its output ports will not have valid data output. Solution: One is to bring the loop in the subVI to the main VI. The other is to use global variables and use parallel loops in the main VI to control the end of the subVI.
41. How to achieve full screen display in LABVIEW? Answer: 1) To achieve full screen display, check File/VI Properties/Window Size/Size the front panel to the width and height of the entire screen. 2) Whether the control is displayed or not, first, if you want to hide it completely, you can put the control in an invisible place on the interface and it will not be displayed; the second method is that you can use the properties of the control to control the visibility of the control. The specific method is to right-click the mouse in the program flowchart/Create/Properties Node, select Visible, and change it to Change to Read. Set Visble to True or False to control whether the control is displayed.
42. How does LV continue to save data in Excel files? Answer: Use Excel Get Last Row.vi to first get the number of the last row of data in Excel, and then continue to save data from that row.
43. When you click on a graph with the mouse, the size of the graph changes. When you move the mouse away, the size of the graph returns to its original state? Answer: You can use an Event Structure to do this. Add two events (one for mouse click and the other for mouse move). By assigning different values to the PlotArearSize property node of the graph in these two events, you can change the size of the graph.
44. How to use LABVIEW to program and detect USB flash drives? Answer: You need to call the Windows API function GetDriveTypeA, whose function return value drive letter type data type is long integer, and the input parameter is the detection drive letter. Call CLFN.vi and select windowssystem32kernel32.dll, select GetDriveTypeA, set Return Type to Numeric Signed 32-bit Integer; then add parameter nDrive, set parameter type to STRING and format to C String Pointer. At runtime, fill in the USB flash drive letter to be detected at the input end, and when the return result is DRIVE_REMOVABLE, it means that the USB flash drive is removable.
Previous article:Three Methods of Driving Data Acquisition Cards in LabVIEW
Next article:Several issues that must be paid attention to when using virtual oscilloscopes
Recommended ReadingLatest update time:2024-11-17 06:02
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- Which one is more power-efficient, NB-IoT devices or Cat-M devices?
- TL5708 development board program writing, compiling, burning and running tutorial
- TI OMAP-L138 (fixed-point/floating-point DSP C674x+ARM9) expansion IO signal, baseboard B2B connector
- A newbie's question: What should I do if the switching power supply does not vibrate?
- Share the cost of actual combat exercises
- I used STM32MP1 to build an epidemic monitoring platform 3—Implementation of epidemic monitoring platform
- [TI mmWave Radar Evaluation] 2+AWR1443 EVM board power-on and initial test
- [National Technology N32G457 Review] 8 Solve the problem of unsuccessful SPI and CAN device mounting
- High bandwidth + high current + high voltage ATA-214 high voltage amplifier
- Infinite gain multi-channel negative feedback (MFB) second-order Butterworth low-pass filter parameter conversion