From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-06-2007 02:56 AM
03-06-2007 06:01 AM
03-06-2007 06:18 AM
03-06-2007 06:57 AM
03-07-2007 05:15 AM
03-07-2007 05:40 AM
Hey Woody,
this is an extract from a example of a VB app using LV VIs.
'Create a reference to LabVIEW
Set lvApp = CreateObject("ETLKWP.Application")
'Assign an object reference to VI
Set VI_open = lvApp.GetVIReference("ETLKWPOpenCommunication.vi")
Set VI_close = lvApp.GetVIReference("ETLKWPCloseCommunication.vi")
Set VI_DeviceType = lvApp.GetVIReference("ETLKWPDeviceType.vi")
This code will load the application, here ETLKWP, and three VIs. These VIs will be found by the app on the VI search path. Since one part of the search path is "all subfolders" you can place them in any subfolder of the folder where your app is.
Private Sub DeviceType_Click()
Dim ParamNames(0 To 😎 As String
Dim ParamVals(0 To 😎 As Variant
ParamNames(0) = "PrimTarget"
ParamNames(1) = "PrimIndex"
ParamNames(2) = "Source"
ParamNames(3) = "DeviceType"
ParamNames(4) = "DeviceIndex"
ParamNames(5) = "Syyy"
ParamNames(6) = "Hyyy"
ParamNames(7) = "SerialID"
ParamNames(8) = "ErrorNumber"
ParamVals(0) = PrimTarget
ParamVals(1) = PrimIndex
ParamVals(2) = 0
ParamVals(3) = 81
ParamVals(4) = 1
Call VI_DeviceType.Call(ParamNames, ParamVals)
SW_Stand = ParamVals(5)
HW_Stand = ParamVals(6)
Serienid = ParamVals(7)
End Sub
This part of code will call the VI DeviceType.vi. The parameters 0 - 4 are controls and 5 - 8 are indicators which are connected with the connector pane. This VI will send a message over a serial connection to an external device and the device will answer with its firmware, hardware and serial information. This information is now available in the VB program.
03-07-2007 09:16 AM
03-07-2007 09:46 AM
03-12-2007 10:04 AM
03-12-2007 10:19 AM
Each ActiveX Server must enter some information in the registry. After that it can be found by the ActiveX client programs. LabVIEW has the advantage to do it on its own.
Start the program with adminstrator rights one time. It will register itself. From then on it will be found by the VB app.