Labview Basic FAQ

Publisher:知者如渊Latest update time:2019-11-22 Source: elecfansKeywords:Labview Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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 always open the LABVIEW program flowchart after decrypting it? How can I make sure that every time I open vi, it is encrypted? Answer: If you decrypt the password of the program flowchart 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 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.


18. How to save a file 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 automatically be modified to an Excel document, and you cannot use LV to operate it 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.

[1] [2] [3]
Keywords:Labview Reference address:Labview Basic FAQ

Previous article:Rail Position Monitoring Using LabVIEW and NI Vision Software
Next article:Design and Implementation of SIP System Simulation Based on LabVIEW

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号