src
ComDef
ModuleErrors.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012 SCHUNK GmbH & Co. KG
3
* Copyright (c) 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*/
17
18
#ifndef MODULEERRORS_H
19
#define MODULEERRORS_H
20
21
// Module States
22
23
#define STATEID_MOD_ERROR 0x00000001L
24
#define STATEID_MOD_HOME 0x00000002L
25
#define STATEID_MOD_HALT 0x00000004L
26
#define STATEID_MOD_POWERFAULT 0x00000008L
27
#define STATEID_MOD_TOW_ERROR 0x00000010L
28
#define STATEID_MOD_COMM_ERROR 0x00000020L
29
#define STATEID_MOD_SWR 0x00000040L
30
#define STATEID_MOD_SW1 0x00000080L
31
#define STATEID_MOD_SW2 0x00000100L
32
#define STATEID_MOD_BRAKEACTIVE 0x00000200L
33
#define STATEID_MOD_CURLIMIT 0x00000400L
34
#define STATEID_MOD_MOTION 0x00000800L
35
#define STATEID_MOD_RAMP_ACC 0x00001000L
36
#define STATEID_MOD_RAMP_STEADY 0x00002000L
37
#define STATEID_MOD_RAMP_DEC 0x00004000L
38
#define STATEID_MOD_RAMP_END 0x00008000L
39
#define STATEID_MOD_INPROGRESS 0x00010000L
40
#define STATEID_MOD_FULLBUFFER 0x00020000L
41
#define STATEID_MOD_POW_VOLT_ERR 0x00040000L
42
#define STATEID_MOD_POW_FET_TEMP 0x00080000L
43
#define STATEID_MOD_POW_WDG_TEMP 0x00100000L
44
#define STATEID_MOD_POW_SHORTCUR 0x00200000L
45
#define STATEID_MOD_POW_HALLERR 0x00400000L
46
#define STATEID_MOD_POW_INTEGRALERR 0x00800000L
47
#define STATEID_MOD_CPU_OVERLOAD 0x01000000L
48
#define STATEID_MOD_BEYOND_HARD 0x02000000L
49
#define STATEID_MOD_BEYOND_SOFT 0x04000000L
50
51
// Module Config
52
53
#define CONFIGID_MOD_ENCODER_FEEDBACK 0x00000001L //OS: 25xx from 35xx in SETUP
54
#define CONFIGID_MOD_RESOLVER_FEEDBACK 0x00000002L //OS: 25xx from 35xx in SETUP
55
#define CONFIGID_MOD_ABSOLUTE_FEEDBACK 0x00000004L //OS: 25xx from 35xx in SETUP
56
#define CONFIGID_MOD_BRAKE_PRESENT 0x00000008L
57
#define CONFIGID_MOD_BRAKE_AT_POWERON 0x00000010L
58
#define CONFIGID_MOD_SWR_WITH_ENCODERZERO 0x00000020L
59
#define CONFIGID_MOD_SWR_AT_FALLING_EDGE 0x00000040L
60
#define CONFIGID_MOD_CHANGE_SWR_TO_LIMIT 0x00000080L
61
#define CONFIGID_MOD_SWR_ENABLED 0x00000100L
62
#define CONFIGID_MOD_SWR_LOW_ACTIVE 0x00000200L
63
#define CONFIGID_MOD_SWR_EQ_POSLIMIT 0x00000400L //OS: 25xx
64
#define CONFIGID_MOD_SWR_USE_EXTERNAL 0x00000400L //OS: 35xx
65
#define CONFIGID_MOD_SW1_ENABLED 0x00000800L
66
#define CONFIGID_MOD_SW1_LOW_ACTIVE 0x00001000L
67
#define CONFIGID_MOD_SW1_EQ_POSLIMIT 0x00002000L //OS: 25xx
68
#define CONFIGID_MOD_SW1_USE_EXTERNAL 0x00002000L //OS: 35xx
69
#define CONFIGID_MOD_SW2_ENABLED 0x00004000L
70
#define CONFIGID_MOD_SW2_LOW_ACTIVE 0x00008000L
71
#define CONFIGID_MOD_SW2_EQ_POSLIMIT 0x00010000L //OS: 25xx
72
#define CONFIGID_MOD_SW2_USE_EXTERNAL 0x00010000L //OS: 35xx
73
#define CONFIGID_MOD_LINEAR 0x00020000L
74
#define CONFIGID_MOD_OPENBRAKE_ON_SW2 0x00040000L //OS: 25xx but not in 2512 from 35xx in SETUP
75
#define CONFIGID_MOD_ALLOW_FULL_CUR 0x00080000L
76
#define CONFIGID_MOD_M3_COMPATIBLE 0x00100000L
77
#define CONFIGID_MOD_LINEAR_SCREW 0x00200000L
78
#define CONFIGID_MOD_DISABLE_ON_HALT 0x00800000L
79
#define CONFIGID_MOD_WATCHDOG_ENABLE 0x01000000L
80
#define CONFIGID_MOD_ZERO_MOVE_AFTER_HOK 0x02000000L //OS: 35xx
81
#define CONFIGID_MOD_DISABLE_ACK 0x04000000L
82
#define CONFIGID_MOD_SYNC_MOTION 0x08000000L
83
#define CONFIGID_MOD_SYNC_TRANSMIT 0x10000000L
84
#define CONFIGID_MOD_CAN_RS232_COMM 0x40000000L //OS: 25xx
85
#define CONFIGID_MOD_PROFI_RS485_COMM 0x80000000L //OS: 25xx
86
87
// Module Setup
88
89
// ---- FEEDBACK SETUP -----------
90
#define SETUPID_MOD_ENCODER_FEEDBACK 0x00000001L
91
#define SETUPID_MOD_RESOLVER_FEEDBACK 0x00000002L
92
#define SETUPID_MOD_ABSOLUTE_FEEDBACK 0x00000004L
93
// ---- DIGITAL IO SETUP ---------
94
#define SETUPID_MOD_4IN_4OUT 0x00000008L
95
#define SETUPID_MOD_3IN_ENCODER_IN 0x00000010L
96
#define SETUPID_MOD_3IN_ENCODER_OUT 0x00000020L
97
// ---- COMM INTERFACE -----------
98
#define SETUPID_MOD_RS232 0x00000040L
99
#define SETUPID_MOD_CAN 0x00000200L
100
#define SETUPID_MOD_PROFIBUS 0x00000400L
101
// ---- CAN ID SETUP -------------
102
#define SETUPID_MOD_USE_M3ID 0x00000800L
103
#define SETUPID_MOD_USE_M4ID 0x00001000L
104
#define SETUPID_MOD_USE_CANOPEN 0x00002000L
105
// ---- MOTOR SETUP --------------
106
#define SETUPID_MOD_INVERT_MOTORDIR 0x00004000L
107
// ---- INPUT USAGE --------------
108
#define SETUPID_MOD_USE_SW2_AS_ENABLE 0x00008000L
109
#define SETUPID_MOD_USE_SW2_AS_BRAKE 0x00010000L
110
// ---- OUTPUT USAGE -------------
111
#define SETUPID_MOD_ERROR_TO_OUT0 0x00020000L
112
// ---- IN/OUTPUT USAGE -------------
113
#define SETUPID_MOD_IO_GRIPPER_CONTROL 0x00080000L
114
115
// Module Types
116
117
#define TYPEID_MOD_ROTARY 0x0f
118
#define TYPEID_MOD_LINEAR 0xf0
119
120
// Module DIO's
121
122
#define DIOID_MOD_INBIT0 0x00000001L
123
#define DIOID_MOD_INBIT1 0x00000002L
124
#define DIOID_MOD_INBIT2 0x00000004L
125
#define DIOID_MOD_INBIT3 0x00000008L
126
127
#define DIOID_MOD_OUTBIT0 0x00000010L
128
#define DIOID_MOD_OUTBIT1 0x00000020L
129
#define DIOID_MOD_OUTBIT2 0x00000040L
130
#define DIOID_MOD_OUTBIT3 0x00000080L
131
132
#define DIOID_MOD_INSWR 0x00000100L
133
#define DIOID_MOD_INSW1 0x00000200L
134
#define DIOID_MOD_INSW2 0x00000400L
135
136
// Module Baudrates
137
138
#define BAUDRATEID_MOD_CAN_125K 0
139
#define BAUDRATEID_MOD_CAN_250K 1
140
#define BAUDRATEID_MOD_CAN_500K 2
141
#define BAUDRATEID_MOD_CAN_1000K 3
142
143
#define BAUDRATEID_MOD_RS232_1200 0
144
#define BAUDRATEID_MOD_RS232_2400 1
145
#define BAUDRATEID_MOD_RS232_4800 2
146
#define BAUDRATEID_MOD_RS232_9600 3
147
#define BAUDRATEID_MOD_RS232_19200 4
148
#define BAUDRATEID_MOD_RS232_38400 5
149
#define BAUDRATEID_MOD_RS232_56700 6
150
151
// Module Errors
152
153
#define ERRID_MOD (-300L) // module error
154
#define ERRID_MOD_INITERROR (ERRID_MOD - 1)
155
#define ERRID_MOD_ISINITIALIZED (ERRID_MOD - 2)
156
#define ERRID_MOD_NOTINITIALIZED (ERRID_MOD - 3)
157
#define ERRID_MOD_WRONGMODULEID (ERRID_MOD - 4)
158
#define ERRID_MOD_DEVICENOTFOUND (ERRID_MOD - 5)
159
#define ERRID_MOD_DEVICENOTINIT (ERRID_MOD - 6)
160
#define ERRID_MOD_MODULEERROR (ERRID_MOD - 7)
161
#define ERRID_MOD_WAITTIMEOUT (ERRID_MOD - 8)
162
#define ERRID_MOD_CONNECTIONNOTINIT (ERRID_MOD - 9)
163
#define ERRID_MOD_PARSERERROR (ERRID_MOD - 10)
164
#endif
schunk_libm5api
Author(s): Florian Weisshardt
autogenerated on Sat May 7 2022 02:17:13