ModuleErrors.h
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003  * 
00004  * Copyright (c) 2012 
00005  * 
00006  * SCHUNK GmbH & Co. KG
00007  *  
00008  * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
00009  * 
00010  * Project name: Drivers for "Amtec M5 Protocol" Electronics V4
00011  *                                                                        
00012  * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
00013  * 
00014  * Email:robotics@schunk.com
00015  * 
00016  * ToDo: 
00017  * 
00018  * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
00019  * 
00020  * Redistribution and use in source and binary forms, with or without 
00021  * modification, are permitted provided that the following conditions are met: 
00022  * 
00023  *  * Redistributions of source code must retain the above copyright 
00024  *    notice, this list of conditions and the following disclaimer. 
00025  *  * Redistributions in binary form must reproduce the above copyright 
00026  *    notice, this list of conditions and the following disclaimer in the 
00027  *    documentation and/or other materials provided with the distribution. 
00028  *  * Neither the name of SCHUNK GmbH & Co. KG nor the names of its 
00029  *    contributors may be used to endorse or promote products derived from 
00030  *    this software without specific prior written permission. 
00031  * 
00032  * This program is free software: you can redistribute it and/or modify 
00033  * it under the terms of the GNU Lesser General Public License LGPL as 
00034  * published by the Free Software Foundation, either version 3 of the 
00035  * License, or (at your option) any later version. 
00036  * 
00037  * This program is distributed in the hope that it will be useful, 
00038  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
00039  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
00040  * GNU Lesser General Public License LGPL for more details. 
00041  * 
00042  * You should have received a copy of the GNU Lesser General Public 
00043  * License LGPL along with this program. 
00044  * If not, see <http://www.gnu.org/licenses/>.
00045  * 
00046  ******************************************************************************/
00047 
00048 
00049 #ifndef MODULEERRORS_H
00050 #define MODULEERRORS_H
00051 
00052         // Module States
00053         
00054 #define STATEID_MOD_ERROR                                               0x00000001L
00055 #define STATEID_MOD_HOME                                                0x00000002L
00056 #define STATEID_MOD_HALT                                                0x00000004L
00057 #define STATEID_MOD_POWERFAULT                                  0x00000008L
00058 #define STATEID_MOD_TOW_ERROR                                   0x00000010L
00059 #define STATEID_MOD_COMM_ERROR                                  0x00000020L
00060 #define STATEID_MOD_SWR                                                 0x00000040L
00061 #define STATEID_MOD_SW1                                                 0x00000080L
00062 #define STATEID_MOD_SW2                                                 0x00000100L
00063 #define STATEID_MOD_BRAKEACTIVE                                 0x00000200L
00064 #define STATEID_MOD_CURLIMIT                                    0x00000400L
00065 #define STATEID_MOD_MOTION                                              0x00000800L
00066 #define STATEID_MOD_RAMP_ACC                                    0x00001000L
00067 #define STATEID_MOD_RAMP_STEADY                                 0x00002000L
00068 #define STATEID_MOD_RAMP_DEC                                    0x00004000L
00069 #define STATEID_MOD_RAMP_END                                    0x00008000L
00070 #define STATEID_MOD_INPROGRESS                                  0x00010000L
00071 #define STATEID_MOD_FULLBUFFER                                  0x00020000L
00072 #define STATEID_MOD_POW_VOLT_ERR                                0x00040000L
00073 #define STATEID_MOD_POW_FET_TEMP                                0x00080000L
00074 #define STATEID_MOD_POW_WDG_TEMP                                0x00100000L
00075 #define STATEID_MOD_POW_SHORTCUR                                0x00200000L
00076 #define STATEID_MOD_POW_HALLERR                                 0x00400000L
00077 #define STATEID_MOD_POW_INTEGRALERR                             0x00800000L
00078 #define STATEID_MOD_CPU_OVERLOAD                                0x01000000L
00079 #define STATEID_MOD_BEYOND_HARD                                 0x02000000L
00080 #define STATEID_MOD_BEYOND_SOFT                                 0x04000000L
00081 
00082         // Module Config
00083 
00084 #define CONFIGID_MOD_ENCODER_FEEDBACK                   0x00000001L //OS: 25xx from 35xx in SETUP
00085 #define CONFIGID_MOD_RESOLVER_FEEDBACK                  0x00000002L //OS: 25xx from 35xx in SETUP
00086 #define CONFIGID_MOD_ABSOLUTE_FEEDBACK                  0x00000004L //OS: 25xx from 35xx in SETUP
00087 #define CONFIGID_MOD_BRAKE_PRESENT                              0x00000008L
00088 #define CONFIGID_MOD_BRAKE_AT_POWERON                   0x00000010L
00089 #define CONFIGID_MOD_SWR_WITH_ENCODERZERO               0x00000020L
00090 #define CONFIGID_MOD_SWR_AT_FALLING_EDGE                0x00000040L
00091 #define CONFIGID_MOD_CHANGE_SWR_TO_LIMIT                0x00000080L
00092 #define CONFIGID_MOD_SWR_ENABLED                        0x00000100L
00093 #define CONFIGID_MOD_SWR_LOW_ACTIVE                             0x00000200L
00094 #define CONFIGID_MOD_SWR_EQ_POSLIMIT                    0x00000400L //OS: 25xx
00095 #define CONFIGID_MOD_SWR_USE_EXTERNAL                   0x00000400L //OS: 35xx
00096 #define CONFIGID_MOD_SW1_ENABLED                                0x00000800L
00097 #define CONFIGID_MOD_SW1_LOW_ACTIVE                             0x00001000L
00098 #define CONFIGID_MOD_SW1_EQ_POSLIMIT                    0x00002000L //OS: 25xx
00099 #define CONFIGID_MOD_SW1_USE_EXTERNAL                   0x00002000L //OS: 35xx
00100 #define CONFIGID_MOD_SW2_ENABLED                                0x00004000L
00101 #define CONFIGID_MOD_SW2_LOW_ACTIVE                             0x00008000L
00102 #define CONFIGID_MOD_SW2_EQ_POSLIMIT                    0x00010000L //OS: 25xx
00103 #define CONFIGID_MOD_SW2_USE_EXTERNAL                   0x00010000L //OS: 35xx
00104 #define CONFIGID_MOD_LINEAR                                             0x00020000L
00105 #define CONFIGID_MOD_OPENBRAKE_ON_SW2                   0x00040000L     //OS: 25xx but not in 2512 from 35xx in SETUP
00106 #define CONFIGID_MOD_ALLOW_FULL_CUR                             0x00080000L
00107 #define CONFIGID_MOD_M3_COMPATIBLE                              0x00100000L
00108 #define CONFIGID_MOD_LINEAR_SCREW                               0x00200000L
00109 #define CONFIGID_MOD_DISABLE_ON_HALT                    0x00800000L
00110 #define CONFIGID_MOD_WATCHDOG_ENABLE                    0x01000000L
00111 #define CONFIGID_MOD_ZERO_MOVE_AFTER_HOK                0x02000000L //OS: 35xx
00112 #define CONFIGID_MOD_DISABLE_ACK                                0x04000000L
00113 #define CONFIGID_MOD_SYNC_MOTION                                0x08000000L
00114 #define CONFIGID_MOD_SYNC_TRANSMIT                              0x10000000L
00115 #define CONFIGID_MOD_CAN_RS232_COMM                             0x40000000L //OS: 25xx
00116 #define CONFIGID_MOD_PROFI_RS485_COMM                   0x80000000L //OS: 25xx
00117 
00118         // Module Setup
00119 
00120 // ---- FEEDBACK SETUP -----------
00121 #define SETUPID_MOD_ENCODER_FEEDBACK                    0x00000001L
00122 #define SETUPID_MOD_RESOLVER_FEEDBACK                   0x00000002L
00123 #define SETUPID_MOD_ABSOLUTE_FEEDBACK                   0x00000004L
00124 // ---- DIGITAL IO SETUP ---------
00125 #define SETUPID_MOD_4IN_4OUT                                    0x00000008L
00126 #define SETUPID_MOD_3IN_ENCODER_IN                              0x00000010L
00127 #define SETUPID_MOD_3IN_ENCODER_OUT                             0x00000020L
00128 // ---- COMM INTERFACE -----------
00129 #define SETUPID_MOD_RS232                                               0x00000040L
00130 #define SETUPID_MOD_CAN                                                 0x00000200L
00131 #define SETUPID_MOD_PROFIBUS                                    0x00000400L
00132 // ---- CAN ID SETUP -------------
00133 #define SETUPID_MOD_USE_M3ID                                    0x00000800L
00134 #define SETUPID_MOD_USE_M4ID                                    0x00001000L
00135 #define SETUPID_MOD_USE_CANOPEN                                 0x00002000L
00136 // ---- MOTOR SETUP --------------
00137 #define SETUPID_MOD_INVERT_MOTORDIR                             0x00004000L
00138 // ---- INPUT USAGE --------------
00139 #define SETUPID_MOD_USE_SW2_AS_ENABLE                   0x00008000L
00140 #define SETUPID_MOD_USE_SW2_AS_BRAKE                    0x00010000L
00141 // ---- OUTPUT USAGE -------------
00142 #define SETUPID_MOD_ERROR_TO_OUT0                               0x00020000L
00143 // ---- IN/OUTPUT USAGE -------------
00144 #define SETUPID_MOD_IO_GRIPPER_CONTROL                  0x00080000L
00145 
00146         // Module Types
00147 
00148 #define TYPEID_MOD_ROTARY                                               0x0f
00149 #define TYPEID_MOD_LINEAR                                               0xf0
00150 
00151         // Module DIO's
00152 
00153 #define DIOID_MOD_INBIT0                                                0x00000001L
00154 #define DIOID_MOD_INBIT1                                                0x00000002L
00155 #define DIOID_MOD_INBIT2                                                0x00000004L
00156 #define DIOID_MOD_INBIT3                                                0x00000008L
00157  
00158 #define DIOID_MOD_OUTBIT0                                               0x00000010L
00159 #define DIOID_MOD_OUTBIT1                                               0x00000020L
00160 #define DIOID_MOD_OUTBIT2                                               0x00000040L
00161 #define DIOID_MOD_OUTBIT3                                               0x00000080L
00162  
00163 #define DIOID_MOD_INSWR                                                 0x00000100L
00164 #define DIOID_MOD_INSW1                                                 0x00000200L
00165 #define DIOID_MOD_INSW2                                                 0x00000400L
00166 
00167         // Module Baudrates
00168 
00169 #define BAUDRATEID_MOD_CAN_125K                                 0
00170 #define BAUDRATEID_MOD_CAN_250K                                 1
00171 #define BAUDRATEID_MOD_CAN_500K                                 2
00172 #define BAUDRATEID_MOD_CAN_1000K                                3
00173 
00174 #define BAUDRATEID_MOD_RS232_1200                               0
00175 #define BAUDRATEID_MOD_RS232_2400                               1
00176 #define BAUDRATEID_MOD_RS232_4800                               2
00177 #define BAUDRATEID_MOD_RS232_9600                               3
00178 #define BAUDRATEID_MOD_RS232_19200                              4
00179 #define BAUDRATEID_MOD_RS232_38400                              5
00180 #define BAUDRATEID_MOD_RS232_56700                              6
00181 
00182         // Module Errors
00183         
00184 #define ERRID_MOD                                       (-300L)         // module error
00185 #define ERRID_MOD_INITERROR                     (ERRID_MOD - 1)
00186 #define ERRID_MOD_ISINITIALIZED         (ERRID_MOD - 2)
00187 #define ERRID_MOD_NOTINITIALIZED        (ERRID_MOD - 3)
00188 #define ERRID_MOD_WRONGMODULEID         (ERRID_MOD - 4)
00189 #define ERRID_MOD_DEVICENOTFOUND        (ERRID_MOD - 5)
00190 #define ERRID_MOD_DEVICENOTINIT         (ERRID_MOD - 6)
00191 #define ERRID_MOD_MODULEERROR           (ERRID_MOD - 7)
00192 #define ERRID_MOD_WAITTIMEOUT           (ERRID_MOD - 8)
00193 #define ERRID_MOD_CONNECTIONNOTINIT     (ERRID_MOD - 9)
00194 #define ERRID_MOD_PARSERERROR           (ERRID_MOD - 10)
00195 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


schunk_libm5api
Author(s): Florian Weisshardt
autogenerated on Tue Mar 5 2013 14:44:33