Page 1 of 1

Programming with DasHard.dll

Posted: Sat Oct 18, 2003 8:29 pm
by Eugene Sitnikov
Hi!
I try to communicate with SL512EC and SIUDI-IN under BorlandDelphi 7.0. It's problem. I write in .pas:

Code: Select all

function DasHardCommand(command: Integer; param: Integer; blok: Integer): Integer; external 'DasHard.dll' name 'DasHardCommand';
and then:

Code: Select all

Result := DasHardCommand(1,11,0);
But i have Result = 0 after this command.
I think, i must have Result = 11

What's wrong?

Posted: Mon Oct 20, 2003 4:44 pm
by Guest
Hello,

Coult you try to do :
Result := DasHardCommand(1,0,0); to open the first interface
Result := DasHardCommand(101,0,0); to open the second interface
or
for i=0 i<10 i++
Result := DasHardCommand(1+100*i,0,0); to open the # i interface

If the 2 interfaces are pluged, SIUDI-IN can be the first and SIUDI-EC can be the second (or inverse !)
It's why it's better, to keep second param equal to 0
and test all the USB ports.


When you write
Result := DasHardCommand(1,11,0);
it means that you look for a SIUDI-EC as the FIRST plugged.