Commit 9d2a7c0d 几米阳光

出入库失败的消息也发送给服务器

1 个父辈 c5bf45f1
...@@ -7,13 +7,15 @@ ...@@ -7,13 +7,15 @@
<!--是否开机自动启动料仓--> <!--是否开机自动启动料仓-->
<add key="App_AutoRun" value="1" /> <add key="App_AutoRun" value="1" />
<add key="App_Title" value="料仓_批量上下料" /> <add key="App_Title" value="料仓_批量上下料" />
<add key="Server_Log_Open" value="0" />
<add key="scanner_start_command" value="S" /> <add key="scanner_start_command" value="S" />
<!-- 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)--> <!-- 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)-->
<add key="StartBlowValue" value="4" /> <add key="StartBlowValue" value="4" />
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)--> <!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
<add key="StopBlowValue" value="4" /> <add key="StopBlowValue" value="4" />
<!--Server address--> <!--Server address-->
<add key="http.server" value="http://192.168.1.187/myproject/"/> <add key="http.server" value="" />
<!--<add key="http.server" value="http://192.168.1.187/myproject/" /> -->
<!--storeType--> <!--storeType-->
<add key="store_count" value="1" /> <add key="store_count" value="1" />
<!--start one store config--> <!--start one store config-->
...@@ -25,16 +27,16 @@ ...@@ -25,16 +27,16 @@
<!--摄像机名称列表配置,用#分割--> <!--摄像机名称列表配置,用#分割-->
<add key="CameraName" value="GigE:MV-CE100-30GC (00C69898477)" /> <add key="CameraName" value="GigE:MV-CE100-30GC (00C69898477)" />
<!--二维码类型列表配置,用#分割--> <!--二维码类型列表配置,用#分割-->
<add key="CodeType" value="Data Matrix ECC 200#QR Code" /> <add key="CodeType" value="QR Code" />
<!--<add key="CodeType" value="Data Matrix ECC 200"/>--> <!--<add key="CodeType" value="Data Matrix ECC 200#QR Code"/>-->
<!--二维码参数文件所在路径,文件名与二维码类型名一样--> <!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<add key="CodeParamPath" value="\CodeParam\" /> <add key="CodeParamPath" value="\CodeParam\" />
<add key="InOutDefaultPosition" value="10000" /> <add key="InOutDefaultPosition" value="10000" />
<add key="Config_Pwd" value="123456" /> <add key="Config_Pwd" value="123456" />
<!--批量上下料轴5000脉冲对应1mm--> <!--5000脉冲对应1mm-->
<add key="AxisChangeValue" value="5000" /> <add key="AxisChangeValue" value="5000" />
<!--压紧轴计量检测信号亮1次的脉冲值--> <!--压紧轴计量检测信号亮1次的脉冲值-->
<add key ="ComAxisChangeValue" value ="2400"/> <add key="ComAxisChangeValue" value="10000" />
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
...@@ -83,14 +83,10 @@ ...@@ -83,14 +83,10 @@
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblAxisStatus = new System.Windows.Forms.Label(); this.lblAxisStatus = new System.Windows.Forms.Label();
this.button3 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button();
this.axis_5_Alarm = new UserFromControl.IOStatusControl();
this.txtBatchTarget = new System.Windows.Forms.TextBox(); this.txtBatchTarget = new System.Windows.Forms.TextBox();
this.lblCountPulse5 = new System.Windows.Forms.TextBox(); this.lblCountPulse5 = new System.Windows.Forms.TextBox();
this.lblOutPulse5 = new System.Windows.Forms.TextBox(); this.lblOutPulse5 = new System.Windows.Forms.TextBox();
this.label20 = new System.Windows.Forms.Label(); this.label20 = new System.Windows.Forms.Label();
this.axis_1_Alarm = new UserFromControl.IOStatusControl();
this.axis_3_Alarm = new UserFromControl.IOStatusControl();
this.axis_2_Alarm = new UserFromControl.IOStatusControl();
this.label38 = new System.Windows.Forms.Label(); this.label38 = new System.Windows.Forms.Label();
this.txtMiddleTarget = new System.Windows.Forms.TextBox(); this.txtMiddleTarget = new System.Windows.Forms.TextBox();
this.txtInoutTarget = new System.Windows.Forms.TextBox(); this.txtInoutTarget = new System.Windows.Forms.TextBox();
...@@ -245,6 +241,10 @@ ...@@ -245,6 +241,10 @@
this.btnGetOutTray = new System.Windows.Forms.Button(); this.btnGetOutTray = new System.Windows.Forms.Button();
this.lblDoorStatus = new System.Windows.Forms.Label(); this.lblDoorStatus = new System.Windows.Forms.Label();
this.btnBatchInStore = new System.Windows.Forms.Button(); this.btnBatchInStore = new System.Windows.Forms.Button();
this.axis_5_Alarm = new UserFromControl.IOStatusControl();
this.axis_1_Alarm = new UserFromControl.IOStatusControl();
this.axis_3_Alarm = new UserFromControl.IOStatusControl();
this.axis_2_Alarm = new UserFromControl.IOStatusControl();
this.groupBox5.SuspendLayout(); this.groupBox5.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
...@@ -989,16 +989,6 @@ ...@@ -989,16 +989,6 @@
this.button3.UseVisualStyleBackColor = true; this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click); this.button3.Click += new System.EventHandler(this.button3_Click);
// //
// axis_5_Alarm
//
this.axis_5_Alarm.IOName = "";
this.axis_5_Alarm.IOValue = 0;
this.axis_5_Alarm.isCanClick = false;
this.axis_5_Alarm.Location = new System.Drawing.Point(418, 37);
this.axis_5_Alarm.Name = "axis_5_Alarm";
this.axis_5_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_5_Alarm.TabIndex = 271;
//
// txtBatchTarget // txtBatchTarget
// //
this.txtBatchTarget.Location = new System.Drawing.Point(395, 139); this.txtBatchTarget.Location = new System.Drawing.Point(395, 139);
...@@ -1033,36 +1023,6 @@ ...@@ -1033,36 +1023,6 @@
this.label20.TabIndex = 267; this.label20.TabIndex = 267;
this.label20.Text = "批量出入料轴"; this.label20.Text = "批量出入料轴";
// //
// axis_1_Alarm
//
this.axis_1_Alarm.IOName = "";
this.axis_1_Alarm.IOValue = 0;
this.axis_1_Alarm.isCanClick = false;
this.axis_1_Alarm.Location = new System.Drawing.Point(116, 37);
this.axis_1_Alarm.Name = "axis_1_Alarm";
this.axis_1_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_1_Alarm.TabIndex = 264;
//
// axis_3_Alarm
//
this.axis_3_Alarm.IOName = "";
this.axis_3_Alarm.IOValue = 0;
this.axis_3_Alarm.isCanClick = false;
this.axis_3_Alarm.Location = new System.Drawing.Point(318, 37);
this.axis_3_Alarm.Name = "axis_3_Alarm";
this.axis_3_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_3_Alarm.TabIndex = 266;
//
// axis_2_Alarm
//
this.axis_2_Alarm.IOName = "";
this.axis_2_Alarm.IOValue = 0;
this.axis_2_Alarm.isCanClick = false;
this.axis_2_Alarm.Location = new System.Drawing.Point(213, 37);
this.axis_2_Alarm.Name = "axis_2_Alarm";
this.axis_2_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_2_Alarm.TabIndex = 265;
//
// label38 // label38
// //
this.label38.AutoSize = true; this.label38.AutoSize = true;
...@@ -2643,7 +2603,6 @@ ...@@ -2643,7 +2603,6 @@
// //
// groupBox6 // groupBox6
// //
this.groupBox6.Controls.Add(this.lblOutInfo);
this.groupBox6.Controls.Add(this.lblBatchMsg); this.groupBox6.Controls.Add(this.lblBatchMsg);
this.groupBox6.Controls.Add(this.btnOpenDoor); this.groupBox6.Controls.Add(this.btnOpenDoor);
this.groupBox6.Controls.Add(this.lblWaitTragGo); this.groupBox6.Controls.Add(this.lblWaitTragGo);
...@@ -2655,6 +2614,7 @@ ...@@ -2655,6 +2614,7 @@
this.groupBox6.Controls.Add(this.btnGetOutTray); this.groupBox6.Controls.Add(this.btnGetOutTray);
this.groupBox6.Controls.Add(this.lblDoorStatus); this.groupBox6.Controls.Add(this.lblDoorStatus);
this.groupBox6.Controls.Add(this.btnBatchInStore); this.groupBox6.Controls.Add(this.btnBatchInStore);
this.groupBox6.Controls.Add(this.lblOutInfo);
this.groupBox6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox6.Location = new System.Drawing.Point(7, 124); this.groupBox6.Location = new System.Drawing.Point(7, 124);
this.groupBox6.Name = "groupBox6"; this.groupBox6.Name = "groupBox6";
...@@ -2665,14 +2625,14 @@ ...@@ -2665,14 +2625,14 @@
// //
// lblOutInfo // lblOutInfo
// //
this.lblOutInfo.AutoSize = true;
this.lblOutInfo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblOutInfo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblOutInfo.ForeColor = System.Drawing.Color.Green; this.lblOutInfo.ForeColor = System.Drawing.Color.Green;
this.lblOutInfo.Location = new System.Drawing.Point(127, 105); this.lblOutInfo.Location = new System.Drawing.Point(19, 105);
this.lblOutInfo.Name = "lblOutInfo"; this.lblOutInfo.Name = "lblOutInfo";
this.lblOutInfo.Size = new System.Drawing.Size(106, 22); this.lblOutInfo.Size = new System.Drawing.Size(446, 22);
this.lblOutInfo.TabIndex = 234; this.lblOutInfo.TabIndex = 234;
this.lblOutInfo.Text = "累积出库信息"; this.lblOutInfo.Text = "累积出库信息";
this.lblOutInfo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// lblBatchMsg // lblBatchMsg
// //
...@@ -2794,6 +2754,46 @@ ...@@ -2794,6 +2754,46 @@
this.btnBatchInStore.UseVisualStyleBackColor = true; this.btnBatchInStore.UseVisualStyleBackColor = true;
this.btnBatchInStore.Click += new System.EventHandler(this.btnBatchInStore_Click); this.btnBatchInStore.Click += new System.EventHandler(this.btnBatchInStore_Click);
// //
// axis_5_Alarm
//
this.axis_5_Alarm.IOName = "";
this.axis_5_Alarm.IOValue = 0;
this.axis_5_Alarm.isCanClick = false;
this.axis_5_Alarm.Location = new System.Drawing.Point(418, 37);
this.axis_5_Alarm.Name = "axis_5_Alarm";
this.axis_5_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_5_Alarm.TabIndex = 271;
//
// axis_1_Alarm
//
this.axis_1_Alarm.IOName = "";
this.axis_1_Alarm.IOValue = 0;
this.axis_1_Alarm.isCanClick = false;
this.axis_1_Alarm.Location = new System.Drawing.Point(116, 37);
this.axis_1_Alarm.Name = "axis_1_Alarm";
this.axis_1_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_1_Alarm.TabIndex = 264;
//
// axis_3_Alarm
//
this.axis_3_Alarm.IOName = "";
this.axis_3_Alarm.IOValue = 0;
this.axis_3_Alarm.isCanClick = false;
this.axis_3_Alarm.Location = new System.Drawing.Point(318, 37);
this.axis_3_Alarm.Name = "axis_3_Alarm";
this.axis_3_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_3_Alarm.TabIndex = 266;
//
// axis_2_Alarm
//
this.axis_2_Alarm.IOName = "";
this.axis_2_Alarm.IOValue = 0;
this.axis_2_Alarm.isCanClick = false;
this.axis_2_Alarm.Location = new System.Drawing.Point(213, 37);
this.axis_2_Alarm.Name = "axis_2_Alarm";
this.axis_2_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_2_Alarm.TabIndex = 265;
//
// FrmStoreBox // FrmStoreBox
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......
...@@ -313,10 +313,11 @@ namespace OnlineStore.AutoInOutStore ...@@ -313,10 +313,11 @@ namespace OnlineStore.AutoInOutStore
lblDoorStatus.Text = "仓门状态:打开"; lblDoorStatus.Text = "仓门状态:打开";
UpdateFormDoorStats(true); UpdateFormDoorStats(true);
} }
lblOutInfo.Visible = AutomaticBaiting.BatchOutStoreHeight>0;
lblOutInfo.Text = "累积出库: " + AutomaticBaiting.BatchOutStoreCount + "盘, 高" + AutomaticBaiting.BatchOutStoreHeight + "mm";
}
}
lblOutInfo.Visible = !lblWaitTragGo.Visible;
lblOutInfo.Text ="累积处理 入库:"+AutomaticBaiting.BatchInStoreCount+"盘共"+AutomaticBaiting.BatchInStoreHeight+"mm,"+
"出库: " + AutomaticBaiting.BatchOutStoreCount + "盘共" + AutomaticBaiting.BatchOutStoreHeight + "mm";
if (HumitureController.IsRun) if (HumitureController.IsRun)
{ {
btnSelTemp.Enabled = true; btnSelTemp.Enabled = true;
......
...@@ -79,6 +79,15 @@ X22_气压检测: ...@@ -79,6 +79,15 @@ X22_气压检测:
压紧轴改为同步返回数据模式,压紧轴增加计量检测功能。 压紧轴改为同步返回数据模式,压紧轴增加计量检测功能。
20121226
出库状态下,如果复位未开门锁,不能清理出库信息
出入库增加统计,增加气压检测功能。
出入库失败信息发个服务器
......
...@@ -45,102 +45,103 @@ AXIS,(轴三)进出轴,InOut_Axis,1,COM5,0,,,,, ...@@ -45,102 +45,103 @@ AXIS,(轴三)进出轴,InOut_Axis,1,COM5,0,,,,,
AXIS,(轴五)批量上下料轴,Batch_Axis,1,COM6,0,,,,, AXIS,(轴五)批量上下料轴,Batch_Axis,1,COM6,0,,,,,
,,,,,,,,,, ,,,,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,升降轴 仓门位置P7(人工拿走盘的位置),UpDownAxis_Door_P7,355000,,,,,,, PRO,升降轴 仓门位置P7(人工拿走盘的位置),UpDownAxis_Door_P7,355000,,,,,,,,,
PRO,升降轴 出库高点P2,UpDownAxis_OutHigh_P2,246000,,,,,,, PRO,升降轴 出库高点P2,UpDownAxis_OutHigh_P2,246000,,,,,,,,,
PRO,升降轴 出库低点P8,UpDownAxis_OutLow_P8,240000,,,,,,, PRO,升降轴 出库低点P8,UpDownAxis_OutLow_P8,236000,,,,,,,,,
PRO,升降轴 入库P1点集合,UpDownAxis_P1_List,8#403400;12#350000;,,,,,,, PRO,升降轴 入库P1点集合,UpDownAxis_P1_List,8#403400;12#350000;,,,,,,,,,
PRO,旋转轴(轴一)P1 待机原位点,MiddleAxis_P1_Position,263200,,,,,,, PRO,旋转轴(轴一)P1 待机原位点,MiddleAxis_P1_Position,263200,,,,,,,,,
PRO,进出轴(轴三)P1待机原位点,InOutAxis_P1_Position,1000,,,,,,, PRO,进出轴(轴三)P1待机原位点,InOutAxis_P1_Position,1000,,,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,-10000,,,,,,, PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,-10000,,,,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,, PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,, PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,, ,, PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,, ,,,,
PRO,设备是否调试状态(1=调试,0=正常),IsInDebug,0,,,,,,, PRO,设备是否调试状态(1=调试,0=正常),IsInDebug,1,,,,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,, PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,,, PRO,预警温度,WarnTemperate,80,,,,,,,,,
PRO,预警湿度,WarnHumidity,80,,,,,,, PRO,预警湿度,WarnHumidity,80,,,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,100,,,,,,, PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,100,,,,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,80,,,,,,, PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,80,,,,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,80,,,,,,, PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,80,,,,,,,,,
PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,80,,,,,,, PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,80,,,,,,,,,
PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,60,,,,,,, PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,60,,,,,,,,,
PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,50,,,,,,, PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,50,,,,,,,,,
PRO,(轴二)升降轴轴目标速度,UpdownAxis_TargetSpeed,150,,,,,,, PRO,(轴二)升降轴轴目标速度,UpdownAxis_TargetSpeed,150,,,,,,,,,
PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,40,,,,,,, PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,40,,,,,,,,,
PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,40,,,,,,, PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,40,,,,,,,,,
PRO,(轴二)升降轴轴原点低速度,UpdownAxis_HomeLowSpeed,10,,,,,,, PRO,(轴二)升降轴轴原点低速度,UpdownAxis_HomeLowSpeed,10,,,,,,,,,
PRO,(轴二)升降轴轴原点高速,UpdownAxis_HomeHighSpeed,20,,,,,,, PRO,(轴二)升降轴轴原点高速,UpdownAxis_HomeHighSpeed,20,,,,,,,,,
PRO,(轴二)升降轴轴原点加速度,UpdownAxis_HomeAddSpeed,20,,,,,,, PRO,(轴二)升降轴轴原点加速度,UpdownAxis_HomeAddSpeed,20,,,,,,,,,
PRO,(轴三)进出轴目标速度,InoutAxis_TargetSpeed,100,,,,,,, PRO,(轴三)进出轴目标速度,InoutAxis_TargetSpeed,100,,,,,,,,,
PRO,(轴三)进出轴加速度,InoutAxis_AddSpeed,30,,,,,,, PRO,(轴三)进出轴加速度,InoutAxis_AddSpeed,30,,,,,,,,,
PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,30,,,,,,, PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,30,,,,,,,,,
PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,20,,,,,,, PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,20,,,,,,,,,
PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,60,,,,,,, PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,60,,,,,,,,,
PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,20,,,,,,, PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,20,,,,,,,,,
PRO,升降轴(轴二)到仓门速度,UpDownAxis_Door_Speed,50,,,,,,, PRO,升降轴(轴二)到仓门速度,UpDownAxis_Door_Speed,50,,,,,,,,,
PRO,升降轴(轴二)P1速度,UpDownAxis_P1_Speed,250,,,,,,, PRO,升降轴(轴二)P1速度,UpDownAxis_P1_Speed,250,,,,,,,,,
PRO,升降轴(轴二)P2速度,UpDownAxis_P2_Speed,250,,,,,,, PRO,升降轴(轴二)P2速度,UpDownAxis_P2_Speed,250,,,,,,,,,
PRO,升降轴(轴二)P3速度,UpDownAxis_P3_Speed,250,,,,,,, PRO,升降轴(轴二)P3速度,UpDownAxis_P3_Speed,250,,,,,,,,,
PRO,升降轴(轴二)P4速度,UpDownAxis_P4_Speed,150,,,,,,, PRO,升降轴(轴二)P4速度,UpDownAxis_P4_Speed,150,,,,,,,,,
PRO,升降轴(轴二)P5速度,UpDownAxis_P5_Speed,250,,,,,,, PRO,升降轴(轴二)P5速度,UpDownAxis_P5_Speed,250,,,,,,,,,
PRO,升降轴(轴二)P6速度,UpDownAxis_P6_Speed,100,,,,,,, PRO,升降轴(轴二)P6速度,UpDownAxis_P6_Speed,100,,,,,,,,,
PRO,升降轴(轴二)到仓门P7速度,UpDownAxis_P7_Speed,100,,,,,,, PRO,升降轴(轴二)到仓门P7速度,UpDownAxis_P7_Speed,100,,,,,,,,,
PRO,升降轴(轴二)P8速度,UpDownAxis_P8_Speed,100,,,,,,, PRO,升降轴(轴二)P8速度,UpDownAxis_P8_Speed,100,,,,,,,,,
PRO,旋转轴(轴一)P1速度,MiddleAxis_P1_Speed,120,,,,,,, PRO,旋转轴(轴一)P1速度,MiddleAxis_P1_Speed,120,,,,,,,,,
PRO,旋转轴(轴一)P2速度,MiddleAxis_P2_Speed,120,,,,,,, PRO,旋转轴(轴一)P2速度,MiddleAxis_P2_Speed,120,,,,,,,,,
PRO,进出轴(轴三)P1速度,InOutAxis_P1_Speed,100,,,,,,, PRO,进出轴(轴三)P1速度,InOutAxis_P1_Speed,100,,,,,,,,,
PRO,进出轴(轴三)P2速度,InOutAxis_P2_Speed,100,,,,,,, PRO,进出轴(轴三)P2速度,InOutAxis_P2_Speed,100,,,,,,,,,
PRO,进出轴(轴三)P3速度,InOutAxis_P3_Speed,100,,,,,,, PRO,进出轴(轴三)P3速度,InOutAxis_P3_Speed,100,,,,,,,,,
PRO,(轴一)旋转轴最小误差脉冲值,MiddleAxis_ErrorCountMin,10,,,,,, , PRO,(轴一)旋转轴最小误差脉冲值,MiddleAxis_ErrorCountMin,10,,,,,, ,,,
PRO,(轴二)升降轴轴最小误差脉冲值,UpdownAxis_ErrorCountMin,10,,,,,,, PRO,(轴二)升降轴轴最小误差脉冲值,UpdownAxis_ErrorCountMin,10,,,,,,,,,
PRO,(轴三)进出轴最小误差脉冲值,InoutAxis_ErrorCountMin,10,,,,,,, PRO,(轴三)进出轴最小误差脉冲值,InoutAxis_ErrorCountMin,10,,,,,,,,,
PRO,(轴一)旋转轴最大误差脉冲值,MiddleAxis_ErrorCountMax,1000,,,,,,, PRO,(轴一)旋转轴最大误差脉冲值,MiddleAxis_ErrorCountMax,1000,,,,,,,,,
PRO,(轴二)升降轴轴最大误差脉冲值,UpdownAxis_ErrorCountMax,1000,,,,,,, PRO,(轴二)升降轴轴最大误差脉冲值,UpdownAxis_ErrorCountMax,1000,,,,,,,,,
PRO,(轴三)进出轴最大误差脉冲值,InoutAxis_ErrorCountMax,1000,,,,,,, PRO,(轴三)进出轴最大误差脉冲值,InoutAxis_ErrorCountMax,1000,,,,,,,,,
PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,, PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,, PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,, , PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,, ,,,
PRO,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,,, PRO,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,,,,,
PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,, PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,,,,
PRO,(轴二)升降轴最小限位,UpdownAxis_PositionMin,0,,,,,,, PRO,(轴二)升降轴最小限位,UpdownAxis_PositionMin,0,,,,,,,,,
PRO,(轴三)进出轴最小限位,InoutAxis_PositionMin,0,,,,,,, PRO,(轴三)进出轴最小限位,InoutAxis_PositionMin,0,,,,,,,,,
PRO,(轴一)旋转轴最大限位,MiddleAxis_PositionMax,0,,,,,,, PRO,(轴一)旋转轴最大限位,MiddleAxis_PositionMax,0,,,,,,,,,
PRO,(轴二)升降轴最大限位,UpdownAxis_PositionMax,0,,,,,,, PRO,(轴二)升降轴最大限位,UpdownAxis_PositionMax,0,,,,,,,,,
PRO,(轴三)进出轴最大限位,InoutAxis_PositionMax,0,,,,,,, PRO,(轴三)进出轴最大限位,InoutAxis_PositionMax,0,,,,,,,,,
PRO,需要吹气的温度(温度标准),Max_Temperature,0,,,,,, , PRO,需要吹气的温度(温度标准),Max_Temperature,0,,,,,, ,,,
PRO,需要吹气的湿度(湿度标准),Max_Humidity,10,,,,,,, PRO,需要吹气的湿度(湿度标准),Max_Humidity,10,,,,,,,,,
PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,, PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,, PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,,,
PRO,默认的料盘宽度(不可更改),Default_TrayWidth,7,,,,,,, PRO,默认的料盘宽度(不可更改),Default_TrayWidth,7,,,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM1,,,,,,, PRO,温湿度端口号,Humiture_Port,COM1,,,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM2,,,,,,, PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM2,,,,,,,,,
PRO,硕科步进电机(压紧轴)控制波特率,CompressAxis_PortBaudrate,9600,,,,,,, PRO,硕科步进电机(压紧轴)控制波特率,CompressAxis_PortBaudrate,9600,,,,,,,,,
PRO,硕科步进电机(压紧轴)控制奇偶校验,CompressAxis_PortParity,0,,,,,,, PRO,硕科步进电机(压紧轴)控制奇偶校验,CompressAxis_PortParity,0,,,,,,,,,
PRO,硕科步进电机(压紧轴)控制停止位,CompressAxis_StopBits,1,,,,,,, PRO,硕科步进电机(压紧轴)控制停止位,CompressAxis_StopBits,1,,,,,,,,,
PRO,硕科步进电机(压紧轴)控制初速度,CompressAxis_StartSpeed,5000,,,,,,, PRO,硕科步进电机(压紧轴)控制初速度,CompressAxis_StartSpeed,10000,,,,,,,,,
PRO,硕科步进电机(压紧轴)控制最大速度,CompressAxis_MaxSpeed,10000,,,,,,, PRO,硕科步进电机(压紧轴)控制最大速度,CompressAxis_MaxSpeed,20000,,,,,,,,,
PRO,硕科步进电机(压紧轴)控制末速度,CompressAxis_EndSpeed,8000,,,,,,, PRO,硕科步进电机(压紧轴)控制末速度,CompressAxis_EndSpeed,10000,,,,,,,,,
PRO,硕科步进电机(压紧轴)控制加速度,CompressAxis_AddSpeed,6000,,,,,,, PRO,硕科步进电机(压紧轴)控制加速度,CompressAxis_AddSpeed,10000,,,,,,,,,
PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,6000,,,,,,, PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,10000,,,,,,, ,,
PRO,硕科步进电机(压紧轴)原点返回速度,CompressAxis_HomeSpeed,6000,,,,,,, PRO,硕科步进电机(压紧轴)原点返回速度,CompressAxis_HomeSpeed,10000,,,,,,,,,
PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,, , PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,, ,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,300,,,,,,, PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,300,,,,,,,,,
PRO,(轴五)上料轴加速度,BatchAxis_AddSpeed,300,,,,,,, PRO,(轴五)上料轴加速度,BatchAxis_AddSpeed,300,,,,,,,,,
PRO,(轴五)上料轴减速度,BatchAxis_DelSpeed,300,,,,,,, PRO,(轴五)上料轴减速度,BatchAxis_DelSpeed,300,,,,,,,,,
PRO,(轴五)上料轴原点低速,BatchAxis_HomeLowSpeed,20,,,,,,, PRO,(轴五)上料轴原点低速,BatchAxis_HomeLowSpeed,20,,,,,,,,,
PRO,(轴五)上料轴原点高速,BatchAxis_HomeHighSpeed,60,,,,,,, PRO,(轴五)上料轴原点高速,BatchAxis_HomeHighSpeed,60,,,,,,,,,
PRO,(轴五)上料轴原点加速度,BatchAxis_HomeAddSpeed,300,,,,,,, PRO,(轴五)上料轴原点加速度,BatchAxis_HomeAddSpeed,300,,,,,,,,,
PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,1500000,,,,,, , PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,1800000,,,,,, ,,,
PRO,(轴五)上料轴最小误差脉冲值,BatchAxis_ErrorCountMin,10,,,,,,, PRO,(轴五)上料轴最小误差脉冲值,BatchAxis_ErrorCountMin,10,,,,,,,,,
PRO,(轴五)上料轴最大误差脉冲值,BatchAxis_ErrorCountMax,1000,,,,,,, PRO,(轴五)上料轴最大误差脉冲值,BatchAxis_ErrorCountMax,1000,,,,,,,,,
PRO,(轴五)上料轴最小限位,BatchAxis_PositionMin,0,,,,,,, PRO,(轴五)上料轴最小限位,BatchAxis_PositionMin,0,,,,,,,,,
PRO,(轴五)上料轴最大限位,BatchAxis_PositionMax,0,,,,,,, PRO,(轴五)上料轴最大限位,BatchAxis_PositionMax,0,,,,,,, ,,
PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,300,,,,,,, PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,300,,,,,,,,,
PRO,(轴五)上料轴出料时距离检测信号需要下降的高度,BatchAxis_OutDownPosition,3000,,,,,,, PRO,(轴五)上料轴出料时距离检测信号需要下降的高度,BatchAxis_OutDownPosition,50000,,,,,,,,,
PRO,(轴五)上料轴最最大料盘高度,到达后无法批量出库,BatchAxis_MaxHeight,100,,,,,,, PRO,(轴五)上料轴最最大料盘高度,到达后无法批量出库,BatchAxis_MaxHeight,340,,,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,192.168.202.11#16;192.168.200.12#4,,,,,, , ,,,,,,,,,,
PRO,模块对应的DO数量,IO_DOLength,192.168.202.11#16;192.168.200.12#4,,,,,,, PRO,IO模块对应的DI数量,IO_DILength,192.168.202.11#16;192.168.200.12#4,,,,,, ,,,
PRO,模块对应的DO数量,IO_DOLength,192.168.202.11#16;192.168.200.12#4,,,,,,,,,
...@@ -34,6 +34,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -34,6 +34,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
private Dictionary<string, AxisAlarmInfo> AxisAlarmCodeMap = new Dictionary<string, AxisAlarmInfo>(); private Dictionary<string, AxisAlarmInfo> AxisAlarmCodeMap = new Dictionary<string, AxisAlarmInfo>();
private IO_VALUE preAirValue = IO_VALUE.HIGH;
private bool IsHasCompress_Axis = true; private bool IsHasCompress_Axis = true;
public AC_SA_BoxBean(AUTO_SA_Config config) public AC_SA_BoxBean(AUTO_SA_Config config)
{ {
...@@ -112,11 +113,47 @@ namespace OnlineStore.DeviceLibrary ...@@ -112,11 +113,47 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
//气压检测,如果气压持续3秒没有信号,报气压报警
AirCheckProcess();
//光栅处理 //光栅处理
//SafetyLightProcess(); //SafetyLightProcess();
} }
} }
} }
private void AirCheckProcess()
{
IO_VALUE currAirValue = KND.IOValue(IO_Type.Airpressure_Check);
if (isInSuddenDown)
{
return;
}
if (currAirValue.Equals(IO_VALUE.LOW))
{
//判断是否持续了3秒
if (preAirValue.Equals(IO_VALUE.LOW) )
{
TimeSpan span = DateTime.Now - lastAirCloseTime;
if (span.TotalSeconds > Config.AirCheckSeconds)
{
WarnMsg = "未检测到气压信号";
preAirValue = IO_VALUE.LOW;
LogUtil.info("已持续【" + FormUtil.GetSpanStr(span) + "】未检测到气压信号,报警");
Alarm(StoreAlarmType.NoAirCheck, "2", WarnMsg, StoreMoveType.None);
return;
}
}
else
{
lastAirCloseTime = DateTime.Now;
isNoAirCheck = false;
}
}
else
{
isNoAirCheck = false;
}
preAirValue = currAirValue;
}
/// <summary> /// <summary>
/// 配置速度,加减速时间 /// 配置速度,加减速时间
/// </summary> /// </summary>
...@@ -700,7 +737,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -700,7 +737,7 @@ namespace OnlineStore.DeviceLibrary
storeRunStatus = StoreRunStatus.Wait; storeRunStatus = StoreRunStatus.Wait;
mainTimer.Enabled = false; mainTimer.Enabled = false;
AutomaticBaiting.StopRun();
KNDManager.CloseAllDO(); KNDManager.CloseAllDO();
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
...@@ -1357,7 +1394,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1357,7 +1394,7 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region 与服务器通信定时器,每1秒向服务器通知一次状态,同时执行出库操作 #region 与服务器通信定时器,每1秒向服务器通知一次状态,同时执行出库操作
private string CodeMsg = ""; public string CodeOrInoutMsg = "";
private bool isInProcess = false; private bool isInProcess = false;
private void server_connect_timer_Tick(object sender, EventArgs e) private void server_connect_timer_Tick(object sender, EventArgs e)
{ {
...@@ -1421,10 +1458,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -1421,10 +1458,10 @@ namespace OnlineStore.DeviceLibrary
} }
if (boxStatus.msg.Equals("")) if (boxStatus.msg.Equals(""))
{ {
boxStatus.msg = CodeMsg; boxStatus.msg = CodeOrInoutMsg;
lineOperation.msg = CodeMsg; lineOperation.msg = CodeOrInoutMsg;
} }
if (CodeMsg.Equals("")) if (CodeOrInoutMsg.Equals(""))
{ {
if (storeRunStatus.Equals(StoreRunStatus.Runing)&&AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing) if (storeRunStatus.Equals(StoreRunStatus.Runing)&&AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing)
&& KND.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) && KND.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
...@@ -1433,7 +1470,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1433,7 +1470,7 @@ namespace OnlineStore.DeviceLibrary
lineOperation.msg = "叉子料盘检测有料,请检查"; lineOperation.msg = "叉子料盘检测有料,请检查";
} }
} }
CodeMsg = ""; CodeOrInoutMsg = "";
//WarnMsg = ""; //WarnMsg = "";
//状态 //状态
boxStatus.status = (int)storeStatus; boxStatus.status = (int)storeStatus;
......
...@@ -38,6 +38,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -38,6 +38,7 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
int height = 8;
//加载位置 //加载位置
if (param.MoveP == null) if (param.MoveP == null)
{ {
...@@ -62,17 +63,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -62,17 +63,6 @@ namespace OnlineStore.DeviceLibrary
} }
p.UpDown_P1 = Config.GetUpDownP1(position.BagHeight); p.UpDown_P1 = Config.GetUpDownP1(position.BagHeight);
//p.UpDown_P8 = Config.UpDownAxis_DoorIBPosition_P8;
//p.UpDown_P2 = Config.UpDownAxis_DoorIPosition_P2;
//p.UpDown_P7 = Config.UpDownAxis_DoorOBPosition_P7;
//if (IsBatch)
//{
// p.UpDown_P1 = Config.GetUpDownP1(position.BagHeight);
//p.UpDown_P8 = p.UpDown_P1;
//p.UpDown_P2 = p.UpDown_P1;
//p.UpDown_P7 = p.UpDown_P1;
//}
p.ComPress_P2 = position.CompressAxis_Position_P2; p.ComPress_P2 = position.CompressAxis_Position_P2;
p.ComPress_P3 = position.CompressAxis_CPosition_P3; p.ComPress_P3 = position.CompressAxis_CPosition_P3;
p.InOut_P3 = position.InOutAxis_Position_P3; p.InOut_P3 = position.InOutAxis_Position_P3;
...@@ -82,9 +72,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -82,9 +72,7 @@ namespace OnlineStore.DeviceLibrary
p.UpDown_P5 = position.UpDownAxis_OHPosition_P5; p.UpDown_P5 = position.UpDownAxis_OHPosition_P5;
p.UpDown_P6 = position.UpDownAxis_OLPosition_P6; p.UpDown_P6 = position.UpDownAxis_OLPosition_P6;
//出库时批量上下料轴需要下降的高度 height = position.BagHeight;
p.BatchAxis_DownValue = AutomaticBaiting.AxisChangeValue * position.BagHeight;
LogUtil.debug("【" + position.PositionNum + "】高度【" + position.BagHeight + "】批量上下料轴需要下降【" + p.BatchAxis_DownValue + "】");
param.MoveP = p; param.MoveP = p;
return true; return true;
} }
...@@ -93,15 +81,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -93,15 +81,12 @@ namespace OnlineStore.DeviceLibrary
AutoStorePosition position = CSVPositionReader<AutoStorePosition>.GetPositon(param.PositionNum); AutoStorePosition position = CSVPositionReader<AutoStorePosition>.GetPositon(param.PositionNum);
if (position != null) if (position != null)
{ {
param.MoveP.BatchAxis_DownValue = AutomaticBaiting.AxisChangeValue * position.BagHeight; height = position.BagHeight;
LogUtil.debug("【" + position.PositionNum + "】高度【" + position.BagHeight + "】批量上下料轴需要下降【" + param.MoveP.BatchAxis_DownValue + "】");
}
else
{
param.MoveP.BatchAxis_DownValue = AutomaticBaiting.AxisChangeValue * 8;
LogUtil.debug("【" + position.PositionNum + "】高度【" + 8 + "】批量上下料轴需要下降【" + param.MoveP.BatchAxis_DownValue + "】");
} }
} }
//出库时批量上下料轴需要下降的高度
param.MoveP.BatchAxis_DownValue = AutomaticBaiting.AxisChangeValue * height + Config.BatchAxis_OutDownPosition;
LogUtil.debug("【" + param.PositionNum + "】高度【" + height + "】批量上下料轴需要下降【" + param.MoveP.BatchAxis_DownValue + "】");
return true; return true;
} }
...@@ -207,29 +192,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -207,29 +192,6 @@ namespace OnlineStore.DeviceLibrary
string msg = ""; string msg = "";
wait.IsEnd = ShuoKeIsEnd(wait, out msg); wait.IsEnd = ShuoKeIsEnd(wait, out msg);
NotOkMsg = NotOkMsg + " " + msg; NotOkMsg = NotOkMsg + " " + msg;
//ShuoKeInfo info = null;
//if (wait.IsHomeMove)
//{
// wait.IsEnd = ShuoKeControls.IsHomeMoveEnd(wait.SlvAddr, StoreMove.LastSetpTime, out info);
//}
//else
//{
// wait.IsEnd = ShuoKeControls.IsMoveEnd(wait.SlvAddr, StoreMove.LastSetpTime, out info);
//}
//if (!wait.IsEnd)
//{
// if (info == null)
// {
// NotOkMsg += "info=null;";
// }
// else
// {
// NotOkMsg += "" + info.ToShowStr();
// }
// ShuoKeControls.GetStatus(wait.SlvAddr);
//}
} }
if (wait.IsEnd) if (wait.IsEnd)
{ {
...@@ -325,19 +287,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -325,19 +287,22 @@ namespace OnlineStore.DeviceLibrary
string logMsg = IsBatchWork ? " 启动批量入库【" + posId + "】" : " 启动入库【" + posId + "】"; string logMsg = IsBatchWork ? " 启动批量入库【" + posId + "】" : " 启动入库【" + posId + "】";
if (!AutomaticBaiting.DoorCloseOK()) if (!AutomaticBaiting.DoorCloseOK())
{ {
LogUtil.error(LOGGER, StoreName + logMsg + " 出错,门锁未关闭"); UpdateInOutMsg(logMsg + "失败,门锁未关闭");
//LogUtil.error(LOGGER, StoreName + logMsg + " 出错,门锁未关闭");
return false; return false;
} }
if (storeRunStatus == StoreRunStatus.Runing) if (storeRunStatus == StoreRunStatus.Runing)
{ {
if (!LoadParamPosition(param, false)) if (!LoadParamPosition(param, false))
{ {
LogUtil.error(LOGGER, StoreName + logMsg + " 出错,找不到库位信息"); UpdateInOutMsg(logMsg + "失败,找不到库位信息");
//LogUtil.error(LOGGER, StoreName + logMsg + " 出错,找不到库位信息");
return false; return false;
} }
if (KND.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) if (KND.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{ {
LogUtil.error(LOGGER, StoreName + logMsg + " 出错,叉子料盘检测有料"); UpdateInOutMsg(logMsg + "失败,叉子料盘检测有料");
//LogUtil.error(LOGGER, StoreName + logMsg + " 出错,叉子料盘检测有料");
return false; return false;
} }
LogUtil.info(LOGGER, StoreName + logMsg); LogUtil.info(LOGGER, StoreName + logMsg);
...@@ -361,7 +326,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -361,7 +326,8 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogUtil.error(LOGGER, StoreName + " 启动【" + posId + "】入库出错,当前 storeStatus=" + storeRunStatus); UpdateInOutMsg(logMsg + "失败,当前状态:" + storeRunStatus);
//LogUtil.error(LOGGER, StoreName + " 启动【" + posId + "】入库出错,当前 storeStatus=" + storeRunStatus);
return false; return false;
} }
} }
...@@ -589,25 +555,29 @@ namespace OnlineStore.DeviceLibrary ...@@ -589,25 +555,29 @@ namespace OnlineStore.DeviceLibrary
string logMsg = IsBatchWork ? " 启动批量出库【" + posId + "】" : " 启动出库【" + posId + "】"; string logMsg = IsBatchWork ? " 启动批量出库【" + posId + "】" : " 启动出库【" + posId + "】";
if (!AutomaticBaiting.DoorCloseOK()) if (!AutomaticBaiting.DoorCloseOK())
{ {
LogUtil.error(LOGGER, StoreName + logMsg + " 出错,门锁未关闭"); UpdateInOutMsg(logMsg + "失败,门锁未关闭");
//LogUtil.error(LOGGER, StoreName + logMsg + " 出错,门锁未关闭");
return false; return false;
} }
if (storeRunStatus == StoreRunStatus.Runing) if (storeRunStatus == StoreRunStatus.Runing)
{ {
if (!LoadParamPosition(param, IsBatchWork)) if (!LoadParamPosition(param, IsBatchWork))
{ {
LogUtil.error(LOGGER, StoreName + logMsg + " 出错,找不到库位信息"); UpdateInOutMsg(logMsg + "失败,找不到库位信息");
//LogUtil.error(LOGGER, StoreName + logMsg + " 出错,找不到库位信息");
return false; return false;
} }
if (KND.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) if (KND.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{ {
LogUtil.error(LOGGER, StoreName + logMsg + " 出错,叉子料盘检测有料"); UpdateInOutMsg(logMsg + "失败,叉子料盘检测有料");
//LogUtil.error(LOGGER, StoreName + logMsg + " 出错,叉子料盘检测有料");
return false; return false;
} }
//若自动上料机构正在入库中,不可以出库 //若自动上料机构正在入库中,不可以出库
if (!AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing)) if (!AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing))
{ {
LogUtil.error(LOGGER, StoreName + logMsg + " 出错,批量上下料机构不在空闲中"); UpdateInOutMsg(logMsg + "失败,批量上下料机构不在空闲中");
//LogUtil.error(LOGGER, StoreName + logMsg + " 出错,批量上下料机构不在空闲中");
return false; return false;
} }
//判断批量上下料机构是否已经满 //判断批量上下料机构是否已经满
...@@ -616,7 +586,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -616,7 +586,8 @@ namespace OnlineStore.DeviceLibrary
int currBatchValue = ACServerManager.GetActualtPosition(Config.Batch_Axis.DeviceName, Config.Batch_Axis.GetAxisValue()); int currBatchValue = ACServerManager.GetActualtPosition(Config.Batch_Axis.DeviceName, Config.Batch_Axis.GetAxisValue());
if (currBatchValue - param.MoveP.BatchAxis_DownValue < 1000) if (currBatchValue - param.MoveP.BatchAxis_DownValue < 1000)
{ {
LogUtil.error(LOGGER, StoreName + logMsg + " 出错,批量上下料机构已满,请先拿出料盘"); UpdateInOutMsg(logMsg + "失败,批量上下料机构已满,请先拿出料盘");
//LogUtil.error(LOGGER, StoreName + logMsg + " 出错,批量上下料机构已满,请先拿出料盘");
return false; return false;
} }
} }
...@@ -624,7 +595,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -624,7 +595,8 @@ namespace OnlineStore.DeviceLibrary
if (AutomaticBaiting.BatchOutStoreHeight+ height > Config.BatchAxis_MaxHeight) if (AutomaticBaiting.BatchOutStoreHeight+ height > Config.BatchAxis_MaxHeight)
{ {
LogUtil.error(LOGGER, StoreName + logMsg + " 出错,当前高【"+ AutomaticBaiting.BatchOutStoreHeight + "】出库料盘高【"+ height + "】,最大高【"+ Config.BatchAxis_MaxHeight + "】"); LogUtil.error(LOGGER, StoreName + logMsg + " 出错,当前高【"+ AutomaticBaiting.BatchOutStoreHeight + "】出库料盘高【"+ height + "】,最大高【"+ Config.BatchAxis_MaxHeight + "】");
LogUtil.error(LOGGER, StoreName + logMsg + " 出错,批量上下料机构已满,请先拿出料盘"); UpdateInOutMsg(logMsg + "失败,批量上下料机构已满,请先拿出料盘");
//LogUtil.error(LOGGER, StoreName + logMsg + " 出错,批量上下料机构已满,请先拿出料盘");
return false; return false;
} }
...@@ -648,7 +620,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -648,7 +620,8 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogUtil.error(LOGGER, StoreName + logMsg+ "出错,当前storeStatus=" + storeRunStatus); UpdateInOutMsg(logMsg + "失败,当前状态:"+storeRunStatus);
//LogUtil.error(LOGGER, StoreName + logMsg+ "出错,当前storeStatus=" + storeRunStatus);
return false; return false;
} }
} }
...@@ -673,12 +646,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -673,12 +646,8 @@ namespace OnlineStore.DeviceLibrary
if (StoreMove.IsBatchInOutStore) if (StoreMove.IsBatchInOutStore)
{ {
//上下料机构下降的距离=料盘最低高度+默认的高度 //上下料机构下降的距离=料盘最低高度+默认的高度
int outDownPosition = StoreMove.MoveParam.MoveP.BatchAxis_DownValue+ Config.BatchAxis_OutDownPosition; int outDownPosition = StoreMove.MoveParam.MoveP.BatchAxis_DownValue;
//int outDownPosition = StoreMove.MoveParam.GetACPosition().BagHeight*AutomaticBaiting.AxisChangeValue * 2;
//if (outDownPosition < Config.BatchAxis_OutDownPosition)
//{
// outDownPosition = Config.BatchAxis_OutDownPosition;
//}
int targetValue = GetBatchTargetValue(outDownPosition); int targetValue = GetBatchTargetValue(outDownPosition);
if (targetValue >= 1000 ) if (targetValue >= 1000 )
{ {
...@@ -818,7 +787,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -818,7 +787,7 @@ namespace OnlineStore.DeviceLibrary
{ {
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : ""; string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
storeStatus = StoreStatus.StoreOnline; storeStatus = StoreStatus.StoreOnline;
LogUtil.info(LOGGER, "【" + posId + "】出库结束,耗时【" + FormUtil.GetSpanStr(InOutWatch.Elapsed) + "】累积出库: " + AutomaticBaiting.BatchOutStoreCount + "盘, 高" + AutomaticBaiting.BatchOutStoreHeight + "mm"); LogUtil.info(LOGGER, "【" + posId + "】出库结束,耗时【" + FormUtil.GetSpanStr(InOutWatch.Elapsed) + "】累积出库: " + AutomaticBaiting.BatchOutStoreCount + "盘" + AutomaticBaiting.BatchOutStoreHeight + "mm");
StoreMove.EndMove(); StoreMove.EndMove();
storeRunStatus = StoreRunStatus.Runing; storeRunStatus = StoreRunStatus.Runing;
InOutEndProcess(StoreMoveType.OutStore); InOutEndProcess(StoreMoveType.OutStore);
...@@ -912,6 +881,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -912,6 +881,11 @@ namespace OnlineStore.DeviceLibrary
} }
#endregion #endregion
public void UpdateInOutMsg(string Msg)
{
CodeOrInoutMsg = Msg;
LogUtil.error(Msg);
}
public bool InOutAxisCanMove() public bool InOutAxisCanMove()
{ {
if (StoreManager.Store.Config.IsHasLocationCylinder.Equals(0)) if (StoreManager.Store.Config.IsHasLocationCylinder.Equals(0))
......
...@@ -35,6 +35,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -35,6 +35,9 @@ namespace OnlineStore.DeviceLibrary
public static int BatchOutStoreCount = 0; public static int BatchOutStoreCount = 0;
public static int BatchOutStoreHeight = 0; public static int BatchOutStoreHeight = 0;
public static int BatchInStoreCount = 0;
public static int BatchInStoreHeight = 0;
/// <summary> /// <summary>
/// 初始化数据 /// 初始化数据
/// </summary> /// </summary>
...@@ -86,22 +89,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -86,22 +89,32 @@ namespace OnlineStore.DeviceLibrary
return msg; return msg;
} }
public static void ClearOutStoreInfo()
private static void ClearInOutInfo()
{ {
BatchOutStoreCount = 0; BatchOutStoreCount = 0;
BatchOutStoreHeight = 0; BatchOutStoreHeight = 0;
BatchInStoreCount = 0;
BatchInStoreHeight = 0;
}
private static void ClearInStoreInfo()
{
LastCode = ""; LastCode = "";
LastPosId = ""; LastPosId = "";
LastHeight = 0; LastHeight = 0;
LastSize = 0; LastSize = 0;
} }
public static void StopRun()
{
KND.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
ClearInStoreInfo();
ClearOutStoreInfo();
}
public static void StopMove() public static void StopMove()
{ {
StoreMove.EndMove(); StoreMove.EndMove();
ClearInOutInfo(); ClearInStoreInfo();
KND.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW); KND.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
CylinderMove(IO_Type.SuckingDisc_Up, IO_Type.SuckingDisc_Down, false); CylinderMove(IO_Type.SuckingDisc_Up, IO_Type.SuckingDisc_Down, false);
BatchDoorClose(false); BatchDoorClose(false);
...@@ -127,7 +140,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -127,7 +140,7 @@ namespace OnlineStore.DeviceLibrary
StopMove(); StopMove();
} }
WarnMsg = ""; WarnMsg = "";
ClearInOutInfo(); ClearInStoreInfo();
DoorStatus = 2; DoorStatus = 2;
AutoBaitingStatus = StoreRunStatus.Reset; AutoBaitingStatus = StoreRunStatus.Reset;
StoreMove.NewMove(StoreMoveType.StoreReset); StoreMove.NewMove(StoreMoveType.StoreReset);
...@@ -318,14 +331,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -318,14 +331,10 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I08_GetPosId); StoreMove.NextMoveStep(StoreMoveStep.AUTO_I08_GetPosId);
//计算高度
EndMovePosition = ACServerManager.GetActualtPosition(StoreManager.Config.Batch_Axis.DeviceName, StoreManager.Config.Batch_Axis.GetAxisValue());
LastHeight = Math.Abs(EndMovePosition - StartMovePosition) / AxisChangeValue;
LogUtil.info(Name + "入料: 计算高度:上升前位置【" + StartMovePosition + "】实时位置【" + EndMovePosition + "】,计算后高度【" + LastHeight + "】");
if (LastHeight > 12) { LastHeight = 24; }
else if (LastHeight >= 8) { LastHeight = 12; }
else if (LastHeight > 0) { LastHeight = 8; }
LastSize = StoreManager.Config.Default_TrayWidth; LastSize = StoreManager.Config.Default_TrayWidth;
LastHeight = GetHeight();
BatchInStoreCount++;
BatchInStoreHeight += LastHeight;
LogUtil.info(Name + "入料: 从服务器获取入库PosId,尺寸:【" + LastSize + "*" + LastHeight + "】二维码【" + LastCode + "】"); LogUtil.info(Name + "入料: 从服务器获取入库PosId,尺寸:【" + LastSize + "*" + LastHeight + "】二维码【" + LastCode + "】");
GetInStorePosId(ProcessMsg()); GetInStorePosId(ProcessMsg());
...@@ -376,6 +385,29 @@ namespace OnlineStore.DeviceLibrary ...@@ -376,6 +385,29 @@ namespace OnlineStore.DeviceLibrary
} }
} }
private static int GetHeight()
{
//计算高度
EndMovePosition = ACServerManager.GetActualtPosition(StoreManager.Config.Batch_Axis.DeviceName, StoreManager.Config.Batch_Axis.GetAxisValue());
LastHeight = (int)Math.Ceiling(1F * (EndMovePosition - StartMovePosition) / AxisChangeValue);
LogUtil.info(Name + "入料: 计算盘高:上升前【" + StartMovePosition + "】实时【" + EndMovePosition + "】计算后高度【" + LastHeight + "】");
if (StoreManager.Config.Default_TrayWidth.Equals(7))
{
if (LastHeight <= 8) { LastHeight = 8; }
else if (LastHeight <= 12) { LastHeight = 12; }
else { LastHeight = 24; }
}
else
{
if (LastHeight <= 8) { LastHeight = 8; }
else
{
LastHeight = (int)Math.Ceiling(1F * LastHeight / 4) * 4;
}
}
return LastHeight;
}
private static void SendTrayOut() private static void SendTrayOut()
{ {
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I10_WaitTrayGo); StoreMove.NextMoveStep(StoreMoveStep.AUTO_I10_WaitTrayGo);
...@@ -470,7 +502,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -470,7 +502,8 @@ namespace OnlineStore.DeviceLibrary
} }
public static void BatchDoorOpen(bool isWait) public static void BatchDoorOpen(bool isWait)
{ {
ClearInOutInfo(); ClearInStoreInfo();
ClearOutStoreInfo();
DoorStatus = 1; DoorStatus = 1;
KND.IOMove(IO_Type.BatchDoor_Close, IO_VALUE.LOW); KND.IOMove(IO_Type.BatchDoor_Close, IO_VALUE.LOW);
KND.IOMove(IO_Type.BatchDoor_Open, IO_VALUE.HIGH); KND.IOMove(IO_Type.BatchDoor_Open, IO_VALUE.HIGH);
...@@ -483,7 +516,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -483,7 +516,8 @@ namespace OnlineStore.DeviceLibrary
public static void BatchDoorClose(bool isWait) public static void BatchDoorClose(bool isWait)
{ {
ClearInOutInfo(); ClearInStoreInfo();
ClearOutStoreInfo();
DoorStatus = 2; DoorStatus = 2;
if (isWait) if (isWait)
{ {
......
...@@ -299,6 +299,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -299,6 +299,7 @@ namespace OnlineStore.DeviceLibrary
} }
if (LastCode.Equals("")) if (LastCode.Equals(""))
{ {
StoreManager.Store.CodeOrInoutMsg = "未扫到二维码,需要将料盘送出";
LogUtil.error("未扫到二维码,需要将料盘送出"); LogUtil.error("未扫到二维码,需要将料盘送出");
} }
else else
...@@ -444,5 +445,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -444,5 +445,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + ex.StackTrace); LogUtil.error(Name + ex.StackTrace);
} }
} }
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!