labjack_data.h
Go to the documentation of this file.
00001 #ifndef __LABJACK_DATA_H__
00002 #define __LABJACK_DATA_H__
00003 
00029 #include <touch_skill_msgs/MaggieTouchParts.h>
00030 
00032 #define AI_VOLTAGE_BASE 0   // AI line to read the voltage of the battery
00033 #define AI_PLUGGED      1   // AI line to detect whether battery is plugged or not
00034 // value of the voltage divider on the analog input for batteries
00035 #define GAIN_VOLT       3.57
00036 
00038 
00039 #define D_WATCHDOG          0   // D line for watchdog
00040 #define IO_ENABLE_BASE      2   // IO line to enable/disable motors of the base
00041 #define IO_ENABLE_OTHERS    3   // IO line to enable/disable the other motors
00042 #define IO_EMERGENCY        0   // IO line to read the emergency state
00043 #define IO_SETA_SF          1   // IO line to activate the emergency button by software
00044 
00045 
00046 #define TOUCHED         1
00047 #define UNTOUCHED       0
00048 
00049 #define HEAD            0x0002  // mask for line D1
00050 #define LEFT_HAND       0x0004  // mask for line D2
00051 #define LEFT_FOREARM    0x0008  // mask for line D3
00052 #define LEFT_SHOULDER   0x0020  // mask for line D5
00053 #define LEFT_BACK       0x0040  // mask for line D6
00054 #define LEFT_SIDE       0x0080  // mask for line D7
00055 #define RIGHT_FOREARM   0x0800  // mask for line D11
00056 #define RIGHT_HAND      0x1000  // mask for line D12
00057 #define RIGHT_SHOULDER  0x2000  // mask for line D13
00058 #define RIGHT_BACK      0x4000  // mask for line D14
00059 #define RIGHT_SIDE      0x8000  // mask for line D15
00060 
00061 
00062 #define EMERGENCY       0x0001  // mask for line IO0
00063 #define EMERGENCY_SF    0x0002  // mask for line IO1
00064 #define ENABLE_BASE     0x0004  // mask for line IO2
00065 #define ENABLE_BODY     0x0008  // mask for line IO3
00066 
00067 
00068 // value for an DIO output to open/close a rele
00069 #define ENABLE  1
00070 #define DISABLE 0
00071 
00073 
00074 // seconds for the watchdog
00075 #define TIMEOUT_WD  2
00076 
00078 
00079 #define NUM_LIN_AI          8
00080 #define NUM_LIN_AO          2
00081 #define NUM_LIN_IO          4
00082 #define NUM_LIN_D           16
00083 #define NUM_TOUCH_SENSORS   11
00084 
00086 
00087 // labjack data structure
00088 struct t_ljdata {
00089         long DsState;
00090         long IOsState;
00091         float AIsState[NUM_LIN_AI];
00092         long DsDirection;
00093 };
00094 
00095 struct t_pulseData {
00096         long level;
00097         long line;
00098         long microseconds;
00099 };
00100 
00101 struct touch {
00102         int sensor[touch_skill_msgs::MaggieTouchParts::NUMBER_SENSORS];
00103 };
00104 
00105 struct float8 {
00106         float v_float8[NUM_LIN_AI];
00107 };
00108 
00109 struct float2 {
00110         float v_float2[NUM_LIN_AO];
00111 };
00112 
00113 #endif


maggie_labjack
Author(s): Raul Perula-Martinez
autogenerated on Thu Apr 23 2015 22:19:17