Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

CWGraph in delphi

Hi every one
am Working with an application in Borland Delphi 3... and I need to implement a Graph (Voltaje Vs Time) by using GWGraph1.PlotXvsY function (Measurement Studio) but when implement this function am  receiving the Error: Project DL_MAIN.exe raised exception Class ERangeError with message 'Range Check error' Process Stopped. USe Step or Run to Continue.
 
Does anyone know if am missing something ?
No Errors when Complie.
 
This function has the followings parameters: CWGraph1.PlotXvsY(xData: OleVariant; yData: OleVariant; bchartPerRow: OleVariant);
 
 
Var
     v, t: Integer
     TimeOle: array[1..1000] of OleVariant;
      VoltOle: array[1..1000] of OleVariant;
begin
      For v:= 1 to DatVolt[v] Do
      VoltOle[v] : DatVolt[v];
     
     
      For t:= 1 to DatTime[t] Do
      TimeOle[t] : DatTime[t];
     
      CWGraph1.PlotXvsY(TimeOle[t], VoltOle[v], False);
end;
 
Thanks for your help in advance..
0 Kudos
Message 1 of 3
(7,782 Views)

Hi Delt Measurment Studio doesn’t is not officially supported in Delphi.  Some issues could be solved with the update of Delphi 3  (Version 3.0 (Build 5.83)). Some of this errors are caused by the way they called the ActiveX.

Best Regards

Benjamin C
Principal Systems Engineer // CLA // CLED
0 Kudos
Message 2 of 3
(7,737 Views)

Hello,

you can use this code in delphi to plot SINE function ( Hope this will help anyone who use Delphi and NI components)

 

var

  x:  OleVariant;
  y:  OleVariant;
  I: Integer;
  XData:Variant ;


procedure ........
begin


x:=VarArrayCreate([1,40],varDouble);
y:=VarArrayCreate([1,40],varDouble);
for I := 1 to 40 do
 begin
x[I]:=I;
y[I]:=sin(I/2.0);
 end;
  CWGraph1.PlotXvsY(x,y,True);
end;

 

 


0 Kudos
Message 3 of 3
(6,399 Views)