Velleman PCSU1000 Manual Del Usuario página 18

Ocultar thumbs Ver también para PCSU1000:
Tabla de contenido

Publicidad

17
PC Oscilloscope PCSU1000
Description of the procedures of the DSOLink.DLL
ReadCh1
ReadCh2
Syntax
PROCEDURE ReadCh1(Buffer: Pointer);
PROCEDURE ReadCh2(Buffer: Pointer);
Parameter
Buffer: A pointer to the data array of 5000 long integers where the data
will be read.
Description
Lectura de todos los datos y la configuración de canal 1 o canal 2 del PCSU1000.
Por consiguiente, los siguientes datos estén colocados en una memoria de amortiguación:
[0] : Sample rate in Hz
[1] : Full scale voltage in mV
[2] : Ground level in A/D converter counts. The value may be beyond the 0...255 range if GND level
is adjusted beyond the waveform display area.
[3...4098] : The acquired data in A/D converter counts (0...255), from PCSU1000.
The triggering point of the PCSU1000 is at the data location [1027].
Running the DSOLink in Delphi
Controle el archivo \PC-lab2000SE tools\PCSU1000 - PCS500 - PCS100 - K8031\Data transfer
DSOLink_DLL\DSOLink_Demo_VB\ en el CD Velleman para localizar los ficheros demostración.
Este archivo contiene un software DSOLink_Demo.EXE listo a utilizar y el código fuente.
Es posible copiar los ficheros a cualquier archivo y utilizar Delphi para examinar los ficheros,
editarlos y recopilarlos.
Ejemplo (en Delphi)
var
data: array[0..5000] of longint;
procedure ReadCh1(Buffer: Pointer); stdcall; external 'DSOLink.dll';
procedure TForm1.Button1Click(Sender: TObject);
var i: longint;
p:pointer;
begin
p:= @data[0];
ReadCh1(p);
memo1.clear;
memo1.lines.add('Sample rate
memo1.lines.add('Full scale
memo1.lines.add('GND level
memo1.lines.add('');
begin
for
i:=0
to
20
memo1.lines.add('Data
end;
end;
[Hz]'+chr(9)+inttostr(data[0]));
[mV]'+chr(9)+inttostr(data[1]));
[counts]'+chr(9)+inttostr(data[2]));
do
('+inttostr(i)+')'+chr(9)+chr(9)+inttostr(data[i+3]));
© 2005 ... Velleman

Publicidad

Tabla de contenido
loading

Tabla de contenido