1.Dara type 1.1.When you use windows DLL function call to implement some special function must be pay a attention in the data types. Because different software packages have different data types. If the data types are not meet the function call in the DLL will cause some datas lose or datas incorrect . The Table1 is a list for LabVIEW,HPVEE,TESTPOINT different data types. Table1 LabVIEW HPVEE supporting DLL Data Types Signed 8-bit Integer LONG SHORT 2-bytes Signed 16-bit Integer LONG WORD 4-bytes Signed 32-bit Integer LONG DWORD 8-bytes Unsigned 8-bit Integer LONG SHORT 2-bytes Unsigned 16-bit Integer LONG WORD 4-bytes Unsigned 32-bit Integer LONG DWORD 8-bytes 4-byte Single DOUBLE FLOAT 4-bytes 8-byte Double DOUBLE DOUBLE 8-bytes 2.How to use the DLL in the LabVIEW 2.1.Press the mouse right key on the VI diagram in LabVIEW. 2.2.After the step 2.1 will pup up the function menu as show in figure1. 2.3.Put the mouse on Advanced of Function as show in figure 2. 2.4.After the step 2.3 then select the “Call Library Function “item and put it on the VI diagram as show in figure3. 2.5.Put the mouse on the “Call Library Function “VI icon the press the mouse right key. 2.6.After the step 2.5 will pup up the function items as show in figure4. 2.7.Select the “Configure” item to setup calling function of DLL. 2.8.After step 2.7 will pup up the “Call Library Function” dialog box as show in figure5. 2.9.Set the “Call Library Function” parameters 2.9.1.Set the “Library Name or Path”. Input the supporting DLL name and full path. The other way you can use the “Browse” function to fine the supporting DLL files as show in figure 6. 2.9.2.Set the “Function Name”. The function name must be full met the calling function of DLL file. For example, if you want to use the PCI-1202 to implement a number of A/D converts ,you can use the supporting DLL function. Figure 1.Pup up function menu use mouse right key in VI diagram. Figure 2.Move mouse to “Advanced Function” Figure 3. Select the “Call Library Function” in figure 2. Figure 4.Select the “Configure” item to setup “Call Library Function”. Figure 5.When you select “Configure” item in the figure 4 will show a dialog box…to ask you for input “Call Library Function” parameters. Figure 6.To search the supporting DLL use “Browse” function. Figure 7.Set the “Call Library Function” parameters. Figure 8.Completed the “Call Library Function “setup. Figure 9.Create the control, constant or indicator wire to “Call Library Function” icon. Figure 10.”Run”in LabVIEW.
© Copyright 2024