86 error(-1,
"Sorry constructor is not implemented");
101 error(-1,
"Sorry operator= is not implemented");
141 warning(
"device not initialized");
153 warning(
"device not initialized");
169 warning(
"device not initialized");
189 warning(
"device not initialized");
199 unsigned long uiConfig = 0;
216 warning(
"device not initialized");
236 warning(
"device not initialized");
257 warning(
"device not initialized");
277 warning(
"device not initialized");
293 warning(
"module version does not support function");
309 warning(
"device not initialized");
329 warning(
"device not initialized");
349 warning(
"device not initialized");
369 warning(
"device not initialized");
389 warning(
"device not initialized");
409 warning(
"device not initialized");
429 warning(
"device not initialized");
449 warning(
"device not initialized");
469 warning(
"device not initialized");
489 warning(
"device not initialized");
509 warning(
"device not initialized");
530 warning(
"device not initialized");
550 warning(
"device not initialized");
570 warning(
"device not initialized");
590 warning(
"device not initialized");
610 warning(
"device not initialized");
630 warning(
"device not initialized");
650 warning(
"device not initialized");
670 warning(
"device not initialized");
690 warning(
"device not initialized");
710 warning(
"device not initialized");
730 warning(
"device not initialized");
750 warning(
"device not initialized");
770 warning(
"device not initialized");
790 warning(
"device not initialized");
810 warning(
"device not initialized");
830 warning(
"device not initialized");
850 warning(
"device not initialized");
870 warning(
"device not initialized");
890 warning(
"device not initialized");
910 warning(
"device not initialized");
930 warning(
"device not initialized");
950 warning(
"device not initialized");
970 warning(
"device not initialized");
990 warning(
"device not initialized");
1011 warning(
"device not initialized");
1031 warning(
"device not initialized");
1051 warning(
"device not initialized");
1071 warning(
"device not initialized");
1091 warning(
"device not initialized");
1111 warning(
"device not initialized");
1127 warning(
"module version does not support function");
1143 warning(
"device not initialized");
1163 warning(
"device not initialized");
1183 warning(
"device not initialized");
1203 warning(
"device not initialized");
1223 warning(
"device not initialized");
1243 warning(
"device not initialized");
1263 warning(
"device not initialized");
1283 warning(
"device not initialized");
1303 warning(
"device not initialized");
1323 warning(
"device not initialized");
1343 warning(
"device not initialized");
1360 unsigned char ucState;
1364 warning(
"device not initialized");
1380 warning(
"module version does not support function");
1397 warning(
"device not initialized");
1413 warning(
"module version does not support function");
1429 warning(
"device not initialized");
1445 warning(
"module version does not support function");
1461 warning(
"device not initialized");
1477 warning(
"module version does not support function");
1493 warning(
"device not initialized");
1509 warning(
"module version does not support function");
1525 warning(
"device not initialized");
1541 warning(
"module version does not support function");
1557 warning(
"device not initialized");
1573 warning(
"module version does not support function");
1589 warning(
"device not initialized");
1605 warning(
"module version does not support function");
1621 warning(
"device not initialized");
1637 warning(
"module version does not support function");
1653 warning(
"device not initialized");
1669 warning(
"module version does not support function");
1685 warning(
"device not initialized");
1701 warning(
"module version does not support function");
1717 warning(
"device not initialized");
1733 warning(
"module version does not support function");
1749 warning(
"device not initialized");
1765 warning(
"module version does not support function");
1781 warning(
"device not initialized");
1797 warning(
"module version does not support function");
1813 warning(
"device not initialized");
1829 warning(
"module version does not support function");
1845 warning(
"device not initialized");
1861 warning(
"module version does not support function");
1877 warning(
"device not initialized");
1893 warning(
"module version does not support function");
1909 warning(
"device not initialized");
1925 warning(
"module version does not support function");
1941 warning(
"device not initialized");
1957 warning(
"module version does not support function");
1973 warning(
"device not initialized");
1989 warning(
"module version does not support function");
2005 warning(
"device not initialized");
2021 warning(
"module version does not support function");
2037 warning(
"device not initialized");
2053 warning(
"module version does not support function");
2069 warning(
"device not initialized");
2085 warning(
"module version does not support function");
2101 warning(
"device not initialized");
2117 warning(
"module version does not support function");
2133 warning(
"device not initialized");
2149 warning(
"module version does not support function");
2165 warning(
"device not initialized");
2181 warning(
"module version does not support function");
2197 warning(
"device not initialized");
2213 warning(
"module version does not support function");
2229 warning(
"device not initialized");
2245 warning(
"module version does not support function");
2261 warning(
"device not initialized");
2277 warning(
"module version does not support function");
2293 warning(
"device not initialized");
2309 warning(
"module version does not support function");
2341 warning(
"device not initialized");
2361 warning(
"device not initialized");
2381 warning(
"device not initialized");
2401 warning(
"device not initialized");
2421 warning(
"device not initialized");
2441 warning(
"device not initialized");
2461 warning(
"device not initialized");
2481 warning(
"device not initialized");
2501 warning(
"device not initialized");
2521 warning(
"device not initialized");
2541 warning(
"device not initialized");
2561 warning(
"device not initialized");
2581 warning(
"device not initialized");
2601 warning(
"device not initialized");
2621 warning(
"device not initialized");
2641 warning(
"device not initialized");
2661 warning(
"device not initialized");
2681 warning(
"device not initialized");
2701 warning(
"device not initialized");
2717 warning(
"module version does not support function");
2733 warning(
"device not initialized");
2749 warning(
"module version does not support function");
2765 warning(
"device not initialized");
2785 warning(
"device not initialized");
2805 warning(
"device not initialized");
2825 warning(
"device not initialized");
2845 warning(
"device not initialized");
2861 warning(
"module version does not support function");
2877 warning(
"device not initialized");
2893 warning(
"module version does not support function");
2909 warning(
"device not initialized");
2925 warning(
"module version does not support function");
2941 warning(
"device not initialized");
2957 warning(
"module version does not support function");
2973 warning(
"device not initialized");
2989 warning(
"module version does not support function");
3005 warning(
"device not initialized");
3021 warning(
"module version does not support function");
3037 warning(
"device not initialized");
3053 warning(
"module version does not support function");
3069 warning(
"device not initialized");
3085 warning(
"module version does not support function");
3101 warning(
"device not initialized");
3117 warning(
"module version does not support function");
3133 warning(
"device not initialized");
3149 warning(
"module version does not support function");
3165 warning(
"device not initialized");
3181 warning(
"module version does not support function");
3197 warning(
"device not initialized");
3213 warning(
"module version does not support function");
3229 warning(
"device not initialized");
3245 warning(
"module version does not support function");
3261 warning(
"device not initialized");
3277 warning(
"module version does not support function");
3293 warning(
"device not initialized");
3309 warning(
"module version does not support function");
3325 warning(
"device not initialized");
3341 warning(
"module version does not support function");
3357 warning(
"device not initialized");
3373 warning(
"module version does not support function");
3389 warning(
"device not initialized");
3405 warning(
"module version does not support function");
3421 warning(
"device not initialized");
3437 warning(
"module version does not support function");
3453 warning(
"device not initialized");
3469 warning(
"module version does not support function");
3485 warning(
"device not initialized");
3501 warning(
"module version does not support function");
3517 warning(
"device not initialized");
3533 warning(
"module version does not support function");
3549 warning(
"device not initialized");
3565 warning(
"module version does not support function");
3581 warning(
"device not initialized");
3597 warning(
"module version does not support function");
3613 warning(
"device not initialized");
3629 warning(
"module version does not support function");
3645 warning(
"device not initialized");
3661 warning(
"module version does not support function");
3677 warning(
"device not initialized");
3693 warning(
"module version does not support function");
3709 warning(
"device not initialized");
3725 warning(
"module version does not support function");
3741 warning(
"device not initialized");
3757 warning(
"module version does not support function");
3781 unsigned short uiVersion;
3782 std::vector<float> afData;
3785 warning(
"device not initialized");
3795 debug(0,
"searching for module %i", i);
3801 debug(0,
"found module with ID %i and Version %x", i, uiVersion);
3816 warning(
"device not initialized");
3836 warning(
"device not initialized");
3856 warning(
"device not initialized");
3876 warning(
"device not initialized");
3896 warning(
"device not initialized");
3916 warning(
"device not initialized");
3936 warning(
"device not initialized");
3958 warning(
"device not initialized");
3978 warning(
"device not initialized");
3998 warning(
"device not initialized");
4018 warning(
"device not initialized");
4038 warning(
"device not initialized");
4060 warning(
"device not initialized");
4080 warning(
"device not initialized");
4100 warning(
"device not initialized");
4116 unsigned long* puiState,
unsigned char* pucDio,
float* pfPos)
4121 warning(
"device not initialized");
4131 unsigned char ucState = 0;
4140 unsigned long* puiState,
unsigned char* pucDio,
float* pfPos)
4145 warning(
"device not initialized");
4155 unsigned char ucState = 0;
4166 unsigned long* puiState,
unsigned char* pucDio,
float* pfPos)
4171 warning(
"device not initialized");
4181 unsigned char ucState = 0;
4190 unsigned long* puiState,
unsigned char* pucDio,
float* pfPos)
4195 warning(
"device not initialized");
4205 unsigned char ucState = 0;
4214 unsigned long* puiState,
unsigned char* pucDio,
float* pfPos)
4219 warning(
"device not initialized");
4229 unsigned char ucState = 0;
4245 unsigned long uiTime, uiState;
4259 debug(1,
"com error in waitForHomeEnd()");
4264 debug(1,
"module error in waitForHomeEnd()");
4270 debug(2,
"reached home position in waitForHomeEnd()");
4276 if (uiTime > uiTimeOut)
4278 debug(1,
"timeout in waitForHomeEnd()");
4289 unsigned long uiTime, uiState;
4303 debug(1,
"com error in waitForMotionEnd()");
4308 debug(1,
"module error in waitForMotionEnd()");
4314 debug(2,
"finished motion in waitForMotionEnd()");
4320 if (uiTime > uiTimeOut)
4322 debug(1,
"timeout in waitForMotionEnd()");
4333 unsigned long uiTime, uiState;
4347 debug(1,
"com error in waitForRampEnd()");
4352 debug(1,
"module error in waitForRampEnd()");
4358 debug(2,
"reached ramp end position in waitForRampEnd()");
4364 if (uiTime > uiTimeOut)
4366 debug(1,
"timeout in waitForRampEnd()");
4377 unsigned long uiTime, uiState;
4391 debug(1,
"com error in waitForRampDec()");
4396 debug(1,
"module error in waitForRampDec()");
4402 debug(2,
"reached ramp end position in waitForRampDec()");
4408 if (uiTime > uiTimeOut)
4410 debug(1,
"timeout in waitForRampDec()");
4421 unsigned long uiTime, uiState;
4435 debug(1,
"com error in waitForRampSteady()");
4440 debug(1,
"module error in waitForRampSteady()");
4446 debug(2,
"reached ramp end position in waitForRampSteady()");
4452 if (uiTime > uiTimeOut)
4454 debug(1,
"timeout in waitForRampSteady()");
4465 bool bExitFlag =
false;
4466 unsigned long uiTime, uiState;
4477 debug(1,
"com error in waitForHomeEndAll()");
4482 debug(1,
"module error in waitForHomeEndAll()");
4495 if (uiTime > uiTimeOut)
4497 debug(1,
"timeout in waitForHomeEndAll()");
4508 bool bExitFlag =
false;
4509 unsigned long uiTime, uiState;
4520 debug(1,
"com error in waitForMotionEndAll()");
4525 debug(1,
"module error in waitForMotionEndAll()");
4538 if (uiTime > uiTimeOut)
4540 debug(1,
"timeout in waitForMotionEndAll()");
4551 bool bExitFlag =
false;
4552 unsigned long uiTime, uiState;
4563 debug(1,
"com error in waitForRampEndAll()");
4568 debug(1,
"module error in waitForRampEndAll()");
4581 if (uiTime > uiTimeOut)
4583 debug(1,
"timeout in waitForRampEndAll()");
4596 warning(
"device not initialized");
4616 warning(
"device not initialized");
4629 warning(
"device not initialized");
4642 warning(
"device not initialized");
4655 warning(
"device not initialized");
4668 warning(
"device not initialized");
4682 warning(
"device not initialized");
4695 warning(
"device not initialized");
4713 warning(
"device not initialized");
4726 warning(
"device not initialized");
4735 {
unsigned char toSend[8];
4739 warning(
"device not initialized");
4744 memcpy( &toSend[1], pBytes, 7 );
4746 memcpy( pBytes, &toSend[1], 7 );
4754 warning(
"device not initialized");
4772 strncpy(acString,acInitString,128);
4773 pcToken = strtok( acString,
":" );
4776 printf(
"CDevice* newDevice(const char* acInitString): wrong format, no ':' found!\n");
4779 if( strcmp( pcToken,
"RS232" ) == 0 )
4784 if( strcmp( pcToken,
"ESD" ) == 0 )
4790 if( strcmp( pcToken,
"PCAN" ) == 0 )
4795 #ifdef USE_SOCKET_CAN 4796 if( strcmp( pcToken,
"SOCKETCAN" ) == 0 )
4802 if( strcmp( pcToken,
"CP5X11" ) == 0 )
4807 printf(
"CDevice* newDevice(const char* acInitString): wrong format, no device found!\n");
#define PARID_ACT_FMOTSUPPLY
#define PARID_ACT_FMINPOS
int getMinMotorVoltage(int iModuleId, float *pfValue)
int getMaxLogicVoltage(int iModuleId, float *pfValue)
int homeModule(int iModuleId)
int serveWatchdogAll(void)
#define PARID_DEF_FLINEARRATIO
int getDefDamp(int iModuleId, short *piValue)
#define PARID_DEF_ADDRESS
int getHomeVel(int iModuleId, float *pfValue)
virtual int writeFloatReadFloatUnsignedChars(int iModuleId, int iCommandId, int iParameterId, float fData, float *pfData, unsigned char *pucData1, unsigned char *pucData2)=0
#define PARID_MOVE_FRAMP_EXT
int setMaxDeltaPos(int iModuleId, float fValue)
#define PARID_ACT_FMOTCUR
#define PARID_DEF_BRAKETIMEOUT
int getDioData(int iModuleId, unsigned long *puiValue)
int getMinPos(int iModuleId, float *pfValue)
int setDefBrakeTimeOut(int iModuleId, unsigned short uiValue)
#define PARID_DEF_FMINPOS
CDevice(void)
default constructor
#define PARID_DEF_FMAXDELTAPOS
#define PARID_ACT_MAXMOTOR
int getDefBrakeTimeOut(int iModuleId, unsigned short *puiValue)
int waitForMotionEndAll(unsigned long uiTimeOut=60000)
int getDamp(int iModuleId, short *piValue)
const char * getRevision()
gets the revision string of the class
int getDefBurnCount(int iModuleId, unsigned char *pucValue)
int setDefIncPerTurn(int iModuleId, unsigned long uiValue)
#define TYPEID_MOD_LINEAR
int xack8Bytes(int iModuleId, void *pBytes)
int getSavePos(int iModuleId, float *pfValue)
int getDefMaxCur(int iModuleId, float *pfValue)
#define PARID_ACT_MINLOGIC
int getLogicSupply(int iModuleId, float *pfValue)
#define PARID_DEF_FCUROFFSET
int getIPolVel(int iModuleId, float *pValue)
int setRampAcc(int iModuleId, float fValue)
int setMaxMotorVoltage(int iModuleId, float fValue)
int setMinPos(int iModuleId, float fValue)
#define ERRID_DEV_WRONGMODULEID
#define PARID_ACT_RAWTEMP
int setModuleSerialNo(int iModuleId, unsigned long uiValue)
int setDefCANBaudRate(int iModuleId, unsigned char uiValue)
virtual int writeLong(int iModuleId, int iCommandId, int iParameterId, long iData)=0
#define PARID_DEF_FMAXACC
#define PARID_ACT_RAWLOGICSUPPLY
int getHMaxCurOvershootTime(int iModuleId, long *piValue)
int getTemperature(int iModuleId, float *pfValue)
int xmit8Bytes(int iModuleId, void *pBytes)
int setConfig(int iModuleId, unsigned long puiValue)
int waitForHomeEnd(int iModuleId, unsigned long uiTimeOut=60000)
bool getInitFlag()
gets the init flag
#define STATEID_MOD_RAMP_STEADY
int setHMaxCurOvershootTime(int iModuleId, long iValue)
int setA0(int iModuleId, short iValue)
int haltModule(int iModuleId)
#define PARID_ACT_MAXPWMOUTPUT
#define PARID_ACT_IMAXVEL
#define PARID_ACT_RAWMOTCUR
int setMinLogicVoltage(int iModuleId, float fValue)
int getMaxVelInc(int iModuleId, long *piValue)
virtual int reinit(unsigned char ucBaudRateId)=0
int setDefGearRatio(int iModuleId, float fValue)
#define PARID_DEF_FMAXPOS
#define PARID_MOVE_FVEL_EXT
int getCur(int iModuleId, float *pfCur)
int setNominalMotorCurrent(int iModuleId, float fValue)
int waitForMotionEnd(int iModuleId, unsigned long uiTimeOut=60000)
#define PARID_ACT_IHOMEOFFSET
int getRawMotorCurrent(int iModuleId, short *piValue)
virtual int readFloat(int iModuleId, int iCommandId, int iParameterId, float *pfData)=0
int getDefDioData(int iModuleId, unsigned long *puiValue)
int setDamp(int iModuleId, short iValue)
int getDeltaPos(int iModuleId, float *pfValue)
#define PARID_ACT_LOADDELTATIME
#define PARID_ACT_FPOSSTATEDIO
int getMaxPos(int iModuleId, float *pfValue)
void error(const int iErrorCode, const char *pcErrorMessage,...) const
int waitForRampEnd(int iModuleId, unsigned long uiTimeOut=60000)
#define PARID_ACT_FRAMPACC
int getDeltaPosInc(int iModuleId, long *piValue)
std::vector< int > m_aiModuleId
int getLoadDeltaTime(int iModuleId, unsigned short *piValue)
#define PARID_ACT_DIODATA
#define STATEID_MOD_MOTION
#define PARID_ACT_FRAMPVEL
#define PARID_ACT_IMAXDELTAPOS
#define PARID_ACT_FHOMEVEL
int getMotorOvershootTime(int iModuleId, long *piValue)
int getMinPosInc(int iModuleId, long *piValue)
int getLogicUndershootTime(int iModuleId, long *piValue)
#define PARID_DEF_CANBAUDRATE
int setMinMotorVoltage(int iModuleId, float fValue)
int setDefSetup(int iModuleId, unsigned long uiValue)
#define PARID_ACT_LOGICOVERSHOOT
int getMotorSupply(int iModuleId, float *pfValue)
int setMotorOvershootTime(int iModuleId, long iValue)
virtual int writeFloat(int iModuleId, int iCommandId, int iParameterId, float fData)=0
virtual int readFloatUnsignedChars(int iModuleId, int iCommandId, int iParameterId, float *pfData, unsigned char *pucData1, unsigned char *pucData2)=0
#define PARID_ACT_IMAXPOS
int getIncRatio(int iModuleId, float *pValue)
virtual int readLong(int iModuleId, int iCommandId, int iParameterId, long *piData)=0
#define PARID_DEF_FMAXVEL
int moveVelInc(int iModuleId, long iVel)
int setC0(int iModuleId, short iValue)
int getDefMinPos(int iModuleId, float *pfValue)
#define PARID_MOVE_FSTEP_EXT
#define ERRID_DEV_MODULEERROR
int moveVelExtended(int iModuleId, float fCur, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
#define ERRID_DEV_NOTINITIALIZED
int getDefHomeOffset(int iModuleId, float *pfValue)
int getMaxPWMOutput(int iModuleId, long *piValue)
int getDefSetup(int iModuleId, unsigned long *puiValue)
int setHomeVel(int iModuleId, float fValue)
int getDefIncPerTurn(int iModuleId, unsigned long *puiValue)
int setMaxDeltaPosInc(int iModuleId, long iValue)
int waitForRampEndAll(unsigned long uiTimeOut=60000)
#define PARID_ACT_MAXLOADGRADIENT
#define PARID_ACT_FMAXCUR
CDevice & operator=(const CDevice &rclDevice)
int getMotorCurrent(int iModuleId, float *pfValue)
#define CONFIGID_MOD_LINEAR
int getDefLinearRatio(int iModuleId, float *pfValue)
int getDefC0(int iModuleId, short *piValue)
int moveVel(int iModuleId, float fVel)
int getDefGearRatio(int iModuleId, float *pfValue)
int getVel(int iModuleId, float *pfVel)
#define PARID_DEF_FGEARRATIO
void setInitString(const char *acInitString)
int setDefHomeAcc(int iModuleId, float fValue)
int getMaxVel(int iModuleId, float *pfValue)
int getStateDioPos(int iModuleId, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
#define PARID_ACT_FMAXDELTAPOS
#define PARID_ACT_SYNCTIME
int setMaxPosInc(int iModuleId, long iValue)
int getC0(int iModuleId, short *piValue)
int getRawTemperature(int iModuleId, short *piValue)
int setLogicOvershootTime(int iModuleId, long iValue)
int saveParameters(int iModuleId)
virtual int writeAll(int iCommandId, int iParameterId)=0
int setDefAddress(int iModuleId, unsigned char uiValue)
int getMaxMotorVoltage(int iModuleId, float *pfValue)
void charStateToLongState(unsigned char uiShort, unsigned long *puiState)
std::vector< unsigned short > m_auiModuleVersion
int setBaudRateAll(unsigned char ucBaudRateId)
#define PARID_ACT_IDELTAPOS
int setDioData(int iModuleId, unsigned long uiValue)
int getSyncTime(int iModuleId, short *piValue)
int getModuleSerialNo(int iModuleId, unsigned long *puiValue)
int getDefMaxDeltaPos(int iModuleId, float *pfValue)
int getVelInc(int iModuleId, long *piValue)
int movePosExtended(int iModuleId, float fPos, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
int getHomeOffsetInc(int iModuleId, long *piValue)
#define PARID_ACT_FHOMEOFFSET
int getNomCurOvershootTime(int iModuleId, long *piValue)
#define PARID_ACT_KP_PWMLIM
#define PARID_ACT_FIPOLVEL
#define PARID_DEF_FMAXCUR
int getMotorUndershootTime(int iModuleId, long *piValue)
int moveCurExtended(int iModuleId, float fCur, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
int setCurrentLimit(int iModuleId, float fValue)
#define PARID_ACT_NOMCUROVERSHOOT
void warning(const char *pcWarningMessage,...) const
#define PARID_ACT_FMAXACC
int getDefMaxVel(int iModuleId, float *pfValue)
#define PARID_ACT_FLOGICSUPPLY
virtual ~CDevice()
destructor
int getDefA0(int iModuleId, short *piValue)
int setSyncTime(int iModuleId, short iValue)
int setRampVelInc(int iModuleId, long iValue)
int getLoadLimit(int iModuleId, long *piValue)
int getKpPWMLimit(int iModuleId, long *piValue)
int setNomCurOvershootTime(int iModuleId, long iValue)
int getRawLogicSupply(int iModuleId, short *piValue)
#define PARID_ACT_LOADLIMIT
#define PARID_DEF_FHOMEVEL
int getDefCurOffset(int iModuleId, float *pfValue)
int moveCurInc(int iModuleId, long iCur)
#define PARID_DEF_FCURRATIO
int getMaxAccInc(int iModuleId, long *piValue)
int setLoadDeltaTime(int iModuleId, unsigned short iValue)
virtual int writeCommand(int iModuleId, int iCommandId)=0
int setMaxAccInc(int iModuleId, long iValue)
#define PARID_ACT_MOTORUNDERSHOOT
int getDefBaudRate(int iModuleId, unsigned char *pucValue)
int setMaxVelInc(int iModuleId, long iValue)
int moveRampInc(int iModuleId, long iPos, long iVel, long iAcc)
int getDefHomeVel(int iModuleId, float *pfValue)
int recalcPIDParams(int iModuleId)
#define PARID_ACT_MINMOTOR
int setDefLinRatio(int iModuleId, float fValue)
int getPos(int iModuleId, float *pfPos)
int getMaxPosInc(int iModuleId, long *piValue)
int setRampAccInc(int iModuleId, long iValue)
#define PARID_ACT_MOTOROVERSHOOT
int setKpPWMLimit(int iModuleId, long iValue)
int getMaximumMotorCurrent(int iModuleId, float *pfValue)