uses
{$IFDEF Windows}
WinCRT,
{$ELSE}
Crt,
{$ENDIF}
vxdsupp,mpk3d;
var
Motor:TMotor;
w: LongInt;
begin
Motor.Init;
writeln(LongInt(EntryPoint));
writeln(Motor.Assign(3));
writeln($80000000);
writeln(VxDsupC(SM_SetGear,3,-360*1000,200*256));
writeln(VxDsupC(SM_SetSA,3,1*1000,1*1000));
{1 Grad pro Sekunde, 1 Grad pro Quadratsekunde}
Port[$347]:=Port[$347] or 2;
{ writeln(VxDsupC(SM_SetHWE,3,$FF01,0));}
writeln('Position=',Motor.GetPosition);
writeln('Ergebnis Referenzfahrt=',
VxDsupC(SM_Sync,3,205*1000,-1));
if readkey=#0 then readkey;
writeln('Position=',Motor.GetPosition);
writeln('MoveAbs-Ergebnis=',Motor.MoveAbs(90*1000));
if readkey=#0 then readkey;
writeln('MoveAbs-Ergebnis=',Motor.MoveAbs(0*1000));
delay(1000);
writeln('MoveAbs-Ergebnis=',Motor.MoveAbs(-30*1000));
delay(1000);
writeln('MoveAbs-Ergebnis=',Motor.MoveAbs(50*1000));
delay(1000);
writeln('MoveAbs-Ergebnis=',Motor.MoveAbs(120*1000));
if readkey=#0 then readkey;
writeln(VxDsupC(SM_SetSA,3,1*1000,1*1000));
for w:=0 to 90 do begin
Motor.MoveAbs(w*2000);
delay(1400);
if keypressed then break;
end;
if keypressed then
if readkey=#0 then readkey;
writeln(VxDsupC(SM_SetSA,3,50,4));
Motor.MoveAbs(90*1000);
writeln('Position=',Motor.GetPosition);
writeln(Motor.UnAssign);
Motor.Done;
end.
Detected encoding: ASCII (7 bit) | 2
|