You can use function SearchDevices.
Use it only once.
Then select the card by using SetCurrentDevice - as you have done.
This program works fine with two cards:[code]procedure TForm1.Button3Click(Sender: TObject);
begin
SearchDevices;
Timer1.enabled:=true;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Timer1.enabled:=false;
SetCurrentDevice(0);
If form1.CheckBox1.Checked=true then SetDigitalChannel(1) else ClearDigitalChannel(1);
SetCurrentDevice(1);
If form1.CheckBox1.Checked=true then SetDigitalChannel(1) else ClearDigitalChannel(1);
Timer1.enabled:=true;
end; [/code]
If form1.CheckBox9.Checked=true then SetDigitalChannel(1) else ClearDigitalChannel(1);
If form1.CheckBox10.Checked=true then SetDigitalChannel(2) else ClearDigitalChannel(2);
If form1.CheckBox11.Checked=true then SetDigitalChannel(3) else ClearDigitalChannel(3);
…
…
You should use OpenDevice() only once in the callback for the “Connect” button. The fact that you have it in your code on the same line as SetCurrentDevice() tells me that you are calling OpenDevice() all the time inside the timer function, and that is not where that call belongs.