Labview FAQ Differences

Publisher:HeavenlyMelodyLatest update time:2015-09-17 Source: eefocusKeywords:Labview Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Labview FAQ Differences

1. How can Labview achieve the sequence of three events triggered by one event, and the time interval between these three events
is 50ms?
A: You can design the program by referencing the state machine, and use the trigger event as the state control parameter of the state machine. The three
events that occur later are 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 subvi in ​​real time through local variables in the main program
A: You can only get the results after the subvi is run through local variables. You can use the control reference method to
add an attribute node to the subvi 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 subvi. In addition, 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?
A: 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 make the scale appear 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 same method is used. 

4. How to open a PDF file from Labview?
A: The simplest method: use system exec.vi to achieve it. 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.0
AcrobatAcrobat.exe"/t "C:1234.pdf" "username" where C:Program filesAdob
eAcrobt 7.0AcrobatAcrobat.exe is the installation path of Adobe Reader, /t is the command parameter, C:12
34.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.
A: There are two ways. One is to collect waveform data and then output it to the graph. On the graph, choose to display the absolute time and
remove the ignore time stamp option. The second way is to collect data files, and then use the vi that obtains time to obtain the current time
, and then build the collected data files 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 in report generation mean?
A: STANDARD and HTML are report types that LV has itself, and they 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 report does not have an electronic
version. HTML is a file in web page format, which 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 the web page path must be specified before it can be printed. Also note that if a program
uses the report generation vi, when it is packaged into an exe file or llb file, two dynamic vi need to be added:
_excel dynamic vi and _word dynamic vi. If the generated report samples the template,
the corresponding template needs to be added to 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 sampled data into
a file, what method should be used?
A: I recommend a file structure that was basically ignored before - TDM FILE format. This file format is based on binary
, 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 execution under vi property?
A: If the main program executes the same subvi twice or more at the same time, if it is not selected, the subvi will be used in sequence
; if it is selected, the subvi will be executed in parallel to increase the program running speed. 

9. Why can I open the LABVIEW program flowchart after decrypting it? How can I make it
encrypted every time I open vi?
A: 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 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 need to enter the password next time you want to view the flowchart. 

10. Using vi server technology, how can I open and run from one vi and read the value of the control in another vi?
A:
1) Call Open vi reference.vi and input 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 passed through Variant T
o After Data.vi is set to the control type corresponding to the control, it is output to the front panel, which can realize the acquisition of 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 according to the needs. In the acquisition state, use start task and read two 
vi and execute them in a loop. When the program starts, an error is immediately reported.
A: Because start task and read two vi are used in the acquisition state and executed in a loop, when the acquisition has started, the
same resource will be started repeatedly if start task is used again, 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. LV7.1 suddenly can't find the Scrollbar on the front panel. Now it is very
troublesome to see or operate the control display outside the screen. How can I find the Scrollbar?
A: There is a Show scrollbar option in FileVI PropertyWindow AppearanceCustomize. 

13. How can LV7.1 make the time coordinate of the Chart consistent with the computer system time?
A: 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 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 property node Xscale. Offset of Waveform Chart. Set the property node Xscale. Form
at to mode 7. 

14. How to design the time output format of LV7.1 to be hours: minutes: seconds. milliseconds?
A: Use Get Data/Time In Seconds to get the current time, and the other is the Format Data/Time String
function, which is used to define the format of the output time. Then input 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 called by a subroutine? A: Select the three items of default floating and modal in window appearance, and set the main program option
to a lower priority and the subroutine option to a higher priority. 

16. How to read data from Excel for analysis?
A: Use Excel Get Data.vi and use a two-dimensional character array on the parameter data type to
read data from Excel as a string. 

17. How to save data in Excel files? A: Use Excel Get Last Row.vi to first get the number of the last row of data in Excel, and then start saving data 
from that row . 18. How to save files in Excel format A: 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 it needs to be purchased. 3) Save 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 A: The table displays strings. Whether to display decimals or integers is done in the process of converting to strings before putting them into the table. Therefore, you can convert integers and decimals into strings and then merge them into the table.  20. How to make a string control with a transparent border A: 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 transparent, then color the control.  21. Loop acquisition and judge the acquisition results, place a Boolean alarm light on the front panel, only save the alarm data, and play it back. How to achieve it? A: 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 save 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 an image. 22. How to write the number of loops i of the While loop into the row header ColHdrs[] of the Table? A: Create a property node for Table, with the property ColHdrVis=T to display the row header, and ColHdrs[] to connect to a string array. You need to 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 to an empty string array, and connect the upper input of the build array 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. The serial port is not available. Why? A: For the LV7.1 version, select Advanced/Serial Port Support  on the Installer page in Application Builder . 24. When using the 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?



    































A: 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 of the function interface.


25. During the operation 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 run and
get the output data of the sub-VI in the main VI?
A: Using the attribute node with control parameters can achieve the purpose of modifying the main VI properties in the sub-VI. Since the value of the control (V
alue) 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 attribute node with the control parameter, write the data to be passed to the main VI into this attribute (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
.

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?
A: For the notification event, 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 the filter event, 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 according to the setting (Discard?) in the time structure. 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 front panel is determined according to the value of Discard in the event structure. 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. I want to execute another interface before the main program runs, and
then display the main interface when exiting the interface. How to achieve it?
A: Before the main program block diagram, you can hide the main program front panel, call the subroutine, exit the subroutine, and then display the main
program front panel. 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 Panel 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 program in LV to save the content of the LV7.1 front panel control (graph) as an image file?
A: 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. Using matlab in the LV program, after generating an exe file, it is found that the file can be run but the run interface cannot be popped up
.
A: If MATLAB is used in LV, a
file named MATLAB script.dll needs to be added as a support file when generating an EXE file. In addition, MATLAB software must be installed on the target PC. 

30. In LV7.1, using VI Server, what settings are needed to call and run VI on another machine on one machine
? (The two machines are in the same network)
A: 1) Select Protocols as TCP/IP under Tools/Options/VI Server: Configuration, so that
VI Server can be used in the network, otherwise VI Server is only used on the local machine. 2)
Set the host IP of the accessible VI Server under Tools/Options/VI S erver: TCP/IP Access. If you do not set it, the remote machine
will not be able to call the required VI. 

31. In LV7.1, how to remove the close button of windows on the front panel after running the program
A: You can remove the check mark of allow user to close window on the front panel of LV in FILE/VI properties/windows appearance/customize, 
save the settings, and the effect can be achieved 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.
A: In Graph, this can be solved by creating a Local Varible and assigning it to null. In Chart, this can be
solved by creating a History Data property node and assigning it to null. 

33. How to extract the index values ​​of all elements that meet the conditions in an array and save them as a new array in LV7.1
?
A: This can be done using shift registers, Build Array and Select functions. The specific method is as follows: 1) Use a FOR loop
, add a shift register to 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 executed, and send the judgment result (Boolean type) to
the "s" input of Select; 3) Use the Build Array function each time the loop is executed to connect the left shift register directly
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 right shift register. 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 element of the shift register can be added by pulling down, while the port of the feedback node cannot be
added. 

36. How to display the front panel of the subVI?
A: Right-click the subVI, select SUBVI NODE... and then select the second option SHOW... That is, when the subVI is called,
the front panel is displayed. 

37. The pop-up window cannot perform any operation and is blocked by the main interface. How to solve it?
A: In the main interface VI properties, the windows appearance in the customs is set to normal behavior
, so the main interface remains at the forefront, which should be set to default. 

38. In the program, press the corresponding key to pop up the window, and continue to open other windows when the window is already open?
A: Use parallel loops in the program flowchart. Each subVI that may be run (open its window) and its running conditions (
buttons) 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 unintentionally. It takes a lot of effort to
rearrange these panel controls. Is there any way to fix the position of the designed controls?
A: 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. In run mode, you cannot move the position of any control
. 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
to lock the specified control. In this way, unless you use the Unlock command to unlock it, you cannot move
the position of the specified control. 

40. Why is there no data transmitted from the output port of the subVI node?
A: 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 pushed out, 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 second 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?
A: 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 or not. 

42. How to save data in Excel files in LV?
A: Use Excel Get Last Row.vi to first get the number of the last row of data in Excel, and then start
saving data in that row. 

43. When LV clicks on the Graph with the mouse, the size of the Graph changes. When the mouse leaves, the size of the Graph returns to its original
state?
A: You can use an Event Structure to do this, adding two events (one for mouse click and the other for mouse
leave). 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 detect a USB flash drive using LABVIEW programming?
A: You need to call the Windows API function GetDriveTypeA, whose function return value drive letter type data type is a long integer
, and the input parameter is the drive letter to be detected. Call CLFN.vi and select windows system32kernel32.dll, select GetD
riveTypeA, set Return Type to Numeric Signed 32-bit Integer; then add the parameter nDrive, set
the parameter type to STRING and the format to C String Pointer. During runtime, fill in the drive letter of the USB flash drive to be detected at the input end, and
when the result is returned, it is represented as DRIVE_REMOVABLE, which means a removable USB flash drive. 
45. How to use Labview to communicate with a programmable instrument? The instrument does not have a GPIB interface, but has a COM port. Can it be operated using LV
?
A: You can solve the instrument control problem through Labview's serial communication, see BASIC 2 PORT
SERIAL WRITE AND READ.VI of FIND EXAMPLE


46. How to pass the time captured in EVENTSTRUCT to STATE DIAGRAM?
A: After using VENTSTRUCT to capture panel events, correspond different events to different strings and others, and then
pass the string in VENTSTRUCT to STATE DIAGRAM through Q UEUE, and then perform corresponding processing based on the obtained string
. [page]

47. Use WRITE TO BINARY FILE function to write a 1D array to a binary file. Why
are there 4 extra bytes of data when reading from READ F ROM BIANRY FILE?
A: Header information is added when writing. The extra 4 bytes are the header information, which represents the length of the array or string.
Set it in the APPEND ARRAY OR STING SIZE input port in WRITE TO BINARY FILE. The default value is
T, which means adding header information. If it is changed to F, there will be no extra 4 bytes.

48. When uninstalling Labview7.1, error 1603 appears, followed by errors 1722 and 1721. The program asks whether to continue the uninstallation
operation. How to eliminate this error and uninstall 7.1 correctly?
A: This error usually occurs when trying to uninstall certain shared components. Follow the steps below to solve this problem.
1) Pay attention to which component is being uninstalled when the error occurs. Generally speaking, 
it is easy to occur when uninstalling the LV core part or LV RUNTIME ENGINE.
2) When error code 1603 appears and a dialog box pops up to prompt you to continue the uninstallation operation, click YES
3) If you are prompted to restart the computer after the uninstallation is completed, click NO.
4) For errors generated during the uninstallation process, manually run the corresponding component from the corresponding folder of the CD, the path is as follows:
componentslvcorefulllvcorefull.msi or componentslvruntimeenglv runtimeeng.ms
i and click the Repair button.
5) After the repair, run these MSIs again and select the Uninstall button. This will completely uninstall.

49. When writing large programs in Labview7.1, if you want to optimize the computer's memory usage, what should you consider?

A: 1) Break the VI into SUBVIs. When the SUBVI is no longer executed, the LV can release its memory.
   2) Use as few global variables or local variables as possible, both of which will cause the LV to back up data.
   3) Display large arrays and strings on the open front panel only when needed, because the front panel indicators need
to copy the data they display.
   4) Property nodes will cause the SUBVI front panel to remain in memory, which will increase memory usage. Therefore, if
the SUBVI front panel is not displayed, do not use property nodes in the SUBVI.
   5) Try to use the same data type in the array and use forced decimal point position when transferring data into the subVI
. When the LV changes the data type, the output requires a new buffer.
   6) When designing flowcharts, pay attention to any place where the input size is different from the output size. EG: Frequently increasing
the size of the array or string will cause multiple copies of the data. Resulting in increased memory and memory fragmentation.

50. After generating an executable file in Labview7.1, the following error appears when running: "Executable version (7.1
.1) doesn't match resource file (7.1)". How to eliminate the error?
A: This situation is caused by the LV7.1.1 Run-time Engine installation being damaged or the version being incompatible. The solution is as follows:

1) Go to Control Panel---Add or Remove Programs
2) Select National Instruments Software and click Change
3) Select LV7.1.1 Run-time Engine in the National Instruments Software dialog box and click Repair
Note: After installing LV Run-time Engine7.1.1, you generally cannot see LV7.1.1 Run-t ime Engine7.1.1 in the MAX software
, but can only see it in the Control Panel.

51. VISA Set I/O Buffer Size
A: You can complete the setting of the buffer. The location must be placed after the serial port configuration VI, and the MASK setting must be correct. If
it is not set, the default value is 4096Bytes. If the data to be read through the serial port is larger than this, data loss will occur
.

52. How to convert CVI driver (fp file) to LV driver?
A: Labview has this function. In the Instrumentation of TOOLS,
in the menu Import Instrument from CV I Fp.

53. How to create a control in Labview7.1 to display as a custom picture?
A: Place the control type to be created on the front panel, select it and click EDIT---CUSOMIZE CONTROL to enter the edit panel
, use the control in the toolbar to change to CUSTOMIZE MODE, EDIT---Import Picture From File to select
the picture to be displayed, right-click the control on the front panel and click Import Picture. Switch back to Edit Mode. Right-click the control and select Import Picture
and then select the method. Do the same for other pictures.

54. How to set the current value of the Labview front panel control as the default value when it is opened next time through the program?
A: The method is as follows
1) Manual operation: Right-click the control----Data Operations---Make Current Value Default
.
2) Save the current value of the control through a file or registry, and then
read the value back from the file or registry the next time you open it.
3) Use VI Server technology to save the current value of the control as the default value, but this method can only be used in the editing state
and cannot be used after the exe file is generated. The operation is as follows
(1)        Call Invoke Node to set the Edit Mode value of VI to TRUE
(2)        Call Invoke Node to set Make Current Value Default
(3)  Call Invoke Node to set Save Instrumentt's Path to saved file to the VI path       for which the default value needs to be set 55. The following errors occurred during the use of the serial port: 1) Unable to open session to "ASRL1::INSTR" 2) Return Value: 0XBFFF0072 3) Status Name: VI_ERROR_RSRC_BUSY






4) The resource is valid, but VISA can not currently access it.
A: This is caused by the software accessing the COM port. It is possible that the LV program opened the VISA dialog without closing
it; or opened a hyperterminal connection that can never be closed. Or other software is using the serial port or
the serial port is hung, in which case all programs need to be closed. If it still cannot be solved, the last method is to disable the COM port to release
resources; the steps are as follows: open the control panel, click the system icon, select the device manager, expand the port, select
the serial port to be operated, right-click and select properties, and select not to use this device in the general options. Or just right-click and select disable
. After setting, restart, and then choose to enable the serial port again.

56. When using Open/Create/Replace File.vi to select create or replace mode, if the file already
exists and needs to be replaced, how can you replace it directly without popping up a dialog box?
A: Two ways: 1) Double-click to open the flowchart of Open/Create/Replace File.vi, and delete
the CASE structure of If function is 2 (create or replace with protection) ask user's permission to
. 2) Add a structure to determine the existence of the file before Open/Create/Replace File.vi, and
run Delete.vi if it is determined to exist

. 57. When LV is publishing on the Internet, can I embed
script files written in other languages ​​in the HTML generated by LabVIEWWEBServe? Or use the HTML generated by LV on other network servers?
A: Both of these situations are not allowed because NI Web Server does not allow such operations. LV's Web Server
cannot transmit script information generated in a non-LV environment to the client browser, nor can it access script information generated in a non-LV environment in the client browser
; the same is true for the NI Web Server. Other Web Servers (Apache
, IIS, etc.) cannot use the HTML files generated by LV's Web Server to control VI.

58. How to determine the delay time more accurately?
A: You need to use the quick VI (Elapsed Time.vi) instead of Wait. Because Wait will be affected by the system operation
, and repeated delays will produce cumulative errors. Elapsed Time uses the system time (accurate to Ms),
which will not produce cumulative errors.

59. How to dynamically add items in the Tree control?
A: Find the Directory hierarchy in tree control.vi routine, open the add Item.vi in ​​the Directory to tree subvi in ​​the init-open-close subvi.
Use this property node to add and delete operations. The key is
the use of the parent tag port. If the top-level entry is added, the parent tag is an empty string. If it is a sub-level
entry, the parent must be the tag of the upper-level entry.

60. In Labview7.1, how to use Database Connectivity to update a
field with an OLE data type in the ACCESS database? 
A: Use the method of updating the database with parameters to update data of OLE data type. The specific method is as follows: 1) Use DB
Tools Open Connection.vi to open the database; 2) Use DB Tools Create Parameterized Query.vi
to create a Refnum with parameters to update the database, and enter "update table name set column name = (?
)" in the SQL query. Since OLE data cannot be directly reflected in text, "(?)" here represents the OLE data type;
3) Use DB Tools set Parameter.vi, and enter OLE data in the Value, such as an array; 4) Use
DB Tools Free Object.vi twice to release Refnum, then you can get the Connection Reference, and then you can
use other DB Tools VIs; 5) Disconnect.

61. Labview7.1, Time Loop structure Two subroutines with different functions are called in the main program. When the subroutines are called,
the subVI front panel pops up. Time Loop is used in both subroutines, and the settings are the same, but after calling any subVI, the other
can no longer be called.  A: Both subVIs use the same Time Loop structure, which is caused by the same Loop name
of the Time Loop of the two subVIs . 62. How to set and display Cursor in Labview7.1  A: For example, for waveform graph, we can call its attribute node, and then select Curso r list in the attribute node, the program will list all cursors in the form of cluster array, first index a cursor, and then use the cluster function to modify it. If you want to change the coordinates of the cursor, you can use Index Array to index a cursor, and then use Bundle by name to modify it, and then use replace array or other array functions to write the changed cluster array into another cursor list attribute node. 63. Use Build Application to generate an exe file. If the original program uses current vi's path, then the program itself cannot find the file that was originally found by default?  A: When using the current vi's path function, it will return the file name and the path where the vi is located. If the vi has just been written and has not been saved, then running it will return an invalid value. If the vi has been saved, then the complete path can be returned. For example, a vi named "Application.vi" is saved in C:Program FileApplicati














on this folder, the path returned by the current vi's path function is C: Program File Application
Application.vi; if an exe is generated and saved in the same directory as Application.vi, then
it will return C: Program File Application App.exe Application.vi when it is run, so we
need to use an additional Strip path function to get the same path as the original one.

64. How to customize the window title characters instead of using the default Vi name? 
A: If you just want to set a default title that is not a VI name, you can set it in VI Property>>Window Appearance
, remove the check symbol in front of Same As VI name, and then enter the characters you want to display in Window title; if
you want to modify the title in the program, you can use the property FP.Title in VI Server

65. Use NI-VISA software in Labview to control USB devices 
A: In order to use NI-VISA, in the Windows environment, you can do this through the INF file. NI-VISA3.0 includes
the VISA Drive Development Wizard (DDW) which will create an INF file for the USB device. 1) Select Start
Programs National Instruments VISA VISA Drive Developer Wizard to open the DDW. You can use
this wizard to create an INF file for a PXI/PCI or USB device. Click Next. The VISA DDW Basic Device Information
window appears. 2) When you perform this step, you need to know the USB vendor ID and product ID. Both of these data are 16-bit hexadecimal
numbers provided by the vendor. Click Next. The Output Document Properties window appears. 3) The USB Instrument Prefix
is ​​a descriptor used to identify the related documents used for this device. Enter the corresponding information in USB Instrument Prefix
, select the directory where these documents are stored in "output file directory", and then click Finish. The INF
document is created and saved in the location you specified. Assuming Windows XP operating system.
Copy the INF document and put it in the INF folder, which is usually located in "C:WINDOWSINF". This folder
may be hidden.
Right-click the INF file in the C:WINDOWSINF folder and click Install. This process creates a PNF document for your file
. Now you are ready to install the USB device.
Connect the USB device. After Windows detects your USB device, it will immediately open the "Add New Hardware Wizard". Follow
the instructions on the screen. If you are ready to select a driver for the device, browse to the INF folder and
select the INF file you created using DDW. You can then program the control in MAX and LV.

66. I used Labview's quick VI to read out the .lvm data, but it cannot be displayed normally in the waveform graph.

A: The read 2D array stores data in columns, while the waveform graph displays the 2D array as
a curve for each row, so you can use Transpose 2D Array to transform the rows and columns. Waveform  chart is just the opposite of graph, and it outputs each column of data as a curve, so you can use chart instead of worker grandma and it can also display normally
without transformation . 67. How can Labview7.1DataSocket protocol ensure that the client receives data from the server completely without loss when transmitting data ? A: The reason for data loss is that the speed of reading data is slower than publishing, so the data is overwritten. There are two ways to deal with it: 1) Improve the client's running speed to ensure that the data has been read before the server publishes new data. 2)   Set up a data buffer. The server is set in the DataSocket Server Manager, and the default is 25M. The client needs to select the Datasocket Open function mode parameter as BufferedRead or BufferedRead/Write, and then set the cache size through the property node. The property node can also be used for buffer area diagnosis. 68. How to save the MAX configuration file?  A: In MAX, when the configuration is completed, select FILE---Export in the menu bar, select the save location and type, click Next, select the file to be saved, and then click Export, finish. When loading, select Import 69. What is the State diagram toolkit in the Developer Suit used for?  A: The state diagram uses a graphical state diagram to identify multiple states and their transition logic, and includes a tool for automatically generating LV code. It is a very useful tool for building a large program framework. 70. When using local variables in LV7.1, you can only change the mechanical action to Switch, but not Latch. For example, how to stop two parallel loops with the Stop button?  A: When using the Latch method, the system automatically changes to the default value after reading the control once. Therefore, when using the Latch method , the values ​​read twice cannot be consistent even if the time interval is very short, so it cannot be used. At this time, you can use the Switch method and initialize the button at the beginning of the program. 71. How to respond to the button action in Flash in LV when playing Flash animation in ActiveX container?  A: By calling ActiveX, you can play *.swf animation in LV. The way to respond to the control key action in FLAH is to use an event structure to respond to mouse actions in a specific area in the ActiveX container. 72. When debugging the LV7.1 program, the program always reaches a state where it cannot respond, and then it can only be closed forcibly, so it cannot run normally? 






 























A: There is a long string indicator on the VI front panel, so the program consumes a lot of resources when refreshing the screen
. Set this indicator to hidden and the problem will be solved. The same problem will also appear on graphs
, charts, and even probes with large amounts of data.

73. In Labview7.1, a while loop is nested in another while loop. How to stop these two
loops with a Boolean value? 
A: Create a local variable with a Boolean value, use this local variable to control one loop, and use the Boolean value to control another loop
. Note that mechanical characteristics cannot have latches (Latch).

74. To collect 3 signals, you need to sort the entire array according to the value of a column of data to ensure that the data in each row still
corresponds.
A:


75. The CPU usage rate reaches 100% every time it runs. Why? 
A: This phenomenon will occur if there is no delay in the loop.

76. What is the concept of instrument driver and the characteristics of VISA? 
A: Instrument driver refers to a program that uses standardized I/0 functions to communicate with instruments and equipment, mainly used for
program control of instruments. In the LV programming language, instrument driver refers to
the application interface (API) of the instrument control program composed of VISA standard and instrument control instructions . Instrument driver is programmed with VISA standard, thus avoiding many complex and low-level
instrument control commands. VISA is the abbreviation of virtual instrument architecture, and its characteristics are 1) object-oriented programming; 2) VISA
is a superset of all current instrument interface type function functions, and it is very concise. 3) VISA is a standard function, which
has nothing to do with the I/O interface type of the instrument; 4) VISA program has nothing to do with the operating system and programming language.

77. How to choose the use of high-speed CAN card and low-speed CAN card? 
A: High-speed CAN and low-speed CAN devices cannot be allowed in the same CAN network. If the CAN device is a Serials 2 CAN device,
there are two PORTs that can be used for high-speed CAN and low-speed CAN respectively, and they are set by software. You
can change whether it is high-speed or low-speed CAN by directly finding the corresponding CAN device in MAX and selecting the corresponding PORT properties. If the
serials1 is used, a terminal is needed. Two ports are separated from one CANport for high-speed CAN and low-speed CAN respectively. This is also
set in MAX.

78. How to use the Read Text File function to read data line by line from a text file? 
A: The input and output ports of the Read Text File function cannot be set to read lines. Only by right-clicking the function with the mouse
and selecting Read Lines from the pop-up shortcut menu can the operation of reading lines be realized. Put this function
in a loop to achieve the purpose of reading line by line.

79. The serial port program written in Labview cannot be run on a machine without Lv after generating an EXE file. This machine has already
installed the corresponding LAB VIEW Run-Time. Why? 
A: If the serial port program is written using VISA, the corresponding VISA driver needs to be installed on the target and on it. The
VISA driver can be installed separately on the target and on it, or the packaging function can be used in Labview to make the VISA driver and the application into an
installation file and install it on the target machine.
Keywords:Labview Reference address:Labview FAQ Differences

Previous article:Design of Virtual Phase Difference Meter Based on Virtual Instrument LabVIEW
Next article:Memory issues in labview

Recommended ReadingLatest update time:2024-11-16 21:51

Introducing the LabVIEW Wireless Sensor Network (WSN) Module Pioneer
Overview Wireless communication technology is ubiquitous due to its freedom, flexibility, distributed capabilities, and low cost. Wireless sensor networks (WSNs) are gradually becoming the next wave of wireless technology, supporting distributed measurements in large-scale physical systems. With WSNs, you can m
[Test Measurement]
Wireless USB High-Speed ​​Data Transmission System Based on LabVIEW
introduction As a new data communication technology, the Universal Serial Bus (USB ) has the advantages of plug-and-play, hot-swap support, easy expansion, fast transmission speed, and high cost performance. Short-range wireless communication technology is the development trend of data transmission between computers
[Test Measurement]
Wireless USB High-Speed ​​Data Transmission System Based on LabVIEW
Visualizing Noise Sources of KTX High-Speed ​​Trains Using LabVIEW
  由Korail运营的高速列车KTX-Sancheon于2010年开始投入使用,它是完全由韩国自身的技术完成建设的。由于列车最高运行时速高达300km/h(186mph),对环境噪声的影响相当显著,这些噪声包含滚动噪声(例如推进系统或机械噪声),车轮与铁轨接触的机械噪声,以及列车运行时车体周围空气流动形成的气流噪声等。为了全面减小这些噪声,我们已经采取了相关的措施来定位所有明显的噪声源。   The Korea Railroad Research Institute and SM Instruments Co., Ltd. (a member of the National Instruments IAlliance Partn
[Test Measurement]
Visualizing Noise Sources of KTX High-Speed ​​Trains Using LabVIEW
Wavelet denoising method based on hybrid programming of LabVIEW and Matlab
  This paper analyzes the shortcomings of traditional filter methods in processing non-stationary signals, studies the principles and methods of wavelet denoising, and studies the method of hybrid programming using LabVIEW and Matlab, combining the perfect graphic programming technology of LabVIEW with the powerful ma
[Test Measurement]
Wavelet denoising method based on hybrid programming of LabVIEW and Matlab
CNC machine tool network measurement and control system based on LabVIEW--key network communication technology (Part 1)
  4 Research on key network communication technologies for remote measurement and control systems of CNC machine tools   There are two basic modes for building a network measurement and control system for CNC machine tools based on the Internet: C/S and B/S. The two communication modes have their own advantages and
[Test Measurement]
CNC machine tool network measurement and control system based on LabVIEW--key network communication technology (Part 1)
Combining the While Loop and Case Structure in LabVIEW
  Like all tool software, the various functions and structures in LabVIEW can only create actual applications by combining them. Just like when you build a house, you can't just use a hammer or a saw. You can only make good things by combining these two tools. The same theory applies to your LabVIEW test program develo
[Test Measurement]
Combining the While Loop and Case Structure in LabVIEW
The combined application of Tektronix oscilloscope and Labview
Tektronix 3014B has always been my best friend. I have been using it since 2002. I have a good understanding of its various uses and performances. In practice, I use it for both experiments and production line installations. I think its functions are really powerful. The easy-to-use operation mode and flexible
[Test Measurement]
The combined application of Tektronix oscilloscope and Labview
Implementation of USB Real-time Data Acquisition and Processing System Based on LabVIEW
  Universal Serial Bus (USB) is a new type of data communication interface that is being used in more and more fields. Compared with traditional PCI cards and ISA cards , data acquisition cards based on USB interfaces have the advantages of plug-and-play, hot-swap, fast transmission speed, strong versatility, easy exp
[Test Measurement]
Implementation of USB Real-time Data Acquisition and Processing System 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号