Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

emcmotlog.h File Reference

#include "posemath.h"

Include dependency graph for emcmotlog.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  EMCMOT_LOG
struct  EMCMOT_LOG_ALL_FERROR_STRUCT
struct  EMCMOT_LOG_ALL_INPOS_STRUCT
struct  EMCMOT_LOG_ALL_OUTPOS_STRUCT
struct  EMCMOT_LOG_AXIS_POS_STRUCT
struct  EMCMOT_LOG_AXIS_VEL_STRUCT
struct  EMCMOT_LOG_CMD_STRUCT
struct  EMCMOT_LOG_POS_VOLTAGE_STRUCT
struct  EMCMOT_LOG_STRUCT
struct  EMCMOT_LOG_TRAJ_ACC_STRUCT
struct  EMCMOT_LOG_TRAJ_POS_STRUCT
struct  EMCMOT_LOG_TRAJ_VEL_STRUCT

Defines

#define __attribute__(x)
#define EMCMOT_LOG_MAX   10000
#define EMCMOT_LOG_NUM_AXES   3

Enumerations

enum  EMCLOG_TRIGGER_TYPE { EMCLOG_MANUAL_TRIGGER, EMCLOG_DELTA_TRIGGER, EMCLOG_OVER_TRIGGER, EMCLOG_UNDER_TRIGGER }
enum  EMCLOG_TRIGGER_VAR { EMCLOG_TRIGGER_ON_FERROR, EMCLOG_TRIGGER_ON_VOLT, EMCLOG_TRIGGER_ON_POS, EMCLOG_TRIGGER_ON_VEL }

Functions

char __attribute__ ((unused)) emcmotlog_h[]="$Id
int emcmotLogInit (EMCMOT_LOG *log, int type, int size)
int emcmotLogAdd (EMCMOT_LOG *log, EMCMOT_LOG_STRUCT val)
int emcmotLogGet (EMCMOT_LOG *log, EMCMOT_LOG_STRUCT *val)


Define Documentation

#define EMCMOT_LOG_MAX   10000
 

#define EMCMOT_LOG_NUM_AXES   3
 

Definition at line 80 of file emcmotlog.h.

#define __attribute__  
 

Definition at line 29 of file emcmotlog.h.


Enumeration Type Documentation

enum EMCLOG_TRIGGER_TYPE
 

Enumeration values:
EMCLOG_MANUAL_TRIGGER 
EMCLOG_DELTA_TRIGGER 
EMCLOG_OVER_TRIGGER 
EMCLOG_UNDER_TRIGGER 

Definition at line 54 of file emcmotlog.h.

enum EMCLOG_TRIGGER_VAR
 

Enumeration values:
EMCLOG_TRIGGER_ON_FERROR 
EMCLOG_TRIGGER_ON_VOLT 
EMCLOG_TRIGGER_ON_POS 
EMCLOG_TRIGGER_ON_VEL 

Definition at line 61 of file emcmotlog.h.


Function Documentation

char __attribute__ (unused)    [static]
 

Definition at line 33 of file emcmotlog.h.

00033                                                         : emcmotlog.h,v 1.4 2001/07/31 15:47:45 wshackle Exp $";
00034 
00035 /* max log points allowed */
00036 /* Note: this will strongly affect the requirements for shared memory */
00037 #define EMCMOT_LOG_MAX 10000
00038 
00039 /* types of logged data */
00040 enum EMCMOT_LOG_TYPE_ENUM {
00041   EMCMOT_LOG_TYPE_AXIS_POS = 1, /* single axis cmd/actual pos */
00042   EMCMOT_LOG_TYPE_ALL_INPOS = 2, /* all axes actual input pos */
00043   EMCMOT_LOG_TYPE_ALL_OUTPOS = 3, /* all axes commanded output pos */
00044   EMCMOT_LOG_TYPE_CMD = 4,      /* command type and num */
00045   EMCMOT_LOG_TYPE_AXIS_VEL = 5, /* single axis cmd/actual vel */
00046   EMCMOT_LOG_TYPE_ALL_FERROR = 6, /* all axes following error */
00047   EMCMOT_LOG_TYPE_TRAJ_POS = 7, /* Cartesian position at traj rate */
00048   EMCMOT_LOG_TYPE_TRAJ_VEL = 8, /* Cartesian vel diffs at traj rate */
00049   EMCMOT_LOG_TYPE_TRAJ_ACC = 9, /* Cartesian accel diffs at traj rate */
00050   EMCMOT_LOG_TYPE_POS_VOLTAGE = 10 /* all axes measured pos and output V */
00051 };

int emcmotLogAdd EMCMOT_LOG   log,
EMCMOT_LOG_STRUCT    val
 

Definition at line 34 of file emcmotlog.c.

Referenced by emcmotCommandHandler(), and emcmotController().

00035 {
00036   log->log[log->end] = val;
00037 
00038   log->end++;
00039   if (log->end >= log->size)
00040     {
00041       log->end = 0;
00042     }
00043 
00044   log->howmany++;
00045   if (log->howmany > log->size)
00046     {
00047       log->howmany = log->size;
00048       log->start++;
00049       if (log->start >= log->size)
00050         {
00051           log->start = 0;
00052         }
00053     }
00054 
00055   return 0;
00056 }

int emcmotLogGet EMCMOT_LOG   log,
EMCMOT_LOG_STRUCT   val
 

Definition at line 58 of file emcmotlog.c.

Referenced by usrmotDumpLog().

00059 {
00060   if (log->howmany == 0)
00061     {
00062       return -1;
00063     }
00064 
00065   *val = log->log[log->start];
00066   log->start++;
00067   if (log->start >= log->size)
00068     {
00069       log->start = 0;
00070     }
00071 
00072   log->howmany--;
00073 
00074   return 0;
00075 }

int emcmotLogInit EMCMOT_LOG   log,
int    type,
int    size
 

Referenced by emcmotCommandHandler().


Generated on Sun Dec 2 15:27:56 2001 for EMC by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001