22
schangxiang@126.com
2024-12-25 30443483e37c7d323dca9c20d8407c3614acf542
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
using HslCommunication.Profinet.Siemens;
using iWareCommon.Utils;
using iWareModel;
using S7.Net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace iWareSda
{
    /// <summary>
    /// 结构类
    /// </summary>
    public class WareSdaStruct
    {
        /// <summary>
        /// PLC地址分隔符 ,用于分隔 DB地址和偏移量的
        /// </summary>
        public static char PLCDBADDRESS_SEPARATE = '|';
 
        /// <summary>
        /// 跟PLC最大的心跳值
        /// </summary>
        public static int MaxHandShake = 10000;
 
        /// <summary>
        ///  系统设置的语言 语言配置 配置  0 中文 1 英文
        /// </summary>
        public static int LanguageFlg = 0;
 
        /// <summary>
        ///  系统设置的使用的方式
        /// </summary>
        public readonly static PLCServiceTypeEnum System_PlcServiceTypeEnum = PLCServiceTypeEnum.Siemens_HslCommunicationService;
 
        #region 堆垛机的PLC地址
 
        public const CpuType Srm_PLC_CpuType = CpuType.S71500;
        public const SiemensPLCS Srm_SiemensPLCS = SiemensPLCS.S1500;
        public static string Srm1_Address = ConfigHelper.GetConfigString("Srm1_Address");
        public static string Srm2_Address = ConfigHelper.GetConfigString("Srm2_Address");
        public static string Srm3_Address = ConfigHelper.GetConfigString("Srm3_Address");
        public static string Srm4_Address = ConfigHelper.GetConfigString("Srm4_Address");
        public static short Srm_Rack = (short)ConfigHelper.GetConfigInt("Srm_Rack");
        public static short Srm_Slot = (short)ConfigHelper.GetConfigInt("Srm_Slot");
        public static short Srm_Port = (short)ConfigHelper.GetConfigInt("Srm_Port");
 
        #endregion
 
        #region RGV的PLC地址
 
        public const CpuType RGV_PLC_CpuType = CpuType.S71500;
        public const SiemensPLCS RGV_SiemensPLCS = SiemensPLCS.S1500;
        public static string RGV_Address = ConfigHelper.GetConfigString("RGV_Address");
        public static short RGV_Rack = (short)ConfigHelper.GetConfigInt("RGV_Rack");
        public static short RGV_Slot = (short)ConfigHelper.GetConfigInt("RGV_Slot");
        public static short RGV_Port = (short)ConfigHelper.GetConfigInt("RGV_Port");
 
        #endregion
 
        #region 站点的PLC地址
 
        public const CpuType Station_PLC_CpuType = CpuType.S71500;
        public const SiemensPLCS Station_SiemensPLCS = SiemensPLCS.S1500;
        public static string Station_Address = ConfigHelper.GetConfigString("Station_Address");
        public static short Station_Rack = (short)ConfigHelper.GetConfigInt("Station_Rack");
        public static short Station_Slot = (short)ConfigHelper.GetConfigInt("Station_Slot");
        public static short Station_Port = (short)ConfigHelper.GetConfigInt("Station_Port");
 
        #endregion
 
        #region 输送线的PLC地址
 
        //public const CpuType Line_PLC_CpuType = CpuType.S71500;
        //public const SiemensPLCS Line_SiemensPLCS = SiemensPLCS.S1500;
        //public static string Line_Address = ConfigHelper.GetConfigString("Line_Address");
        //public static short Line_Rack = (short)ConfigHelper.GetConfigInt("Line_Rack");
        //public static short Line_Slot = (short)ConfigHelper.GetConfigInt("Line_Slot");
        //public static short Line_Port = (short)ConfigHelper.GetConfigInt("Line_Port");
 
        #endregion
 
        public static string HuscoLine_Address = "";//ConfigHelper.GetConfigString("HuscoLine_Address");
 
        /// <summary>
        /// RGV站点集合
        /// </summary>
        public static List<string> RgvStationList = new List<string>() {
            "1001","1002","1003","1004","1005","1006","1007","1008","1009","1010",
            "1011","1012","1013","1014","1015",
            "1020","1030","1040",  //拆盘机 提升机 RGV
            "1019"
        };
 
        /// <summary>
        /// 站点集合
        /// </summary>
        public static List<string> StationStationList = new List<string>() {
           StationLocationEnum.首次扫码工位.ToString(),
           StationLocationEnum.BZ01.ToString(),
           StationLocationEnum.BZ39.ToString(),
           StationLocationEnum.BZ21.ToString(),
           StationLocationEnum.BZ12.ToString(),
           StationLocationEnum.BZ30.ToString(),
           StationLocationEnum.BZ3007.ToString(),
        };
 
 
        #region 堆垛机报警
 
        //里面有空格,别忘了最后trim下
        /// <summary>
        /// 堆垛机报警字典 
        /// key:报警DB块地址 value:报警内容
        /// </summary>
        public static IDictionary<string, string> SrmAlertDict = new System.Collections.Generic.Dictionary<string, string>() {
          {"0.0","取货堆垛机有货"},
{"0.1","放货堆垛机无货"},
{"0.2","行走定位异常"},
{"0.3","升降定位异常"},
{"0.4","货叉定位异常"},
{"0.5","货叉编码器数据异常"},
{"0.6","货叉原位开关异常"},
{"0.7","左前超宽"},
{"1.0","右超高"},
{"1.1","右超宽"},
{"1.2","起叉超时"},
{"1.3","落叉超时"},
{"1.4","货叉力矩异常"},
{"1.5","行走、升降寻址数据异常    "},
{"1.6","货叉寻址数据异常    "},
{"1.7","货叉运行超时    "},
{"2.0","行走超出软限位    "},
{"2.1","升降超出软限位    "},
{"2.2","货叉1超出软限位    "},
{"2.3","夹紧装置触发    "},
{"2.5","超速保护触发    "},
{"2.6","行走极限触发    "},
{"2.7","升降极限触发    "},
{"3.0","柜门急停触发    "},
{"3.1","非维修模式调整未归位,请归位    "},
{"3.2","相序继电器触发    "},
{"3.3","安全模块异常    "},
{"3.4","货叉1绝对值编码器数据异常    "},
{"3.5","外部急停触发,安全门急停触发    "},
{"3.6","外部手动触发    "},
{"4.0","行走变频器故障    "},
{"4.1","行走马达保护器未正常工作    "},
{"4.2","行走抱闸断路器未正常工作    "},
{"4.3","升降变频器故障    "},
{"4.4","升降马达保护器未正常工作    "},
{"4.5","升降抱闸断路器未正常工作    "},
{"4.6","货叉1变频器故障    "},
{"4.7","货叉1达保护器未正常工作    "},
{"5.0","货叉1抱闸断路器未正常工作    "},
{"5.1","货叉2变频器故障    "},
{"5.2","货叉2达保护器未正常工作    "},
{"5.3","货叉2抱闸断路器未正常工作    "},
{"5.4","过载装置触发    "},
{"5.5","软急停触发    "},
{"6.0","从站故障    "},
{"6.1","6.1    "},
{"6.2","列到位,无光电到位信号    "},
{"6.3","层到位,无光电到位信号    "},
{"6.4","行走抱闸接触器异常    "},
{"7.0","输送机通讯中断    "},
{"7.1","地面机通讯中断    "},
{"8.0","空取异常    "},
{"8.1","出库货位堵塞    "},
{"8.2","满入异常    "},
{"8.3","入库货位阻塞    "},
{"8.4","扫描仪障碍检测异常    "},
{"8.5","源位置校验错误    "},
{"8.6","目标位置校验错误    "},
{"7.2","左后超宽    "},
{"7.4","左后超宽    "},
{"7.3","右前超宽    "},
{"7.6","左超高    "},
{"7.5","左超宽"},
{"5.6","取放货申请超时    "},
{"5.7","取放货申请信号中断    "},
{"2.4","立柱急停触发    "},
{"3.7","登梯口/立柱急停触发    "},
{"6.5","升降抱闸接触器异常    "},
{"6.6","货叉1抱闸接触器异常    "},
{"6.7","货叉2抱闸接触器异常    "},
{"10.0","行走机械卡阻    "},
{"10.1","升降机械卡阻    "},
{"10.2","货叉1机械卡阻    "},
{"10.3","货叉2机械卡阻    "},
{"10.4","地面柜急停触发    "},
{"10.5","拉绳开关被触发    "},
{"10.6","安全门被打开    "},
{"10.7","风扇灯断路器工作异常    "},
{"11.0","触摸屏、光通讯、激光测距电源断路器工作异常    "},
{"11.1","载货台安全回路断路器工作异常    "},
{"11.2","按钮开关断路器    "},
{"11.3","载货台安全回路断路器工作异常    "},
{"11.4","控制室安全门未关闭    "},
//{"7.7","升降超出范围    "},
//{"11.6","升降激光数据丢失    "},
//{"11.5","行走激光数据丢失    "},
//{"8.7","货叉位置错误    "},
//{"12.0","安全门打开    "},
 
 
 
        };
 
        #endregion
 
        #region RGV和输送线报警
 
        //里面有空格,别忘了最后trim下
        /// <summary>
        /// RGV报警字典
        /// key:报警代码 value:报警内容
        /// </summary>
        public static IDictionary<string, string> RgvAlertDict = new System.Collections.Generic.Dictionary<string, string>() {
        {"0.0","前极限异常"},
        {"0.1","后极限异常"},
        {"0.2","急停异常"},
        {"0.3","行走激光测距值无变化"},
        {"0.4","行走激光测距值位零"},
        {"0.5","行走变频器异常"},
        {"0.6","输送变频器异常"},
        {"0.7","行走超时异常"},
        {"1.0","输送超时异常"},
        {"1.1","左侧突出异常"},
        {"1.2","右侧突出异常"},
        {"1.3","输送线突出异常"},
        {"1.4","输送线通讯异常"}
        };
 
 
 
        #endregion
    }
}