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 { /// /// 结构类 /// public class WareSdaStruct { /// /// PLC地址分隔符 ,用于分隔 DB地址和偏移量的 /// public static char PLCDBADDRESS_SEPARATE = '|'; /// /// 跟PLC最大的心跳值 /// public static int MaxHandShake = 10000; /// /// 系统设置的语言 语言配置 配置 0 中文 1 英文 /// public static int LanguageFlg = 0; /// /// 系统设置的使用的方式 /// 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"); /// /// RGV站点集合 /// public static List RgvStationList = new List() { "1001","1002","1003","1004","1005","1006","1007","1008","1009","1010", "1011","1012","1013","1014","1015", "1020","1030","1040", //拆盘机 提升机 RGV "1019" }; /// /// 站点集合 /// public static List StationStationList = new List() { StationLocationEnum.首次扫码工位.ToString(), StationLocationEnum.BZ01.ToString(), StationLocationEnum.BZ39.ToString(), StationLocationEnum.BZ21.ToString(), StationLocationEnum.BZ12.ToString(), }; #region 堆垛机报警 //里面有空格,别忘了最后trim下 /// /// 堆垛机报警字典 /// key:报警DB块地址 value:报警内容 /// public static IDictionary SrmAlertDict = new System.Collections.Generic.Dictionary() { {"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下 /// /// RGV报警字典 /// key:报警代码 value:报警内容 /// public static IDictionary RgvAlertDict = new System.Collections.Generic.Dictionary() { {"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","输送线通讯异常"} }; //里面有空格,别忘了最后trim下 /// /// RGV报警字典 /// key:报警代码 value:报警内容 /// public static IDictionary StationAlertDict = new System.Collections.Generic.Dictionary() { {"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 } }