Defines |
#define | E_ANS 0x00 |
| EPOS code to indicate an answer frame
|
#define | E_BIT00 0x0001 |
| bit code: ready to switch on
|
#define | E_BIT01 0x0002 |
| bit code: switched on
|
#define | E_BIT02 0x0004 |
| bit code: operation enable
|
#define | E_BIT03 0x0008 |
| bit code: FAULT
|
#define | E_BIT04 0x0010 |
| bit code: voltage enabled
|
#define | E_BIT05 0x0020 |
| bit code: quick stop
|
#define | E_BIT06 0x0040 |
| bit code: switch on disable
|
#define | E_BIT07 0x0080 |
| bit code: WARNING
|
#define | E_BIT08 0x0100 |
| bit code: offset current measured (?)
|
#define | E_BIT09 0x0200 |
| bit code: Remote (?)
|
#define | E_BIT10 0x0400 |
| bit code: Target reached
|
#define | E_BIT11 0x0800 |
| bit code: NOT USED
|
#define | E_BIT12 0x1000 |
| bit code: OpMode specific
|
#define | E_BIT13 0x2000 |
| bit code: OpMode specific, some error
|
#define | E_BIT14 0x4000 |
| bit code: refresh cycle of power stage
|
#define | E_BIT15 0x8000 |
| bit code: position referenced to home position
|
#define | E_CURRMOD -3 |
| EPOS operation mode: current mode.
|
#define | E_DIAGMOD -4 |
| EPOS operation mode: diagnostics mode.
|
#define | E_FAIL 0x46 |
| EPOS answer code to indicate a failure
|
#define | E_HOMING 6 |
| EPOS operation mode: homing.
|
#define | E_HWERR 0x06060000 |
| Error code: access failed due to an hardware error.
|
#define | E_INTINCOMP 0x06040047 |
| Error code: general internal incompatibility in the device.
|
#define | E_MASTERENCMOD -5 |
| EPOS operation mode:internal.
|
#define | E_NMTSTATE 0x0f00ffc0 |
| Error code: wrong NMT state.
|
#define | E_NOACCES 0x06010000 |
| Error code: Unsupported access to an object.
|
#define | E_NODEID 0x0f00fb9 |
| Error code: error in Node-ID.
|
#define | E_NOERR 0x00000000 |
| Error code: no error.
|
#define | E_NSERV 0x0f00ffbc |
| Error code: device not in service mode.
|
#define | E_OK 0x4f |
| EPOS answer code for all fine
|
#define | E_ONOTEX 0x06020000 |
| Error code: object does not exist.
|
#define | E_OUTMEM 0x05040005 |
| Error code: out of memory.
|
#define | E_PARAMINCOMP 0x06040043 |
| Error code: general parameter incompatibility.
|
#define | E_PARHIGH 0x06090031 |
| Error code: value of parameter written is too high.
|
#define | E_PARLOW 0x06090032 |
| Error code: value of parameter written is too low.
|
#define | E_PARREL 0x06090036 |
| Error code: maximum value is less than minimum value.
|
#define | E_PASSWD 0x0f00ffbe |
| Error code: password incorrect.
|
#define | E_POSMOD -1 |
| EPOS operation mode: position mode.
|
#define | E_PRAGNEX 0x06090030 |
| Error code: value range of parameter exeeded.
|
#define | E_PROFPOS 1 |
| EPOS operation mode: profile position mode.
|
#define | E_PROFVEL 3 |
| EPOS operation mode: profile velocity mode.
|
#define | E_READONLY 0x06010002 |
| Error code: Attempt to write a read-only object.
|
#define | E_RS232 0x0f00ffbf |
| Error code: rs232 command illegeal.
|
#define | E_STARTPOS_HOMING -200000 |
#define | E_STEPDIRECMOD -6 |
| EPOS operation mode:internal.
|
#define | E_SUBINEX 0x06090011 |
| Error code: subindex does not exist.
|
#define | E_VELMOD -2 |
| EPOS operation mode: velocity mode.
|
#define | E_WRITEONLY 0x06010001 |
| Error code: Attempt to read a write-only object.
|
Functions |
int | bitcmp (WORD a, WORD b) |
| compare two 16bit bitmasks, return 1 (true) or 0 (false)
|
WORD | CalcFieldCRC (WORD *pDataArray, WORD numberOfWords) |
| Checksum calculation; copied from EPOS Communication Guide, p.8.
|
int | changeEPOSstate (int state) |
| change EPOS state ==> firmware spec 8.1.3
|
int | checkEPOS () |
int | checkEPOSerror () |
| check global variable E_error for EPOS error code
|
int | checkEPOSstate () |
| check EPOS status, return state according to firmware spec 8.1.1
|
void | checkPtr (void *ptr) |
| exit(-1) if ptr == NULL
|
int | closeEPOS () |
int | doHoming (int method, long int start) |
| does a homing move. Give homing mode (see firmware 9.3) and start position
|
int | InitiateSegmentedRead (WORD index, BYTE subindex) |
| Read Object from EPOS memory, firmware definition 6.3.1.2.
|
int | monitorHomingStatus () |
| as monitorStatus(), but also waits for Homing Attained' signal
|
int | monitorStatus () |
| reads position, velocity and current and displays them in an endless loop. Returns after target position has been reached
|
int | moveAbsolute (long int steps) |
| set OpMode to ProfilePosition and make absolute movement
|
int | moveRelative (long int steps) |
| set OpMode to ProfilePosition and make relative movement
|
int | moveVelocity (int32_t steps) |
| set OpMode to ProfileVelocity and make movement
|
int | openEPOS (char *dev) |
int | openTCPEPOS (char *ip, short unsigned port) |
int | printEPOScontrolword (WORD s) |
| pretty-print Controlword
|
int | printEPOSstate () |
| pretty-print EPOS state
|
int | printEPOSstatusword (WORD s) |
| pretty-print Statusword
|
int | readActualCurrent (short int *val) |
int | readActualPosition (long *pos) |
| read actual position; 14.1.62
|
int | readActualVelocity (long *val) |
| read actual position; 14.1.68
|
int | readAnswer (WORD **ptr) |
| int readAnswer(WORD **ptr) - read an answer frame from EPOS
|
int | readBYTE (BYTE *c) |
| read a single BYTE from EPOS, timeout implemented
|
int | readControlword (WORD *w) |
| read EPOS control word (firmware spec 14.1.57)
|
int | readDemandPosition (long *pos) |
| read actual position; 14.1.61
|
int | readDemandVelocity (long *val) |
| read actual position; 14.1.67
|
int | readDeviceName (char *str) |
| ask for device name, device name is placed in 'name' (string must be big enough, NO CHECKING!!)
|
int | readDInputPolarity (WORD *w) |
| read digital input polarity mask
|
int | ReadObject (WORD index, BYTE subindex, WORD **answer) |
| Read Object from EPOS memory, firmware definition 6.3.1.1.
|
int | readOpMode () |
| read and returns EPOS mode of operation -- 14.1.60 here, RETURN(0) MEANS ERROR! '-1' is a valid OpMode, but 0 is not!
|
int | readPositionWindow (unsigned long int *pos) |
| read position window; 14.1.64
|
int | readRS232timeout () |
| ask for RS232 timeout; firmware spec 14.1.35
|
int | readStatusword (WORD *status) |
| read Statusword; 14.1.58
|
int | readSWversion () |
| example from EPOS com. guide: ask EPOS for software version
|
int | readTargetPosition (long *val) |
| read target position; 14.1.70
|
int | readWORD (WORD *w) |
| read a single WORD from EPOS, timeout implemented
|
int | SegmentRead (WORD **ptr) |
| int SegmentRead(WORD **ptr) - read data segment of the object initiated with 'InitiateSegmentedRead()'
|
int | sendCom (WORD *frame) |
| send command to EPOS, taking care of all neccessary 'ack' and checksum tests
|
int | set_speed_profile (unsigned int max_velocity, unsigned int acceleration, unsigned int deceleration, bool trapezoidal) |
int | setHomePolarity (int pol) |
| set home switch polarity -- firmware spec 14.1.47
|
int | setOpMode (int m) |
| set EPOS mode of operation -- 14.1.59
|
int | waitForTarget (unsigned int t) |
| waits for positoning to finish, argument is timeout in seconds. give timeout==0 to disable timeout
|
int | writeBYTE (BYTE *c) |
| write a single BYTE to EPOS
|
int | WriteObject (WORD index, BYTE subindex, WORD data[2]) |
int | WriteObject (WORD index, BYTE subindex, WORD *data) |
int | writePositionWindow (unsigned long int val) |
| write position window; 14.1.64
|
int | writeWORD (WORD *w) |
| write a single WORD to EPOS
|
Variables |
DWORD | E_error |
| EPOS global error status.
|
static int | ep = -1 |
| EPOS file descriptor.
|
char | gMarker = 0 |
| global; for internal handling
|
int | sp |
| serial port file descriptor
|