H
hug
Unregistered / Unconfirmed
GUEST, unregistred user!
struct MultiMoveData{
short Axis;
short TS;
long Pos;
long StrVel;
long MaxVel;
long Acc;
long Dec;
long Jerk;
};
int Move4( long x, long y, long z, long u,
long start, long speed, long accel, long decel)
{
static MultiMoveData data[4];
static double k;
long len = sqrt( x*x+y*y+z*z+u*u );
if( len < 1 ) return 0;
long pos[4]={ x, y, z, u };
for( int i(0)
i<4
i++)
{
data.Axis = i;
data.TS = 0
data.Pos = pos;
k = (double)pos/double(len);
data.StrVel = long(k*start);
data.MaxVel = long(k*speed);
data.Acc = long(k*accel);
data.Dec = long(k*decel);
data.Jerk = 1
}
d3000_start_multi_move( 4, data );
return 1;
}
的原行为:DWORD WINAPI d3000_start_multi_move(short TotalAxis,
struct MultiMoveData *DataArray);
请帮我改为pascal语句,谢谢,(c++里的struct 与pascal的record数据类型形同吗?)
short Axis;
short TS;
long Pos;
long StrVel;
long MaxVel;
long Acc;
long Dec;
long Jerk;
};
int Move4( long x, long y, long z, long u,
long start, long speed, long accel, long decel)
{
static MultiMoveData data[4];
static double k;
long len = sqrt( x*x+y*y+z*z+u*u );
if( len < 1 ) return 0;
long pos[4]={ x, y, z, u };
for( int i(0)
i<4
i++)
{
data.Axis = i;
data.TS = 0
data.Pos = pos;
k = (double)pos/double(len);
data.StrVel = long(k*start);
data.MaxVel = long(k*speed);
data.Acc = long(k*accel);
data.Dec = long(k*decel);
data.Jerk = 1
}
d3000_start_multi_move( 4, data );
return 1;
}
的原行为:DWORD WINAPI d3000_start_multi_move(short TotalAxis,
struct MultiMoveData *DataArray);
请帮我改为pascal语句,谢谢,(c++里的struct 与pascal的record数据类型形同吗?)