LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

The suitable LabVIEW data type correspinding to the array of structure in Visual Basic ActiveX DLL

Hi!

I need to call a VB ActiveX DLL from LabVIEW. When I run my LabVIEW code, I always meet an error as:

Error 1 occurred at Incorrect Function in T06.vi
Possible reasons:
LabVIEW: An input parameter is invalid.

I have read the VB DLL code that defines the data type. It fills data to a structure, then puts this structure to the array, and sends the array of structures to the method.
---------------------------------------------------
VB Code:

For I = 1 To 31
Set MyInputData(I) = New EM_nkd_DataPoint
Next I
With MyInputData(1)
.Amplitude = 8.44
.DataPointType = R_HW
.DataSource = MEASURED
.Wav
elength = 409.56
End With
With MyInputData(2)
.Amplitude = 91.60113
.DataPointType = T_SUB
.DataSource = MEASURED
.Wavelength = 409.56
End With
~~~
With MyInputData(31)
.Amplitude = 91.96825
.DataPointType = T_SUB
.DataSource = MEASURED
.Wavelength = 657.43
End With
----------------------------------------------------

My problem is that I can’t find a suitable kind of data type in LabVIEW which is corresponding to this case

Attached my LabVIEW code for reference.

Many thsnks.

TX
0 Kudos
Message 1 of 2
(1,915 Views)
Hi,
if you have a complete source code including EM_nkd_DataPoint class module, take a look inside in order to see data types for Amplitude, DataPointType, DataSource and Wavelength (probably for Amplitude and Wavelength is SINGLE). If this code is not available, maybe the author mentioned a type for T_SUB and MEASURED even if they are constants.
0 Kudos
Message 2 of 2
(1,915 Views)