Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
abp_add.h
00001 /******************************************************************************* 00002 ******************************************************************************** 00003 ** ** 00004 ** ABP version 7.16.01 (2015-10-14) ** 00005 ** */ 00006 /******************************************************************************* 00007 ******************************************************************************** 00008 ** 00009 ** File Name 00010 ** --------- 00011 ** 00012 ** abp_add.h 00013 ** 00014 ******************************************************************************** 00015 ******************************************************************************** 00016 ** 00017 ** Description 00018 ** ----------- 00019 ** 00020 ** abp_add - Anybus-CC Protocol - Additional Diagnostic object definitions 00021 ** PROFIBUS specific constants for the Diagnostic object 00022 ** 00023 ** This file contains network specific definitions used by the Anybus-CC 00024 ** PROFIBUS module as well as applications designed to use such module. 00025 ** 00026 ******************************************************************************** 00027 ******************************************************************************** 00028 ** ** 00029 ** COPYRIGHT NOTIFICATION (c) 2008 HMS Industrial Networks AB ** 00030 ** ** 00031 ** This code is the property of HMS Industrial Networks AB. ** 00032 ** The source code may not be reproduced, distributed, or used without ** 00033 ** permission. When used together with a product from HMS, this code can be ** 00034 ** modified, reproduced and distributed in binary form without any ** 00035 ** restrictions. ** 00036 ** ** 00037 ** THE CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. HMS DOES NOT ** 00038 ** WARRANT THAT THE FUNCTIONS OF THE CODE WILL MEET YOUR REQUIREMENTS, OR ** 00039 ** THAT THE OPERATION OF THE CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR ** 00040 ** THAT DEFECTS IN IT CAN BE CORRECTED. ** 00041 ** ** 00042 ******************************************************************************** 00043 ******************************************************************************** 00044 */ 00045 00046 #ifndef ABP_ADD_H 00047 #define ABP_ADD_H 00048 00049 00050 /******************************************************************************* 00051 ** 00052 ** Anybus-CC Additional Diagnostic object constants (ABCC30 only) 00053 ** 00054 ** Object revision: 2. 00055 ** 00056 ******************************************************************************** 00057 */ 00058 00059 /*------------------------------------------------------------------------------ 00060 ** 00061 ** The Additional diagnostic object specific object attributes. 00062 ** 00063 **------------------------------------------------------------------------------ 00064 */ 00065 00066 enum 00067 { 00068 ABP_ADD_OA_MAX_INST = 11, 00069 ABP_ADD_OA_EXT_DIAG_OVERFLOW = 12, 00070 ABP_ADD_OA_STATIC_DIAG = 13 00071 }; 00072 00073 00074 /*------------------------------------------------------------------------------ 00075 ** 00076 ** The data size of the Additional diagnostic object specific object 00077 ** attributes (in bytes). 00078 ** 00079 **------------------------------------------------------------------------------ 00080 */ 00081 00082 #define ABP_ADD_OA_MAX_INST_DS ABP_UINT16_SIZEOF 00083 #define ABP_ADD_OA_EXT_DIAG_OVERFLOW_DS ABP_UINT8_SIZEOF 00084 #define ABP_ADD_OA_STATIC_DIAG_DS ABP_UINT8_SIZEOF 00085 00086 00087 /*------------------------------------------------------------------------------ 00088 ** 00089 ** Additional Diagnostic instance attributes. 00090 ** 00091 **------------------------------------------------------------------------------ 00092 */ 00093 00094 enum 00095 { 00096 ABP_ADD_IA_MODULE_NUMBER = 1, 00097 ABP_ADD_IA_IO_TYPE = 2, 00098 ABP_ADD_IA_CHANNEL_NUMBER = 3, 00099 ABP_ADD_IA_CHANNEL_TYPE = 4, 00100 ABP_ADD_IA_ERROR_TYPE = 5 00101 }; 00102 00103 /*------------------------------------------------------------------------------ 00104 ** 00105 ** The max value of the module number 00106 ** 00107 **------------------------------------------------------------------------------ 00108 */ 00109 00110 #define ABP_ADD_MODULE_NUMBER_MAX 0x3F 00111 00112 00113 /*------------------------------------------------------------------------------ 00114 ** 00115 ** The data size of the Additional Diagnostic instance attributes (in bytes). 00116 ** 00117 **------------------------------------------------------------------------------ 00118 */ 00119 00120 #define ABP_ADD_IA_MODULE_NUMBER_DS ABP_UINT8_SIZEOF 00121 #define ABP_ADD_IA_IO_TYPE_DS ABP_UINT8_SIZEOF 00122 #define ABP_ADD_IA_CHANNEL_NUMBER_DS ABP_UINT8_SIZEOF 00123 #define ABP_ADD_IA_CHANNEL_TYPE_DS ABP_UINT8_SIZEOF 00124 #define ABP_ADD_IA_ERROR_TYPE_DS ABP_UINT8_SIZEOF 00125 00126 00127 /*------------------------------------------------------------------------------ 00128 ** 00129 ** The Additional Diagnostic object specific message commands. 00130 ** 00131 **------------------------------------------------------------------------------ 00132 */ 00133 00134 enum 00135 { 00136 ABP_ADD_CMD_ALARM_NOTIFICATION = 0x10 00137 }; 00138 00139 00140 /*------------------------------------------------------------------------------ 00141 ** 00142 ** Additional Diagnostic object specific error codes and network specific 00143 ** error codes for the Diagnostic object 00144 ** 00145 **------------------------------------------------------------------------------ 00146 */ 00147 00148 enum 00149 { 00150 ABP_ADD_ERR_NO_ERROR = 0x00, 00151 ABP_ADD_ERR_INVALID_SLOT_NUMBER = 0x01, 00152 ABP_ADD_ERR_INVALID_IO_TYPE = 0x02, 00153 ABP_ADD_ERR_INVALID_CHANNEL_NUMBER = 0x03, 00154 ABP_ADD_ERR_INVALID_CHANNEL_TYPE = 0x04, 00155 ABP_ADD_ERR_INVALID_ERROR_TYPE = 0x05, 00156 ABP_ADD_ERR_INVALID_ALARM_SPECIFIER = 0x06, 00157 ABP_ADD_ERR_ALARM_TYPE_DISABLED = 0x07, 00158 ABP_ADD_ERR_TOO_MANY_ACTIVE_ALARMS = 0x08, 00159 ABP_ADD_ERR_ALARM_TYPE_ALREADY_ACTIVE = 0x09 00160 }; 00161 00162 00163 /*------------------------------------------------------------------------------ 00164 ** 00165 ** Value range of slot number (instance attribute and parameter in 00166 ** Alarm Notification command) 00167 ** 00168 **------------------------------------------------------------------------------ 00169 */ 00170 00171 enum 00172 { 00173 ABP_ADD_SLOT_NUMBER_MIN = 0x00, 00174 ABP_ADD_SLOT_NUMBER_MAX = 0xFE 00175 }; 00176 00177 00178 /*------------------------------------------------------------------------------ 00179 ** 00180 ** Values of IO type attribute 00181 ** 00182 **------------------------------------------------------------------------------ 00183 */ 00184 00185 enum 00186 { 00187 ABP_ADD_IO_TYPE_INPUT = 0x01, 00188 ABP_ADD_IO_TYPE_OUTPUT = 0x02, 00189 ABP_ADD_IO_TYPE_INPUT_OUTPUT = 0x03 00190 }; 00191 00192 00193 /*------------------------------------------------------------------------------ 00194 ** 00195 ** Value range of channel number attribute 00196 ** 00197 **------------------------------------------------------------------------------ 00198 */ 00199 00200 enum 00201 { 00202 ABP_ADD_CHANNEL_NUMBER_MIN = 0x00, 00203 ABP_ADD_CHANNEL_NUMBER_MAX = 0x3F 00204 }; 00205 00206 00207 /*------------------------------------------------------------------------------ 00208 ** 00209 ** Values of Channel type attribute 00210 ** 00211 **------------------------------------------------------------------------------ 00212 */ 00213 00214 enum 00215 { 00216 ABP_ADD_CHANNEL_TYPE_BIT = 0x01, 00217 ABP_ADD_CHANNEL_TYPE_2_BITS = 0x02, 00218 ABP_ADD_CHANNEL_TYPE_4_BITS = 0x03, 00219 ABP_ADD_CHANNEL_TYPE_BYTE = 0x04, 00220 ABP_ADD_CHANNEL_TYPE_WORD = 0x05, 00221 ABP_ADD_CHANNEL_TYPE_2_WORDS = 0x06 00222 }; 00223 00224 00225 /*------------------------------------------------------------------------------ 00226 ** 00227 ** Values of Error type attribute 00228 ** 00229 ** 0x00 : Reserved 00230 ** 0x01 - 0x09: Defined error codes in PROFIBUS specification 00231 ** 0x0A - 0x0F: Reserved 00232 ** 0x10 - 0x1F: Manufacturer specific 00233 ** 00234 **------------------------------------------------------------------------------ 00235 */ 00236 00237 enum 00238 { 00239 ABP_ADD_ERROR_TYPE_SHORT_CIRCUIT = 0x01, 00240 ABP_ADD_ERROR_TYPE_UNDER_VOLTAGE = 0x02, 00241 ABP_ADD_ERROR_TYPE_OVER_VOLTAGE = 0x03, 00242 ABP_ADD_ERROR_TYPE_OVERLOAD = 0x04, 00243 ABP_ADD_ERROR_TYPE_OVER_TEMPERATURE = 0x05, 00244 ABP_ADD_ERROR_TYPE_WIRE_BREAK = 0x06, 00245 ABP_ADD_ERROR_TYPE_UPPER_LIMIT_EXCEEDED = 0x07, 00246 ABP_ADD_ERROR_TYPE_LOWER_LIMIT_EXCEEDED = 0x08, 00247 ABP_ADD_ERROR_TYPE_ERROR_GENERAL = 0x09, 00248 00249 ABP_ADD_ERROR_TYPE_MANUF_MIN = 0x10, 00250 ABP_ADD_ERROR_TYPE_MANUF_MAX = 0x1F 00251 }; 00252 00253 00254 /*------------------------------------------------------------------------------ 00255 ** 00256 ** Values of Alarm type (part of Alarm Notification command) 00257 ** 00258 ** 0x00 : Reserved 00259 ** 0x01 - 0x06: Defined alarm types in PROFIBUS specification 00260 ** 0x07 - 0x1F: Reserved 00261 ** 0x20 - 0x7E: Manufacturer specific 00262 ** 00263 **------------------------------------------------------------------------------ 00264 */ 00265 00266 enum 00267 { 00268 ABP_ADD_ALARM_TYPE_DIAGNOSIS = 0x01, 00269 ABP_ADD_ALARM_TYPE_PROCESS = 0x02, 00270 ABP_ADD_ALARM_TYPE_PULL = 0x03, 00271 ABP_ADD_ALARM_TYPE_PLUG = 0x04, 00272 ABP_ADD_ALARM_TYPE_STATUS = 0x05, 00273 ABP_ADD_ALARM_TYPE_UPDATE = 0x06, 00274 00275 ABP_ADD_ALARM_TYPE_MANUF_MIN = 0x20, 00276 ABP_ADD_ALARM_TYPE_MANUF_MAX = 0x7E 00277 }; 00278 00279 00280 /*------------------------------------------------------------------------------ 00281 ** 00282 ** Values of Alarm specifier (part of Alarm Notification command) 00283 ** 00284 **------------------------------------------------------------------------------ 00285 */ 00286 00287 enum 00288 { 00289 ABP_ADD_SPEC_NO_FURTHER_DIFF = 0x00, 00290 ABP_ADD_SPEC_ERROR_APPEARS = 0x01, 00291 ABP_ADD_SPEC_ERROR_DISAPPEARS_SLOT_OK = 0x02, 00292 ABP_ADD_SPEC_ERROR_DISAPPEARS_SLOT_NOT_OK = 0x03 00293 }; 00294 00295 00296 #endif /* inclusion lock */ 00297 00298 /******************************************************************************* 00299 ** 00300 ** End of abp_add.h 00301 ** 00302 ******************************************************************************** 00303 */
Generated on Tue Jul 12 2022 15:51:56 by
