|
|
| Author |
Message |
dchauveaux Guest
|
Posted: Mon Jun 07, 2004 9:06 am Post subject: Reading values when entries are connected to ground |
|
|
I'm facing another strange problem: when connecting both chanel A & B to ground in order to measure the "0" value I can never get adc200_get_values returning True, whatever are the values of parameters: I 'm starting the read with no trigger, gain is 5V, channels are DC, this is doing the trick on Channel A only, B only or both channels.
Remark: adc200_get_single is always working fine, picolog can show curves correctly, but hangs for abaout 40 seconds before returning
I'm using latest released driver available on web server with Delphi 6 |
|
| Back to top |
|
 |
markspencer Site Admin

Joined: 07 May 2003
Posts: 610
|
Posted: Tue Jun 08, 2004 8:43 am Post subject: |
|
|
Hi,
I am sorry to hear that you are experiencing this problem.
If you post some of your code the opening routine, the setting timebase/interval and getting the data I will try to assit you further. When using picolog do you have similiar problems.
Are you using
adc200_set_interval
adc200_run
adc200_ready
Best regards,
Last edited by markspencer on Wed Jun 09, 2004 7:21 am; edited 1 time in total |
|
| Back to top |
|
 |
dchauveaux Guest
|
Posted: Tue Jun 08, 2004 12:22 pm Post subject: |
|
|
Hi,
As you asked for, here is a piece of the code for my program.
Nevertheless, I've just tested the same program on a Notebook computer running with Win98 and everything is working fine.
I'm going to try the prog. on different kind of PC and different OS and let you know conclusions
Best regards,
| Code: |
procedure InitOscillo;
var
i : Integer;
lth : Integer;
str : String;
str2 : array [1..80] of Char;
begin
if Opened then
DebugMsg('Début d''initialisation de l''oscillo');
Opened:=adc200_open_unit(Port);
if Opened then
begin
DebugMsg('ADC216 ouvert correctement');
for i := 0 to 4 do
begin
lth := adc200_get_unit_info (str2, sizeof (str2), i, port);
SetString (str, pchar (@str2), lth);
DebugMsg(str);
end;
end
else
begin
DebugMsg('Impossible d''ouvrir l''ADC216');
lth := adc200_get_unit_info (str2, sizeof (str2), 1, port);
SetString (str, pchar (@str2), lth);
DebugMsg(str);
Timebase:=6000*(2 shl TimebaseDivider);
MaxSamples:=16366;
Exit;
end;
DebugMsg('Configuration en AC / DC...');
adc200_set_dc(0,IsDC[0]);
adc200_set_dc(1,IsDC[1]);
DebugMsg('Réglage du gain...');
adc200_set_range(0,Gain[0]);
adc200_set_range(1,Gain[1]);
DebugMsg('Mode 2 voies...');
adc200_set_channels(2);
DebugMsg('Sur-échantillonage...');
adc200_set_oversample(Oversample);
DebugMsg('Base de temps...');
DebugMsg('Timebase validée : '+IntToStr(Byte(adc200_set_timebase(Timebase,IsSlow,TimebaseDivider))));
DebugMsg('Valeur Timebase ns : '+IntToStr(Timebase));
MaxSamples:=adc200_max_samples;
DebugMsg('MaxSamples: '+IntToStr(MaxSamples));
adc200_set_trigger(False,Source,Direction,0,0);
adc200_set_rapid(False);
DebugMsg('Configuration terminée');
end;
|
then after that call:
| Code: |
adc200_run(MaxSamples);
repeat
// Application.ProcessMessages;
until adc200_Ready;
//adc200_stop;
for i:=0 to 10 do
begin
xOk:=adc200_get_values(BufferA,BufferB,MaxSamples);
if xOk then
Break;
end;
|
|
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|