Classes | Defines | Typedefs | Enumerations | Functions
amtec_base.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
Include dependency graph for amtec_base.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  amtec_powercube_device_t
struct  amtec_powercube_params_t
struct  amtec_powercube_pos_t
struct  amtec_powercube_setting_t
struct  amtec_powercube_t

Defines

#define B_ACK   0x64
#define B_DLE   0x10
#define B_ETX   0x03
#define B_STX   0x02
#define CodeActA0   0x56
#define CodeActC0   0x54
#define CodeActDamp   0x55
#define CodeActPos   0x3c
#define CodeActVel   0x41
#define CodeConfig   0x39
#define CodeCubeState   0x27
#define CodeCur   0x4d
#define CodeDefA0   0x53
#define CodeDefAddress   0x20
#define CodeDefBrakeTimeOut   0x1f
#define CodeDefBurnCount   0x57
#define CodeDefC0   0x51
#define CodeDefConfig   0x1b
#define CodeDefCubeSerial   0x1a
#define CodeDefCubeVersion   0x1d
#define CodeDefCurRatio   0x08
#define CodeDefDamp   0x52
#define CodeDefGearRatio   0x01
#define CodeDefHomeAcc   0x10
#define CodeDefHomeOffset   0x00
#define CodeDefHomeVel   0x0f
#define CodeDefLinRatio   0x02
#define CodeDefMaxAcc   0x0c
#define CodeDefMaxCur   0x0e
#define CodeDefMaxDeltaPos   0x05
#define CodeDefMaxDeltaVel   0x06
#define CodeDefMaxPos   0x04
#define CodeDefMaxVel   0x0a
#define CodeDefMinPos   0x03
#define CodeDefPrimBaud   0x22
#define CodeDefPulsesPerTurn   0x1c
#define CodeDefScndBaud   0x23
#define CodeDefServiceInterval   0x1e
#define CodeDefTorqueRatio   0x07
#define CodeDioSetup   0x26
#define CodeGetExtended   0x0a /* Fetch parameter */
#define CodeHalt   0x02 /* Stop immediately */
#define CodeHome   0x01 /* Start Homing procedure */
#define CodeHomeOffset   0x59
#define CodeMaxAcc   0x4a
#define CodeMaxCur   0x4c
#define CodeMaxPos   0x46
#define CodeMaxVel   0x48
#define CodeMinPos   0x45
#define CodePosCount   0x24
#define CodeRecalcPIDParam   0x09 /* Recalculate the PID loop parameters */
#define CodeRefPosCount   0x25
#define CodeReset   0x00 /* Clear error state */
#define CodeResetTime   0x12 /* Reset internal clock to zero */
#define CodeSetExtended   0x08 /* Set parameter */
#define CodeSetIStep   0x0d /* Motion command in Step mode */
#define CodeSetMotion   0x0b /* Set Motion command */
#define CodeSetup   0x58
#define CodeStepInc   0x2b
#define CodeTargetAcc   0x50
#define CodeTargetAccInc   0x2a
#define CodeTargetPosInc   0x28
#define CodeTargetVel   0x4f
#define CodeTargetVelInc   0x29
#define EPSILON   0.0001
#define FCOSLOOP   0x18
#define FCUR_MODE   0x08
#define FLOAT   6
#define FRAMP_MODE   0x04
#define FRAMPLOOP   0x19
#define FSTEP_MODE   0x06
#define FVEL_MODE   0x07
#define ICUR_MODE   0xd
#define INT16   2
#define INT32   4
#define INT8   0
#define IRAMP_MODE   0x09
#define ISTEP_MODE   0x0b
#define IVEL_MODE   0x0c
#define MAX_ACMD_SIZE   48
#define MAX_COMMAND_LENGTH   256
#define MAX_NAME_LENGTH   256
#define MAX_NUM_LOOPS   10
#define MAX_STATUS_TIME   3.0
#define MAX_TIME_DELAY   0.2
#define OK   1
#define SHORT_FULLBUFFER   0x80
#define SHORT_INPROGRESS   0x40
#define SHORT_MOTION   0x10
#define SHORT_NOT_OK   0x01
#define SHORT_RAMP_END   0x20
#define SHORT_SW1   0x04
#define SHORT_SW2   0x08
#define SHORT_SWR   0x02
#define STATE_BEYOND_HARD   0x02000000
#define STATE_BEYOND_SOFT   0x04000000
#define STATE_BRAKEACTIVE   0x00000200
#define STATE_COMM_ERROR   0x00000020
#define STATE_CURLIMIT   0x00000400
#define STATE_ERROR   0x00000001
#define STATE_FULLBUFFER   0x00020000
#define STATE_HALTED   0x00000004
#define STATE_HOME_OK   0x00000002
#define STATE_INPROGRESS   0x00010000
#define STATE_LOGIC_VOLT   0x08000000
#define STATE_MOTION   0x00000800
#define STATE_POW_FET_TEMP   0x00080000
#define STATE_POW_INTEGRALERR   0x00800000
#define STATE_POW_VOLT_ERR   0x00040000
#define STATE_POWERFAULT   0x00000008
#define STATE_RAMP_ACC   0x00001000
#define STATE_RAMP_DEC   0x00004000
#define STATE_RAMP_END   0x00008000
#define STATE_RAMP_STEADY   0x00002000
#define STATE_SW1   0x00000080
#define STATE_SW2   0x00000100
#define STATE_SWR   0x00000040
#define STATE_TOW_ERROR   0x00000010
#define TIMEOUT   -1
#define UINT16   3
#define UINT32   5
#define UINT8   1
#define WRONG   0

Typedefs

typedef struct
amtec_powercube_device_t
amtec_powercube_device_p
typedef struct amtec_powercube_tamtec_powercube_p
typedef struct
amtec_powercube_params_t
amtec_powercube_params_p
typedef struct
amtec_powercube_pos_t
amtec_powercube_pos_p
typedef struct
amtec_powercube_setting_t
amtec_powercube_setting_p

Enumerations

enum  PARITY_TYPE { N, E, O }

Functions

void amtecClear (amtec_powercube_p powercube)
amtec_powercube_p amtecInitialize ()
void amtecPrintInformation (amtec_powercube_p powercube)
void amtecPrintParams (amtec_powercube_params_p params)

Define Documentation

#define B_ACK   0x64

Definition at line 137 of file amtec_base.h.

#define B_DLE   0x10

Definition at line 136 of file amtec_base.h.

#define B_ETX   0x03

Definition at line 130 of file amtec_base.h.

#define B_STX   0x02

Definition at line 129 of file amtec_base.h.

#define CodeActA0   0x56

Definition at line 204 of file amtec_base.h.

#define CodeActC0   0x54

Definition at line 202 of file amtec_base.h.

#define CodeActDamp   0x55

Definition at line 203 of file amtec_base.h.

#define CodeActPos   0x3c

Definition at line 189 of file amtec_base.h.

#define CodeActVel   0x41

Definition at line 190 of file amtec_base.h.

#define CodeConfig   0x39

Definition at line 188 of file amtec_base.h.

#define CodeCubeState   0x27

Definition at line 182 of file amtec_base.h.

#define CodeCur   0x4d

Definition at line 196 of file amtec_base.h.

#define CodeDefA0   0x53

Definition at line 201 of file amtec_base.h.

#define CodeDefAddress   0x20

Definition at line 176 of file amtec_base.h.

#define CodeDefBrakeTimeOut   0x1f

Definition at line 175 of file amtec_base.h.

#define CodeDefBurnCount   0x57

Definition at line 205 of file amtec_base.h.

#define CodeDefC0   0x51

Definition at line 199 of file amtec_base.h.

#define CodeDefConfig   0x1b

Definition at line 171 of file amtec_base.h.

#define CodeDefCubeSerial   0x1a

Definition at line 170 of file amtec_base.h.

#define CodeDefCubeVersion   0x1d

Definition at line 173 of file amtec_base.h.

#define CodeDefCurRatio   0x08

Definition at line 164 of file amtec_base.h.

#define CodeDefDamp   0x52

Definition at line 200 of file amtec_base.h.

#define CodeDefGearRatio   0x01

Definition at line 157 of file amtec_base.h.

#define CodeDefHomeAcc   0x10

Definition at line 169 of file amtec_base.h.

#define CodeDefHomeOffset   0x00

Definition at line 156 of file amtec_base.h.

#define CodeDefHomeVel   0x0f

Definition at line 168 of file amtec_base.h.

#define CodeDefLinRatio   0x02

Definition at line 158 of file amtec_base.h.

#define CodeDefMaxAcc   0x0c

Definition at line 166 of file amtec_base.h.

#define CodeDefMaxCur   0x0e

Definition at line 167 of file amtec_base.h.

#define CodeDefMaxDeltaPos   0x05

Definition at line 161 of file amtec_base.h.

#define CodeDefMaxDeltaVel   0x06

Definition at line 162 of file amtec_base.h.

#define CodeDefMaxPos   0x04

Definition at line 160 of file amtec_base.h.

#define CodeDefMaxVel   0x0a

Definition at line 165 of file amtec_base.h.

#define CodeDefMinPos   0x03

Definition at line 159 of file amtec_base.h.

#define CodeDefPrimBaud   0x22

Definition at line 177 of file amtec_base.h.

#define CodeDefPulsesPerTurn   0x1c

Definition at line 172 of file amtec_base.h.

#define CodeDefScndBaud   0x23

Definition at line 178 of file amtec_base.h.

#define CodeDefServiceInterval   0x1e

Definition at line 174 of file amtec_base.h.

#define CodeDefTorqueRatio   0x07

Definition at line 163 of file amtec_base.h.

#define CodeDioSetup   0x26

Definition at line 181 of file amtec_base.h.

#define CodeGetExtended   0x0a /* Fetch parameter */

Definition at line 148 of file amtec_base.h.

#define CodeHalt   0x02 /* Stop immediately */

Definition at line 145 of file amtec_base.h.

#define CodeHome   0x01 /* Start Homing procedure */

Definition at line 144 of file amtec_base.h.

#define CodeHomeOffset   0x59

Definition at line 207 of file amtec_base.h.

#define CodeMaxAcc   0x4a

Definition at line 194 of file amtec_base.h.

#define CodeMaxCur   0x4c

Definition at line 195 of file amtec_base.h.

#define CodeMaxPos   0x46

Definition at line 192 of file amtec_base.h.

#define CodeMaxVel   0x48

Definition at line 193 of file amtec_base.h.

#define CodeMinPos   0x45

Definition at line 191 of file amtec_base.h.

#define CodePosCount   0x24

Definition at line 179 of file amtec_base.h.

#define CodeRecalcPIDParam   0x09 /* Recalculate the PID loop parameters */

Definition at line 146 of file amtec_base.h.

#define CodeRefPosCount   0x25

Definition at line 180 of file amtec_base.h.

#define CodeReset   0x00 /* Clear error state */

Definition at line 143 of file amtec_base.h.

#define CodeResetTime   0x12 /* Reset internal clock to zero */

Definition at line 151 of file amtec_base.h.

#define CodeSetExtended   0x08 /* Set parameter */

Definition at line 147 of file amtec_base.h.

#define CodeSetIStep   0x0d /* Motion command in Step mode */

Definition at line 150 of file amtec_base.h.

#define CodeSetMotion   0x0b /* Set Motion command */

Definition at line 149 of file amtec_base.h.

#define CodeSetup   0x58

Definition at line 206 of file amtec_base.h.

#define CodeStepInc   0x2b

Definition at line 186 of file amtec_base.h.

#define CodeTargetAcc   0x50

Definition at line 198 of file amtec_base.h.

#define CodeTargetAccInc   0x2a

Definition at line 185 of file amtec_base.h.

#define CodeTargetPosInc   0x28

Definition at line 183 of file amtec_base.h.

#define CodeTargetVel   0x4f

Definition at line 197 of file amtec_base.h.

#define CodeTargetVelInc   0x29

Definition at line 184 of file amtec_base.h.

#define EPSILON   0.0001

Definition at line 56 of file amtec_base.h.

#define FCOSLOOP   0x18

Definition at line 94 of file amtec_base.h.

#define FCUR_MODE   0x08

Definition at line 89 of file amtec_base.h.

#define FLOAT   6

Definition at line 69 of file amtec_base.h.

#define FRAMP_MODE   0x04

Definition at line 86 of file amtec_base.h.

#define FRAMPLOOP   0x19

Definition at line 95 of file amtec_base.h.

#define FSTEP_MODE   0x06

Definition at line 87 of file amtec_base.h.

#define FVEL_MODE   0x07

Definition at line 88 of file amtec_base.h.

#define ICUR_MODE   0xd

Definition at line 93 of file amtec_base.h.

#define INT16   2

Definition at line 65 of file amtec_base.h.

#define INT32   4

Definition at line 67 of file amtec_base.h.

#define INT8   0

Definition at line 63 of file amtec_base.h.

#define IRAMP_MODE   0x09

Definition at line 90 of file amtec_base.h.

#define ISTEP_MODE   0x0b

Definition at line 91 of file amtec_base.h.

#define IVEL_MODE   0x0c

Definition at line 92 of file amtec_base.h.

#define MAX_ACMD_SIZE   48

Definition at line 51 of file amtec_base.h.

#define MAX_COMMAND_LENGTH   256

Definition at line 50 of file amtec_base.h.

#define MAX_NAME_LENGTH   256

Definition at line 49 of file amtec_base.h.

#define MAX_NUM_LOOPS   10

Definition at line 52 of file amtec_base.h.

#define MAX_STATUS_TIME   3.0

Definition at line 54 of file amtec_base.h.

#define MAX_TIME_DELAY   0.2

Definition at line 53 of file amtec_base.h.

#define OK   1

Definition at line 60 of file amtec_base.h.

#define SHORT_FULLBUFFER   0x80

Definition at line 81 of file amtec_base.h.

#define SHORT_INPROGRESS   0x40

Definition at line 80 of file amtec_base.h.

#define SHORT_MOTION   0x10

Definition at line 78 of file amtec_base.h.

#define SHORT_NOT_OK   0x01

Definition at line 74 of file amtec_base.h.

#define SHORT_RAMP_END   0x20

Definition at line 79 of file amtec_base.h.

#define SHORT_SW1   0x04

Definition at line 76 of file amtec_base.h.

#define SHORT_SW2   0x08

Definition at line 77 of file amtec_base.h.

#define SHORT_SWR   0x02

Definition at line 75 of file amtec_base.h.

#define STATE_BEYOND_HARD   0x02000000

Definition at line 121 of file amtec_base.h.

#define STATE_BEYOND_SOFT   0x04000000

Definition at line 122 of file amtec_base.h.

#define STATE_BRAKEACTIVE   0x00000200

Definition at line 105 of file amtec_base.h.

#define STATE_COMM_ERROR   0x00000020

Definition at line 117 of file amtec_base.h.

#define STATE_CURLIMIT   0x00000400

Definition at line 106 of file amtec_base.h.

#define STATE_ERROR   0x00000001

Definition at line 114 of file amtec_base.h.

#define STATE_FULLBUFFER   0x00020000

Definition at line 113 of file amtec_base.h.

#define STATE_HALTED   0x00000004

Definition at line 101 of file amtec_base.h.

#define STATE_HOME_OK   0x00000002

Definition at line 100 of file amtec_base.h.

#define STATE_INPROGRESS   0x00010000

Definition at line 112 of file amtec_base.h.

#define STATE_LOGIC_VOLT   0x08000000

Definition at line 123 of file amtec_base.h.

#define STATE_MOTION   0x00000800

Definition at line 107 of file amtec_base.h.

#define STATE_POW_FET_TEMP   0x00080000

Definition at line 119 of file amtec_base.h.

#define STATE_POW_INTEGRALERR   0x00800000

Definition at line 120 of file amtec_base.h.

#define STATE_POW_VOLT_ERR   0x00040000

Definition at line 118 of file amtec_base.h.

#define STATE_POWERFAULT   0x00000008

Definition at line 115 of file amtec_base.h.

#define STATE_RAMP_ACC   0x00001000

Definition at line 108 of file amtec_base.h.

#define STATE_RAMP_DEC   0x00004000

Definition at line 110 of file amtec_base.h.

#define STATE_RAMP_END   0x00008000

Definition at line 111 of file amtec_base.h.

#define STATE_RAMP_STEADY   0x00002000

Definition at line 109 of file amtec_base.h.

#define STATE_SW1   0x00000080

Definition at line 103 of file amtec_base.h.

#define STATE_SW2   0x00000100

Definition at line 104 of file amtec_base.h.

#define STATE_SWR   0x00000040

Definition at line 102 of file amtec_base.h.

#define STATE_TOW_ERROR   0x00000010

Definition at line 116 of file amtec_base.h.

#define TIMEOUT   -1

Definition at line 58 of file amtec_base.h.

#define UINT16   3

Definition at line 66 of file amtec_base.h.

#define UINT32   5

Definition at line 68 of file amtec_base.h.

#define UINT8   1

Definition at line 64 of file amtec_base.h.

#define WRONG   0

Definition at line 59 of file amtec_base.h.


Typedef Documentation


Enumeration Type Documentation

Enumerator:
N 
E 
O 

Definition at line 209 of file amtec_base.h.


Function Documentation

void amtecClear ( amtec_powercube_p  powercube)

Definition at line 152 of file amtec_base.c.

Definition at line 144 of file amtec_base.c.

Definition at line 210 of file amtec_base.c.

Definition at line 157 of file amtec_base.c.



amtec
Author(s): Charles DuHadway, Benjamin Pitzer (Maintained by Benjamin Pitzer)
autogenerated on Mon Oct 6 2014 10:10:36