Hi everyone.
I am in the process of creating a "ATE" application using LabVIEW 7.1 and Teststand 3.1. It has all been pertty much "smooth sailing" up till now.
😞One of the VI's captures a graph from a Network Analyzer through a GPIB interface. The data is returned in the from of an Array of Clusters. Each of these Clusters then contains two double values.
Array
(Cluster)
(double)
(double)
This information needs to be stored into a BLOB (Binary Large Object) field in a Firebird database. Since there are no drivers for Teststand or LabVIEW to connect to the Firebird DB directly I have to use ODBC drivers. But, I still cannot store Binary data to the database. I then decided to write a Delphi DLL, the only language available to me at this stage, to insert the data into the Firebird DB.
Code snippets:
[Delphi]
..
...
Type
TGraphCluster = Record
real_stim: double;
imag_resp: double;
end;
TGraphClusterArray = Array[0..200] of TGraphCluster;
PGraphClusterArray = ^TGraphClusterArray;
Function StoreArrayIntoDB(Val: PGraphClusterArray): integer; stdcall;
implementation
Function StoreArrayIntoDB(Val: PGraphClusterArray): integer; stdcall;
begin
result := -2;
try
result := val^[7]; //element 7 is used as an example
except
result := -1;
end;
end;This piece of code serves as an example...Obviously. Now, if I can manage to get this function to return the value of any array element using the "Call Library Function Node" in LabVIEW, I'll be verry happy. :-).
In LabVIEW I pass the array as an "Array Data Pointer". In actual fact, I have tried all of the "Array Formats". It might also be worth mentioning that I tried to pass a "less" coplex array, array of double to the delphi DLL, but with no avail.
Any suggestions welcome.
🙂