Defines |
| #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_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_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_PRAGNEX 0x06090030 |
| | Error code: value range of parameter exeeded.
|
| #define | E_READONLY 0x06010002 |
| | Error code: Attempt to write a read-only object.
|
| #define | E_RS232 0x0f00ffbf |
| | Error code: rs232 command illegeal.
|
| #define | E_SUBINEX 0x06090011 |
| | Error code: subindex does not exist.
|
| #define | E_WRITEONLY 0x06010001 |
| | Error code: Attempt to read a write-only object.
|
| #define | NTRY 5 |
| | try NTRY times to read one byte from EPOS, the give up
|
| #define | TRYSLEEP (unsigned int)4000 |
| | sleep TRYSLEEP usec between read() from EPOS, if no data available
|
Typedefs |
| typedef char | BYTE |
| | 8bit type for EPOS data exchange
|
| typedef unsigned long | DWORD |
| | 32bit type for EPOS data exchange
|
| typedef unsigned short | WORD |
| | 16bit type for EPOS data exchange
|
Functions |
| 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
|
| int | closeEPOS () |
| int | doHoming (int method, long int start) |
| | does a homing move. Give homing mode (see firmware 9.3) and start position
|
| 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 *device) |
| int | openTCPEPOS (char *ip, short unsigned port) |
| int | printEPOScontrolword (WORD controlword) |
| | pretty-print Controlword
|
| int | printEPOSstate () |
| | pretty-print EPOS state
|
| int | printEPOSstatusword (WORD statusword) |
| | pretty-print Statusword
|
| int | readActualCurrent (short *val) |
| | read actual current; 14.1.69
|
| int | readActualPosition (long *val) |
| | read actual position; 14.1.62
|
| int | readActualVelocity (long *val) |
| | read actual position; 14.1.68
|
| int | readControlword (WORD *w) |
| | read EPOS control word (firmware spec 14.1.57)
|
| int | readDemandPosition (long *val) |
| | read actual position; 14.1.61
|
| int | readDemandVelocity (long *val) |
| | read actual position; 14.1.67
|
| int | readDeviceName (char *name) |
| | 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 | 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 *value) |
| | read position window; 14.1.64
|
| int | readRS232timeout () |
| | ask for RS232 timeout; firmware spec 14.1.35
|
| int | readStatusword (WORD *eposStatus) |
| | 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 | set_speed_profile (unsigned int max_velocity, unsigned int acceleration=1000, unsigned int deceleration=1000, bool trapezoidal=true) |
| int | setHomePolarity (int pol) |
| | set home switch polarity -- firmware spec 14.1.47
|
| int | setOpMode (int OpMode) |
| | 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 | writePositionWindow (unsigned long int value) |
| | write position window; 14.1.64
|
Variables |
| DWORD | E_error |
| | EPOS global error status.
|
| int | sp |
header file for libEPOS functions
mh, july 2006
Definition in file epos.h.