User`s manual

http://www.adtechcn.com 79
int Setup_Pos(int axis, long pos, int mode);
int Write_Output(int number, int value);
int Read_Input(int number, int &value);
int Get_CurrentInf(int axis, long &LogPos, long &ActPos, long &Speed);
int Get_Status(int axis, int &value, int mode);
int StopRun(int axis, int mode);
int Interp_Move4(long value1, long value2, long value3, long value4);
int Interp_Move3(int axis1, int axis2, int axis3, long value1, long value2, long value3);
int Interp_Move2(int axis1, int axis2, long value1, long value2);
int Axis_Pmove(int axis ,long value);
int Axis_Cmove(int axis ,long value);
int Setup_Speed(int axis ,long startv ,long speed ,long add );
int Init_Board(int dec_num);
CCtrlCard();
int Result; // return value
};
#endif
(5) The codes of source file “CtrlCard.cpp”are described as follows:
#include "stdafx.h"
#include "DEMO.h"
#include "CtrlCard.h"
#include "adt8840.h"
int devnum=-1;
CCtrlCard::CCtrlCard()
{
}
/'*******************initialize functions************************
This function includes the library function commonly used in the
initialization of the control card. It is the basis of using their
functions and must be used first in the exemplified program.
Return value<=0, it indicates the initialization failure; Return
value>0, it indicates the successful initialization.
**********************************************************/
int CCtrlCard::Init_Board(int devnum)
{
/***********************************************************/
int mode =0;//'when response mode is 1, responding to the serial-interface reception is enabled;
when 0, disabled
if(devnum==0)