Commit 733ba004 刘韬

优化工单切换逻辑

1 个父辈 05c38db6
正在显示 37 个修改的文件 包含 818 行增加308 行删除
...@@ -236,5 +236,6 @@ namespace OnlineStore.Common ...@@ -236,5 +236,6 @@ namespace OnlineStore.Common
/// 真实料架号,可能为空 /// 真实料架号,可能为空
/// </summary> /// </summary>
public static string realRfid = "realRfid"; public static string realRfid = "realRfid";
public static string singleOut = "singleOut";
} }
} }
...@@ -96,6 +96,7 @@ namespace OnlineStore.Common ...@@ -96,6 +96,7 @@ namespace OnlineStore.Common
{ {
//LogUtil.info("【"+url+"】发送【" + json + "】收到【" + result + "】"); //LogUtil.info("【"+url+"】发送【" + json + "】收到【" + result + "】");
} }
LogUtil.OutputDebugString("【" + url + "】发送【" + json + "】收到【" + result + "】");
return reOP; return reOP;
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -100,7 +100,7 @@ namespace OnlineStore.Common ...@@ -100,7 +100,7 @@ namespace OnlineStore.Common
public static HumitureParam QueryData(string port) public static HumitureParam QueryData(string port)
{ {
HumitureParam param = new HumitureParam(0, 0); HumitureParam param = new HumitureParam(0, 0);
List<double> data = queryData(port ); List<double> data = queryData(port);
if (data.Count.Equals(2)) if (data.Count.Equals(2))
{ {
param = new HumitureParam(data[1], data[0]); param = new HumitureParam(data[1], data[0]);
......
...@@ -199,6 +199,7 @@ namespace OnlineStore.Common ...@@ -199,6 +199,7 @@ namespace OnlineStore.Common
{ {
info(LOGGER, msg); info(LOGGER, msg);
} }
[System.Runtime.InteropServices.DllImport("kernel32.dll", CharSet = System.Runtime.InteropServices.CharSet.Auto)]
public static extern void OutputDebugString(string message);
} }
} }
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<ApplicationIcon>box.ico</ApplicationIcon> <ApplicationIcon>box.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Agv, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Reference Include="CodeLibrary, Version=1.0.7380.18241, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="CodeLibrary, Version=1.0.7380.18241, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath> <HintPath>..\..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath>
...@@ -181,6 +182,7 @@ ...@@ -181,6 +182,7 @@
<EmbeddedResource Include="useControl\AxisMoveControl.resx"> <EmbeddedResource Include="useControl\AxisMoveControl.resx">
<DependentUpon>AxisMoveControl.cs</DependentUpon> <DependentUpon>AxisMoveControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<None Include="DUOStore.exe.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
......
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
</configSections>
<appSettings>
<!--是否开机自动启动料仓-->
<add key="App_AutoRun" value="1" />
<add key="App_Title" value="DUO料仓" />
<!-- 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)-->
<add key="StartBlowValue" value="4" />
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
<add key="StopBlowValue" value="4" />
<!--Server address-->
<add key="http.server" value="http://10.21.69.201/smdbox/" />
<!--storeType-->
<add key="store_count" value="2" />
<add key="Store_ConfigPath" value="\StoreConfig\StoreConfig.csv" />
<!--start one store config-->
<add key="Store_Position_Config" value="\StoreConfig\linePositions.csv" />
<add key="BOX_ConfigPath" value="\StoreConfig\BoxConfig.csv" />
<add key="Store_Type" value="RC_AC_PA" />
<add key="Store_CID" value="duo-store" />
<add key="Store_CID_1" value="duo-1" />
<add key="Store_CID_2" value="duo-2" />
<add key="Store_CID_1_disabled" value="0" />
<add key="Store_CID_2_disabled" value="0" />
<!--end one store config-->
<add key="ACBaudRate" value="115200" />
<add key="Config_Pwd" value="123456" />
<!--二维码类型列表配置,用#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code-->
<add key="CodeType" value="QR Code#Data Matrix ECC 200" />
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<add key="CodeParamPath" value="\CodeParam\" />
<!--出库等待料盘拿走的时间,秒-->
<add key="OutStoreWaitSeconds" value="1" />
<!--温控器类型,0=壁挂王字壳温湿度变送器,1=妙昕温湿度记录仪-->
<add key="HumitureControllerType" value="0" />
<add key="UseBuzzer" value="0" />
<!--IO模块是否主动上传-->
<add key="AIOAutoUpload" value="0" />
<add key="CodeCount" value="3" />
<add key="Tool_P3_Offset" value="70" />
<add key="Tool_P4_Offset" value="-20" />
<add key="Tool_P5_Offset" value="-20" />
<add key="Tool_P6_Offset" value="70" />
<add key="Tool_TargetSpeed" value="20" />
<add key="Tool_TargetPosition" value="10420" />
<add key="Agv_Log_Open" value="1" />
<!--进出轴位置-->
<add key="InOutDefaultPosition" value="300000" />
<!--当前料架信息-料架号-->
<add key="CurrShelfNum" value="B2" />
<!--当前料架信息-料架类型,0=空料架,1=入库料架,2=出库料架-->
<add key="CurrShelfType" value="-1" />
<add key="LastOutShelfType" value="1" />
<add key="HasT4Axis" value="false" />
<add key="AgvServerIp" value="10.21.69.52" />
<add key="AgvServerPort" value="9501" />
<add key="code_block_size_list" value="13,17" />
<add key="InstoreEndSendShelf" value="1" />
<add key="OutstoreEndSendShelf" value="1" />
</appSettings>
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="logs/duoStore.log" />
<param name="Encoding" value="UTF-8" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" />
</layout>
</appender>
<appender name="Rmaxis" type="log4net.Appender.RollingFileAppender">
<file value="logs/Rmaxis.log" />
<param name="Encoding" value="UTF-8" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" />
</layout>
</appender>
<appender name="AIOBOX" type="log4net.Appender.RollingFileAppender">
<file value="logs/aio/AIOBOX.log" />
<param name="Encoding" value="UTF-8" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" />
</layout>
</appender>
<appender name="HCBOARD" type="log4net.Appender.RollingFileAppender">
<file value="logs/HCBOARD.log" />
<param name="Encoding" value="UTF-8" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t] %m%n" />
</layout>
</appender>
<appender name="AgvClient" type="log4net.Appender.RollingFileAppender">
<file value="logs/AgvClient.log" />
<param name="Encoding" value="UTF-8" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t] %m%n" />
</layout>
</appender>
<appender name="TheRFID" type="log4net.Appender.RollingFileAppender">
<file value="logs/TheRFID.log" />
<param name="Encoding" value="UTF-8" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t] %m%n" />
</layout>
</appender>
<logger name="RollingLogFileAppender" additivity="false">
<level value="Info" />
<appender-ref ref="RollingLogFileAppender" />
</logger>
<logger name="AIOBOX" additivity="false">
<level value="Info" />
<appender-ref ref="AIOBOX" />
</logger>
<logger name="Rmaxis" additivity="false">
<level value="ALL" />
<appender-ref ref="Rmaxis" />
</logger>
<logger name="HCBOARD" additivity="false">
<level value="ALL" />
<appender-ref ref="HCBOARD" />
</logger>
<logger name="Agv">
<level value="ALL" />
<appender-ref ref="Agv" />
</logger>
<logger name="TheRFID">
<level value="ALL" />
<appender-ref ref="TheRFID" />
</logger>
<!--
<root>
<level value="All" />
<appender-ref ref="RollingLogFileAppender" />
</root>-->
</log4net>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" />
<codeBase version="2.0.8.0" href="log4netv2.0.8.0\log4net.dll" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
\ No newline at end of file \ No newline at end of file
...@@ -37,6 +37,7 @@ namespace OnlineStore.DUOStore ...@@ -37,6 +37,7 @@ namespace OnlineStore.DUOStore
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage4 = new System.Windows.Forms.TabPage(); this.tabPage4 = new System.Windows.Forms.TabPage();
this.groupInout = new System.Windows.Forms.GroupBox(); this.groupInout = new System.Windows.Forms.GroupBox();
this.cmbHight = new System.Windows.Forms.ComboBox();
this.btnNgPro = new System.Windows.Forms.Button(); this.btnNgPro = new System.Windows.Forms.Button();
this.btnAxisP = new System.Windows.Forms.Button(); this.btnAxisP = new System.Windows.Forms.Button();
this.btnSingleOut = new System.Windows.Forms.Button(); this.btnSingleOut = new System.Windows.Forms.Button();
...@@ -111,7 +112,7 @@ namespace OnlineStore.DUOStore ...@@ -111,7 +112,7 @@ namespace OnlineStore.DUOStore
this.lblWarnMsg = new System.Windows.Forms.Label(); this.lblWarnMsg = new System.Windows.Forms.Label();
this.lblThisSta = new System.Windows.Forms.Label(); this.lblThisSta = new System.Windows.Forms.Label();
this.chbDisable = new System.Windows.Forms.CheckBox(); this.chbDisable = new System.Windows.Forms.CheckBox();
this.cmbHight = new System.Windows.Forms.ComboBox(); this.btn_clearTimeout = new System.Windows.Forms.Button();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
...@@ -284,6 +285,7 @@ namespace OnlineStore.DUOStore ...@@ -284,6 +285,7 @@ namespace OnlineStore.DUOStore
this.groupInout.Controls.Add(this.btnUpdownP11); this.groupInout.Controls.Add(this.btnUpdownP11);
this.groupInout.Controls.Add(this.btnMiddleP11); this.groupInout.Controls.Add(this.btnMiddleP11);
this.groupInout.Controls.Add(this.lblMsg); this.groupInout.Controls.Add(this.lblMsg);
this.groupInout.Controls.Add(this.btn_clearTimeout);
this.groupInout.Controls.Add(this.btnSavePosition); this.groupInout.Controls.Add(this.btnSavePosition);
this.groupInout.Controls.Add(this.btnStartAuTo); this.groupInout.Controls.Add(this.btnStartAuTo);
this.groupInout.Controls.Add(this.label9); this.groupInout.Controls.Add(this.label9);
...@@ -299,6 +301,22 @@ namespace OnlineStore.DUOStore ...@@ -299,6 +301,22 @@ namespace OnlineStore.DUOStore
this.groupInout.TabStop = false; this.groupInout.TabStop = false;
this.groupInout.Text = "料仓操作"; this.groupInout.Text = "料仓操作";
// //
// cmbHight
//
this.cmbHight.FormattingEnabled = true;
this.cmbHight.Items.AddRange(new object[] {
"8",
"12",
"16",
"24",
"32",
"56"});
this.cmbHight.Location = new System.Drawing.Point(252, 25);
this.cmbHight.Name = "cmbHight";
this.cmbHight.Size = new System.Drawing.Size(88, 28);
this.cmbHight.TabIndex = 311;
this.cmbHight.Text = "8";
//
// btnNgPro // btnNgPro
// //
this.btnNgPro.BackColor = System.Drawing.Color.White; this.btnNgPro.BackColor = System.Drawing.Color.White;
...@@ -1347,21 +1365,18 @@ namespace OnlineStore.DUOStore ...@@ -1347,21 +1365,18 @@ namespace OnlineStore.DUOStore
this.chbDisable.UseVisualStyleBackColor = true; this.chbDisable.UseVisualStyleBackColor = true;
this.chbDisable.CheckedChanged += new System.EventHandler(this.chbDisable_CheckedChanged); this.chbDisable.CheckedChanged += new System.EventHandler(this.chbDisable_CheckedChanged);
// //
// cmbHight // btn_clearTimeout
// //
this.cmbHight.FormattingEnabled = true; this.btn_clearTimeout.BackColor = System.Drawing.Color.White;
this.cmbHight.Items.AddRange(new object[] { this.btn_clearTimeout.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
"8", this.btn_clearTimeout.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
"12", this.btn_clearTimeout.Location = new System.Drawing.Point(898, 21);
"16", this.btn_clearTimeout.Name = "btn_clearTimeout";
"24", this.btn_clearTimeout.Size = new System.Drawing.Size(128, 39);
"32", this.btn_clearTimeout.TabIndex = 217;
"56"}); this.btn_clearTimeout.Text = "清除等待超时";
this.cmbHight.Location = new System.Drawing.Point(252, 25); this.btn_clearTimeout.UseVisualStyleBackColor = false;
this.cmbHight.Name = "cmbHight"; this.btn_clearTimeout.Click += new System.EventHandler(this.btn_clearTimeout_Click);
this.cmbHight.Size = new System.Drawing.Size(88, 28);
this.cmbHight.TabIndex = 311;
this.cmbHight.Text = "8";
// //
// FrmBox // FrmBox
// //
...@@ -1489,6 +1504,7 @@ namespace OnlineStore.DUOStore ...@@ -1489,6 +1504,7 @@ namespace OnlineStore.DUOStore
private System.Windows.Forms.Label lblCanOut; private System.Windows.Forms.Label lblCanOut;
private System.Windows.Forms.CheckBox chbDisable; private System.Windows.Forms.CheckBox chbDisable;
private System.Windows.Forms.ComboBox cmbHight; private System.Windows.Forms.ComboBox cmbHight;
private System.Windows.Forms.Button btn_clearTimeout;
} }
} }
...@@ -838,5 +838,11 @@ namespace OnlineStore.DUOStore ...@@ -838,5 +838,11 @@ namespace OnlineStore.DUOStore
ConfigAppSettings.SaveValue("Store_CID_" + BoxBean.ID + "_disabled", chbDisable.Checked ? 1 : 0); ConfigAppSettings.SaveValue("Store_CID_" + BoxBean.ID + "_disabled", chbDisable.Checked ? 1 : 0);
} }
private void btn_clearTimeout_Click(object sender, EventArgs e)
{
if (BoxBean.alarmType == AlarmType.IoSingleTimeOut)
BoxBean.MoveInfo.EndStepWait();
}
} }
} }
...@@ -335,13 +335,13 @@ namespace OnlineStore.DUOStore ...@@ -335,13 +335,13 @@ namespace OnlineStore.DUOStore
private void btnLineRun_Click(object sender, EventArgs e) private void btnLineRun_Click(object sender, EventArgs e)
{ {
StoreManager.Store.LineRun(null); StoreManager.Store.LineRun(null, "btnLineRun_Click");
} }
private void btnLineStop_Click(object sender, EventArgs e) private void btnLineStop_Click(object sender, EventArgs e)
{ {
StoreManager.Store.LineStop(null); StoreManager.Store.LineStop(null, "btnLineStop_Click");
} }
private void groupBox1_Enter(object sender, EventArgs e) private void groupBox1_Enter(object sender, EventArgs e)
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
this.pictureBox2 = new System.Windows.Forms.PictureBox(); this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.btn_ClearMission = new System.Windows.Forms.Button();
this.BTN_ReleaseShelf = new System.Windows.Forms.Button(); this.BTN_ReleaseShelf = new System.Windows.Forms.Button();
this.chbInstoreEnd = new System.Windows.Forms.CheckBox(); this.chbInstoreEnd = new System.Windows.Forms.CheckBox();
this.chkDebug = new System.Windows.Forms.CheckBox(); this.chkDebug = new System.Windows.Forms.CheckBox();
...@@ -42,6 +43,7 @@ ...@@ -42,6 +43,7 @@
this.chbAutoRun = new System.Windows.Forms.CheckBox(); this.chbAutoRun = new System.Windows.Forms.CheckBox();
this.btnCopyLog = new System.Windows.Forms.Button(); this.btnCopyLog = new System.Windows.Forms.Button();
this.btnClearLog = new System.Windows.Forms.Button(); this.btnClearLog = new System.Windows.Forms.Button();
this.lblMission = new System.Windows.Forms.Label();
this.lblShelf = new System.Windows.Forms.Label(); this.lblShelf = new System.Windows.Forms.Label();
this.chbUseBuzzer = new System.Windows.Forms.CheckBox(); this.chbUseBuzzer = new System.Windows.Forms.CheckBox();
this.chbOutstoreEnd = new System.Windows.Forms.CheckBox(); this.chbOutstoreEnd = new System.Windows.Forms.CheckBox();
...@@ -76,6 +78,7 @@ ...@@ -76,6 +78,7 @@
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.lblAgv = new System.Windows.Forms.Label();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
...@@ -139,6 +142,7 @@ ...@@ -139,6 +142,7 @@
// //
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.panel1.Controls.Add(this.btn_ClearMission);
this.panel1.Controls.Add(this.BTN_ReleaseShelf); this.panel1.Controls.Add(this.BTN_ReleaseShelf);
this.panel1.Controls.Add(this.chbInstoreEnd); this.panel1.Controls.Add(this.chbInstoreEnd);
this.panel1.Controls.Add(this.chkDebug); this.panel1.Controls.Add(this.chkDebug);
...@@ -146,6 +150,8 @@ ...@@ -146,6 +150,8 @@
this.panel1.Controls.Add(this.chbAutoRun); this.panel1.Controls.Add(this.chbAutoRun);
this.panel1.Controls.Add(this.btnCopyLog); this.panel1.Controls.Add(this.btnCopyLog);
this.panel1.Controls.Add(this.btnClearLog); this.panel1.Controls.Add(this.btnClearLog);
this.panel1.Controls.Add(this.lblAgv);
this.panel1.Controls.Add(this.lblMission);
this.panel1.Controls.Add(this.lblShelf); this.panel1.Controls.Add(this.lblShelf);
this.panel1.Controls.Add(this.chbUseBuzzer); this.panel1.Controls.Add(this.chbUseBuzzer);
this.panel1.Controls.Add(this.chbOutstoreEnd); this.panel1.Controls.Add(this.chbOutstoreEnd);
...@@ -154,12 +160,25 @@ ...@@ -154,12 +160,25 @@
this.panel1.Size = new System.Drawing.Size(182, 623); this.panel1.Size = new System.Drawing.Size(182, 623);
this.panel1.TabIndex = 271; this.panel1.TabIndex = 271;
// //
// btn_ClearMission
//
this.btn_ClearMission.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btn_ClearMission.BackColor = System.Drawing.Color.White;
this.btn_ClearMission.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_ClearMission.Location = new System.Drawing.Point(12, 465);
this.btn_ClearMission.Name = "btn_ClearMission";
this.btn_ClearMission.Size = new System.Drawing.Size(140, 35);
this.btn_ClearMission.TabIndex = 272;
this.btn_ClearMission.Text = "释放需求单绑定";
this.btn_ClearMission.UseVisualStyleBackColor = false;
this.btn_ClearMission.Click += new System.EventHandler(this.btn_ClearMission_Click);
//
// BTN_ReleaseShelf // BTN_ReleaseShelf
// //
this.BTN_ReleaseShelf.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.BTN_ReleaseShelf.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.BTN_ReleaseShelf.BackColor = System.Drawing.Color.White; this.BTN_ReleaseShelf.BackColor = System.Drawing.Color.White;
this.BTN_ReleaseShelf.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.BTN_ReleaseShelf.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.BTN_ReleaseShelf.Location = new System.Drawing.Point(12, 366); this.BTN_ReleaseShelf.Location = new System.Drawing.Point(12, 401);
this.BTN_ReleaseShelf.Name = "BTN_ReleaseShelf"; this.BTN_ReleaseShelf.Name = "BTN_ReleaseShelf";
this.BTN_ReleaseShelf.Size = new System.Drawing.Size(140, 35); this.BTN_ReleaseShelf.Size = new System.Drawing.Size(140, 35);
this.BTN_ReleaseShelf.TabIndex = 272; this.BTN_ReleaseShelf.TabIndex = 272;
...@@ -171,7 +190,7 @@ ...@@ -171,7 +190,7 @@
// //
this.chbInstoreEnd.AutoSize = true; this.chbInstoreEnd.AutoSize = true;
this.chbInstoreEnd.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbInstoreEnd.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbInstoreEnd.Location = new System.Drawing.Point(12, 241); this.chbInstoreEnd.Location = new System.Drawing.Point(12, 303);
this.chbInstoreEnd.Name = "chbInstoreEnd"; this.chbInstoreEnd.Name = "chbInstoreEnd";
this.chbInstoreEnd.Size = new System.Drawing.Size(140, 24); this.chbInstoreEnd.Size = new System.Drawing.Size(140, 24);
this.chbInstoreEnd.TabIndex = 271; this.chbInstoreEnd.TabIndex = 271;
...@@ -183,7 +202,7 @@ ...@@ -183,7 +202,7 @@
// //
this.chkDebug.AutoSize = true; this.chkDebug.AutoSize = true;
this.chkDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chkDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chkDebug.Location = new System.Drawing.Point(12, 205); this.chkDebug.Location = new System.Drawing.Point(12, 267);
this.chkDebug.Name = "chkDebug"; this.chkDebug.Name = "chkDebug";
this.chkDebug.Size = new System.Drawing.Size(132, 24); this.chkDebug.Size = new System.Drawing.Size(132, 24);
this.chkDebug.TabIndex = 194; this.chkDebug.TabIndex = 194;
...@@ -195,7 +214,7 @@ ...@@ -195,7 +214,7 @@
// //
this.lblMoveInfo.AutoSize = true; this.lblMoveInfo.AutoSize = true;
this.lblMoveInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblMoveInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMoveInfo.Location = new System.Drawing.Point(12, 41); this.lblMoveInfo.Location = new System.Drawing.Point(3, 41);
this.lblMoveInfo.Name = "lblMoveInfo"; this.lblMoveInfo.Name = "lblMoveInfo";
this.lblMoveInfo.Size = new System.Drawing.Size(56, 17); this.lblMoveInfo.Size = new System.Drawing.Size(56, 17);
this.lblMoveInfo.TabIndex = 270; this.lblMoveInfo.TabIndex = 270;
...@@ -205,7 +224,7 @@ ...@@ -205,7 +224,7 @@
// //
this.chbAutoRun.AutoSize = true; this.chbAutoRun.AutoSize = true;
this.chbAutoRun.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbAutoRun.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAutoRun.Location = new System.Drawing.Point(12, 133); this.chbAutoRun.Location = new System.Drawing.Point(12, 195);
this.chbAutoRun.Name = "chbAutoRun"; this.chbAutoRun.Name = "chbAutoRun";
this.chbAutoRun.Size = new System.Drawing.Size(140, 24); this.chbAutoRun.Size = new System.Drawing.Size(140, 24);
this.chbAutoRun.TabIndex = 94; this.chbAutoRun.TabIndex = 94;
...@@ -241,11 +260,21 @@ ...@@ -241,11 +260,21 @@
this.btnClearLog.Visible = false; this.btnClearLog.Visible = false;
this.btnClearLog.Click += new System.EventHandler(this.btnClearLog_Click); this.btnClearLog.Click += new System.EventHandler(this.btnClearLog_Click);
// //
// lblMission
//
this.lblMission.AutoSize = true;
this.lblMission.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMission.Location = new System.Drawing.Point(3, 24);
this.lblMission.Name = "lblMission";
this.lblMission.Size = new System.Drawing.Size(68, 17);
this.lblMission.TabIndex = 204;
this.lblMission.Text = "当前任务:";
//
// lblShelf // lblShelf
// //
this.lblShelf.AutoSize = true; this.lblShelf.AutoSize = true;
this.lblShelf.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblShelf.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblShelf.Location = new System.Drawing.Point(12, 10); this.lblShelf.Location = new System.Drawing.Point(3, 7);
this.lblShelf.Name = "lblShelf"; this.lblShelf.Name = "lblShelf";
this.lblShelf.Size = new System.Drawing.Size(68, 17); this.lblShelf.Size = new System.Drawing.Size(68, 17);
this.lblShelf.TabIndex = 204; this.lblShelf.TabIndex = 204;
...@@ -255,7 +284,7 @@ ...@@ -255,7 +284,7 @@
// //
this.chbUseBuzzer.AutoSize = true; this.chbUseBuzzer.AutoSize = true;
this.chbUseBuzzer.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbUseBuzzer.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbUseBuzzer.Location = new System.Drawing.Point(12, 169); this.chbUseBuzzer.Location = new System.Drawing.Point(12, 231);
this.chbUseBuzzer.Name = "chbUseBuzzer"; this.chbUseBuzzer.Name = "chbUseBuzzer";
this.chbUseBuzzer.Size = new System.Drawing.Size(98, 24); this.chbUseBuzzer.Size = new System.Drawing.Size(98, 24);
this.chbUseBuzzer.TabIndex = 195; this.chbUseBuzzer.TabIndex = 195;
...@@ -267,7 +296,7 @@ ...@@ -267,7 +296,7 @@
// //
this.chbOutstoreEnd.AutoSize = true; this.chbOutstoreEnd.AutoSize = true;
this.chbOutstoreEnd.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbOutstoreEnd.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbOutstoreEnd.Location = new System.Drawing.Point(12, 277); this.chbOutstoreEnd.Location = new System.Drawing.Point(12, 339);
this.chbOutstoreEnd.Name = "chbOutstoreEnd"; this.chbOutstoreEnd.Name = "chbOutstoreEnd";
this.chbOutstoreEnd.Size = new System.Drawing.Size(140, 24); this.chbOutstoreEnd.Size = new System.Drawing.Size(140, 24);
this.chbOutstoreEnd.TabIndex = 202; this.chbOutstoreEnd.TabIndex = 202;
...@@ -526,6 +555,16 @@ ...@@ -526,6 +555,16 @@
this.timer1.Interval = 1000; this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick); this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
// //
// lblAgv
//
this.lblAgv.AutoSize = true;
this.lblAgv.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblAgv.Location = new System.Drawing.Point(3, 111);
this.lblAgv.Name = "lblAgv";
this.lblAgv.Size = new System.Drawing.Size(57, 17);
this.lblAgv.TabIndex = 204;
this.lblAgv.Text = "AGV状态";
//
// FrmStore // FrmStore
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
...@@ -608,6 +647,9 @@ ...@@ -608,6 +647,9 @@
private System.Windows.Forms.Button BTN_ReleaseShelf; private System.Windows.Forms.Button BTN_ReleaseShelf;
private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.PictureBox pictureBox2; private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.Label lblMission;
private System.Windows.Forms.Button btn_ClearMission;
private System.Windows.Forms.Label lblAgv;
} }
} }
...@@ -507,6 +507,7 @@ namespace OnlineStore.DUOStore ...@@ -507,6 +507,7 @@ namespace OnlineStore.DUOStore
} }
lblShelf.Text = "当前" + type + ":" + store.CurrShelfNum; lblShelf.Text = "当前" + type + ":" + store.CurrShelfNum;
lblMission.Text = "当前需求单:"+StoreManager.LastVisualRfid;
string msg = ""; string msg = "";
foreach(BoxBean box in store.BoxMap.Values) foreach(BoxBean box in store.BoxMap.Values)
{ {
...@@ -516,8 +517,16 @@ namespace OnlineStore.DUOStore ...@@ -516,8 +517,16 @@ namespace OnlineStore.DUOStore
msg += box.Name+":"+s+ "\r" ; msg += box.Name+":"+s+ "\r" ;
} }
} }
if (!string.IsNullOrWhiteSpace(store.WarnMsg))
msg += store.Name + ":" + store.WarnMsg + "\r";
UpdateListBox(); UpdateListBox();
lblWarnMsg.Text = msg; lblWarnMsg.Text = msg;
lblAgv.Text = "AGV状态:\n";
lblAgv.Text += $" 入口{StoreManager.Store.Config.AgvInName}:{AgvClient.GetAction(StoreManager.Store.Config.AgvInName)},{AgvClient.GetShelf(StoreManager.Store.Config.AgvInName)}\n";
lblAgv.Text += $" 出口{StoreManager.Store.Config.AgvOutName}:{AgvClient.GetAction(StoreManager.Store.Config.AgvOutName)},{AgvClient.GetShelf(StoreManager.Store.Config.AgvOutName)}\n";
LogM(); LogM();
} }
...@@ -757,5 +766,10 @@ namespace OnlineStore.DUOStore ...@@ -757,5 +766,10 @@ namespace OnlineStore.DUOStore
MessageBox.Show("料串正在出入库中,不满足释放条件"); MessageBox.Show("料串正在出入库中,不满足释放条件");
} }
} }
private void btn_ClearMission_Click(object sender, EventArgs e)
{
StoreManager.LastVisualRfid = "";
}
} }
} }
using log4net; using log4net;
using log4net.Config; using log4net.Config;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using OnlineStore.DUOStore; using OnlineStore.DUOStore;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -57,6 +58,12 @@ namespace OnlineStore.DUOStore ...@@ -57,6 +58,12 @@ namespace OnlineStore.DUOStore
//string path = @"http://localhost:4090/rest/api/v1/station/status"; //string path = @"http://localhost:4090/rest/api/v1/station/status";
//HttpHelper.PostOperation(path, new Operation()); //HttpHelper.PostOperation(path, new Operation());
List<InOutParam> aa = new List<InOutParam>();
aa.Add(new InOutParam(MoveType.InStore, "123", "123", 7, 8, 1));
var aaa = from a in aa where a.TargetPosition == 1 select a;
var xccsaf = aaa.Count();
//string a = "LZAUJN0208MAN;E20210105 0365;BQT001200261510792021010515000;R107920210118A1049";
//a = a.Replace("\u001a", "");
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
......
...@@ -29,22 +29,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -29,22 +29,23 @@ namespace OnlineStore.DeviceLibrary
agvClient.Connected += AgvClient_Connected; agvClient.Connected += AgvClient_Connected;
//NodeList.Add(StoreManager.Config.AgvInName); //NodeList.Add(StoreManager.Config.AgvInName);
//NodeList.Add(StoreManager.Config.AgvOutName); //NodeList.Add(StoreManager.Config.AgvOutName);
actionMap = new Dictionary<string, Agv.ClientAction>();
shelfMap = new Dictionary<string, Agv.ClientShelf>();
foreach (string key in NodeList)
{
actionMap.Add(key, Agv.ClientAction.None);
shelfMap.Add(key, Agv.ClientShelf.None);
}
agvClient.Connect(ServerIp, ServerPort);
foreach (string id in NodeList)
{
//SetStatus(id, "");
agvClient.SetStatus(id);
LogUtil.info("agv init ,SetStatus[" + id + "]=none ");
}
SetCancelState(false);
} }
actionMap = new Dictionary<string, Agv.ClientAction>();
shelfMap = new Dictionary<string, Agv.ClientShelf>();
foreach (string key in NodeList)
{
actionMap.Add(key, Agv.ClientAction.None);
shelfMap.Add(key, Agv.ClientShelf.None);
}
agvClient.Connect(ServerIp, ServerPort);
foreach (string id in NodeList)
{
//SetStatus(id, "");
agvClient.SetStatus(id);
LogUtil.info("agv init ,SetStatus[" + id + "]=none ");
}
SetCancelState(false);
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -80,10 +81,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -80,10 +81,11 @@ namespace OnlineStore.DeviceLibrary
if (agvClient == null) if (agvClient == null)
return; return;
if (actionMap.ContainsKey(id)) if (actionMap.ContainsKey(id) && shelfMap.ContainsKey(id))
{ {
Agv.ClientAction currA = actionMap[id]; //相同状态就设置一次 Agv.ClientAction currA = actionMap[id]; //相同状态就设置一次
if (currA.Equals(action)) Agv.ClientShelf clientShelf1 = shelfMap[id];
if (currA.Equals(action) && clientShelf1.Equals(clientShelf))
{ {
return; return;
} }
...@@ -100,7 +102,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -100,7 +102,8 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
LogUtil.info("收到 AgvClient_Ready [" + id + "] [" + rfid + "] " + GetAction(id).ToString()); if (rfid!= "Heartbeat package")
LogUtil.info("收到 AgvClient_Ready [" + id + "] [" + rfid + "] " + GetAction(id).ToString());
if (GetAction(id) == ClientAction.NeedEnter || id == StoreManager.Config.AgvInName) if (GetAction(id) == ClientAction.NeedEnter || id == StoreManager.Config.AgvInName)
{ {
...@@ -114,7 +117,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -114,7 +117,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogUtil.error("收到 AgvClient_Arrive [" + id + "] [" + rfid + "] 未找到对应的设备 ,暂不处理"); //LogUtil.error("收到 AgvClient_Arrive [" + id + "] [" + rfid + "] 未找到对应的设备 ,暂不处理");
} }
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -144,6 +144,12 @@ ...@@ -144,6 +144,12 @@
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<ItemGroup> <ItemGroup>
<None Include="StoreConfig\box_1_Camera.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="StoreConfig\box_2_Camera.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="StoreConfig\FixPositions.csv"> <None Include="StoreConfig\FixPositions.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
...@@ -154,13 +160,13 @@ ...@@ -154,13 +160,13 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="StoreConfig\StoreConfig.csv"> <None Include="StoreConfig\StoreConfig.csv">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="StoreConfig\BoxConfig_2.csv"> <None Include="StoreConfig\BoxConfig_2.csv">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="StoreConfig\BoxConfig_1.csv"> <None Include="StoreConfig\BoxConfig_1.csv">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,,L1_旋转轴,Middle_Axis,0,HC,,800,2400,2400,50,250,3000,5,20,0,0 AXIS,,L1_旋转轴,Middle_Axis,0,HC,,800,2400,2400,50,250,3000,5,20,0,0
AXIS,,L2_上下轴,UpDown_Axis,1,HC,,2000,3000,6000,50,250,3000,10,100,0,0 AXIS,,L2_上下轴,UpDown_Axis,1,HC,,2000,3000,6000,50,250,3000,10,100,0,0
AXIS,,L3_进出轴,InOut_Axis,2,HC,,1000,5000,5000,50,300,8000,10,1000,0,0 AXIS,,L3_进出轴,InOut_Axis,2,HC,,1000,15000,17000,50,300,8000,10,1000,0,0
AXIS,,L4_压紧轴,Comp_Axis,3,HC,,10000,60000,60000,3000,10000,20000,10,1000,0,0 AXIS,,L4_压紧轴,Comp_Axis,3,HC,,10000,90000,90000,3000,10000,20000,10,1000,0,0
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,L2_上下轴_P1待机点/入料口低点,UpDownAxis_P1,4510,,,,,,,,,,,, PRO,,L2_上下轴_P1待机点/入料口低点,UpDownAxis_P1,4382,,,,,,,,,,,,
PRO,,L2_上下轴_P2入料口高点,UpDownAxis_P2,4726,,,,,,,,,,,, PRO,,L2_上下轴_P2入料口高点,UpDownAxis_P2,4745,,,,,,,,,,,,
PRO,,L1_旋转轴_P1待机点/入料口位置,MiddleAxis_P1,8041,,,,,,,,,,,, PRO,,L1_旋转轴_P1待机点/入料口位置,MiddleAxis_P1,8330,,,,,,,,,,,,
PRO,,L3_进出轴_P1待机点,InOutAxis_P1,0,,,,,,,,,,,, PRO,,L3_进出轴_P1待机点,InOutAxis_P1,0,,,,,,,,,,,,
PRO,,L4_压紧轴_P1待机点,CompAxis_P1,20000,,,,,,,,,,,, PRO,,L4_压紧轴_P1待机点,CompAxis_P1,2000,,,,,,,,,,,,
PRO,,L4_压紧轴_P2压紧点范围对应值,CompAxis_P2_List,8=49514;12=44615;16=39596;,,,,,,,,,,,, PRO,,L4_压紧轴_P2压紧点范围对应值,CompAxis_P2_List,8=49928;12=45455;16=42495;,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,L2_上下轴_P11-出料口-低点,UpDownAxis_P11,2815,,,,,,,,,,,, PRO,,L2_上下轴_P11-出料口-低点,UpDownAxis_P11,2783,,,,,,,,,,,,
PRO,,L2_上下轴_P12-出料口-高点,UpDownAxis_P12,2919,,,,,,,,,,,, PRO,,L2_上下轴_P12-出料口-高点,UpDownAxis_P12,2907,,,,,,,,,,,,
PRO,,L1_旋转轴_P11-出料口位置,MiddleAxis_P11,1237,,,,,,,,,,,, PRO,,L1_旋转轴_P11-出料口位置,MiddleAxis_P11,1304,,,,,,,,,,,,
PRO,,L3_进出轴_P2-入料口取放料点,InOutAxis_P2,4623,,,,,,,,,,,, PRO,,L3_进出轴_P2-入料口取放料点,InOutAxis_P2,4730,,,,,,,,,,,,
PRO,,L3_进出轴_P11-出料口取放料点,InOutAxis_P11,4497,,,,,,,,,,,, PRO,,L3_进出轴_P11-出料口取放料点,InOutAxis_P11,4497,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,L2_上下轴_P1速度/高速,UpDownAxis_P1_Speed,1500,,,,,,,,,,,, PRO,,L2_上下轴_P1速度/高速,UpDownAxis_P1_Speed,5000,,,,,,,,,,,,
PRO,,L2_上下轴_P2速度/低速,UpDownAxis_P2_Speed,150,,,,,,,,,,,, PRO,,L2_上下轴_P2速度/低速,UpDownAxis_P2_Speed,450,,,,,,,,,,,,
PRO,,L2_上下轴_P3速度,UpDownAxis_P3_Speed,2000,,, ,,,,,,,,, PRO,,L2_上下轴_P3速度,UpDownAxis_P3_Speed,5000,,, ,,,,,,,,,
PRO,,L2_上下轴_P4速度,UpDownAxis_P4_Speed,150,,,,,,,,,,,, PRO,,L2_上下轴_P4速度,UpDownAxis_P4_Speed,150,,,,,,,,,,,,
PRO,,L2_上下轴_P5速度,UpDownAxis_P5_Speed,2000,,,,,,,,,,,, PRO,,L2_上下轴_P5速度,UpDownAxis_P5_Speed,5000,,,,,,,,,,,,
PRO,,L2_上下轴_P6速度,UpDownAxis_P6_Speed,150,,,,,,,,,,,, PRO,,L2_上下轴_P6速度,UpDownAxis_P6_Speed,150,,,,,,,,,,,,
PRO,,L2_上下轴_P7速度,UpDownAxis_P7_Speed,2000,,,,,,,,,,,, PRO,,L2_上下轴_P7速度,UpDownAxis_P7_Speed,5000,,,,,,,,,,,,
PRO,,L2_上下轴_P8速度,UpDownAxis_P8_Speed,100,,,,,,,,,,,, PRO,,L2_上下轴_P8速度,UpDownAxis_P8_Speed,100,,,,,,,,,,,,
PRO,,L1_旋转轴_P1速度,MiddleAxis_P1_Speed,1000,,,,,,,,,,,, PRO,,L1_旋转轴_P1速度,MiddleAxis_P1_Speed,1200,,,,,,,,,,,,
PRO,,L1_旋转轴_P2速度,MiddleAxis_P2_Speed,1000,,,,,,,,,,,, PRO,,L1_旋转轴_P2速度,MiddleAxis_P2_Speed,1200,,,,,,,,,,,,
PRO,,L3_进出轴_P1速度,InOutAxis_P1_Speed,3000,,,,,,,,,,,, PRO,,L3_进出轴_P1速度,InOutAxis_P1_Speed,6000,,,,,,,,,,,,
PRO,,L3_进出轴_P2速度,InOutAxis_P2_Speed,3000,,,,,,,,,,,, PRO,,L3_进出轴_P2速度,InOutAxis_P2_Speed,6000,,,,,,,,,,,,
PRO,,L3_进出轴_P3速度,InOutAxis_P3_Speed,3000,,,,,,,,,,,, PRO,,L3_进出轴_P3速度,InOutAxis_P3_Speed,6000,,,,,,,,,,,,
PRO,,L4_压紧轴_P1速度,CompAxis_P1_Speed,8000,,,,,,,,,,,, PRO,,L4_压紧轴_P1速度,CompAxis_P1_Speed,8000,,,,,,,,,,,,
PRO,,L4_压紧轴_P2速度,CompAxis_P2_Speed,30000,,,,,,,,,,,, PRO,,L4_压紧轴_P2速度,CompAxis_P2_Speed,60000,,,,,,,,,,,,
PRO,,L4_压紧轴_P3速度,CompAxis_P3_Speed,10000,,,,,,,,,,,, PRO,,L4_压紧轴_P3速度,CompAxis_P3_Speed,30000,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,L2_上下轴_P11速度/低速,UpDownAxis_P11_Speed,150,,,,,,,,,,,, PRO,,L2_上下轴_P11速度/低速,UpDownAxis_P11_Speed,150,,,,,,,,,,,,
PRO,,L2_上下轴_P12速度/高速,UpDownAxis_P12_Speed,1500,,,,,,,,,,,, PRO,,L2_上下轴_P12速度/高速,UpDownAxis_P12_Speed,1500,,,,,,,,,,,,
PRO,,L3_进出轴_P11速度,InOutAxis_P11_Speed,3000,,,,,,,,,,,, PRO,,L3_进出轴_P11速度,InOutAxis_P11_Speed,4000,,,,,,,,,,,,
PRO,,L1_旋转轴_P11速度,MiddleAxis_P11_Speed,1000,,,,,,,,,,,, PRO,,L1_旋转轴_P11速度,MiddleAxis_P11_Speed,1200,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,温湿度端口号,Humiture_Port,COM5,,,,,,,,,,,, PRO,,温湿度端口号,Humiture_Port,COM5,,,,,,,,,,,,
PRO,,是否是调试状态,IsInDebug,0,,,,,,,,,,,, PRO,,是否是调试状态,IsInDebug,0,,,,,,,,,,,,
PRO,,是否使用料叉盘检测信号,IsUse_Tray_Check,0,,,,,,,,,,,, PRO,,是否使用料叉盘检测信号,IsUse_Tray_Check,1,,,,,,,,,,,,
PRO,,旋转轴反转点位补偿,MiddleAxis_Reverse_Offset,11,,,,,,,,,,,, PRO,,旋转轴反转点位补偿,MiddleAxis_Reverse_Offset,5,,,,,,,,,,,,
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,,R1_旋转轴,Middle_Axis,8,HC,,800,2400,2400,50,250,3000,10,1000,0,0 AXIS,,R1_旋转轴,Middle_Axis,8,HC,,800,2400,2400,50,250,3000,10,1000,0,0
AXIS,,R2_上下轴,UpDown_Axis,9,HC,,2000,3000,6000,50,250,3000,10,1000,0,0 AXIS,,R2_上下轴,UpDown_Axis,9,HC,,2000,3000,6000,50,250,3000,10,1000,0,0
AXIS,,R3_进出轴,InOut_Axis,10,HC,,1000,5000,5000,50,300,8000,10,1000,0,0 AXIS,,R3_进出轴,InOut_Axis,10,HC,,1000,5000,6000,50,250,4000,10,1000,0,0
AXIS,,R4_压紧轴,Comp_Axis,11,HC,,10000,25000,25000,3000,10000,20000,10,1000,0,0 AXIS,,R4_压紧轴,Comp_Axis,11,HC,,10000,90000,90000,3000,10000,20000,10,1000,0,0
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,R2_上下轴_P1待机点/扫码放料低点,UpDownAxis_P1,4542,,,,,,,,,,,, PRO,,R2_上下轴_P1待机点/扫码放料低点,UpDownAxis_P1,4425,,,,,,,,,,,,
PRO,,R2_上下轴_P2扫码放料高点缓冲点,UpDownAxis_P2,4759,,,,,,,,,,,, PRO,,R2_上下轴_P2扫码放料高点缓冲点,UpDownAxis_P2,4780,,,,,,,,,,,,
PRO,,R1_旋转轴_P1待机点/扫码放料点,MiddleAxis_P1,1806,,,,,,,,,,,, PRO,,R1_旋转轴_P1待机点/扫码放料点,MiddleAxis_P1,1829,,,,,,,,,,,,
PRO,,R3_进出轴_P1待机点,InOutAxis_P1,0,,,,,,,,,,,, PRO,,R3_进出轴_P1待机点,InOutAxis_P1,0,,,,,,,,,,,,
PRO,,R4_压紧轴_P1待机点,CompAxis_P1,20000,,,,,,,,,,,, PRO,,R4_压紧轴_P1待机点,CompAxis_P1,0,,,,,,,,,,,,
PRO,,L4_压紧轴_P2压紧点范围对应值,CompAxis_P2_List,8=49514;12=44615;16=39596;,,,,,,,,,,,, PRO,,L4_压紧轴_P2压紧点范围对应值,CompAxis_P2_List,8=72480;12=66663;16=63358;24=56449;32=46239;44=36239;56=23755,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,R2_上下轴_P11-出料口-低点,UpDownAxis_P11,2849,,,,,,,,,,,, PRO,,R2_上下轴_P11-出料口-低点,UpDownAxis_P11,2729,,,,,,,,,,,,
PRO,,R2_上下轴_P12-出料口-高点,UpDownAxis_P12,2979,,,,,,,,,,,, PRO,,R2_上下轴_P12-出料口-高点,UpDownAxis_P12,2899,,,,,,,,,,,,
PRO,,R1_旋转轴_P11-出料口位置,MiddleAxis_P11,8607,,,,,,,,,,,, PRO,,R1_旋转轴_P11-出料口位置,MiddleAxis_P11,8508,,,,,,,,,,,,
PRO,,R3_进出轴_P2-入料口取放料点,InOutAxis_P2,4623,,,,,,,,,,,, PRO,,R3_进出轴_P2-入料口取放料点,InOutAxis_P2,4025,,,,,,,,,,,,
PRO,,R3_进出轴_P11-出料口取放料点,InOutAxis_P11,4497,,,,,,,,,,,, PRO,,R3_进出轴_P11-出料口取放料点,InOutAxis_P11,4073,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,R2_上下轴_P1速度/高速,UpDownAxis_P1_Speed,1500,,,,,,,,,,,, PRO,,R2_上下轴_P1速度/高速,UpDownAxis_P1_Speed,3000,,,,,,,,,,,,
PRO,,R2_上下轴_P2速度/低速,UpDownAxis_P2_Speed,150,,,,,,,,,,,, PRO,,R2_上下轴_P2速度/低速,UpDownAxis_P2_Speed,450,,,,,,,,,,,,
PRO,,R2_上下轴_P3速度,UpDownAxis_P3_Speed,2000,,, ,,,,,,,,, PRO,,R2_上下轴_P3速度,UpDownAxis_P3_Speed,3000,,, ,,,,,,,,,
PRO,,R2_上下轴_P4速度,UpDownAxis_P4_Speed,150,,,,,,,,,,,, PRO,,R2_上下轴_P4速度,UpDownAxis_P4_Speed,150,,,,,,,,,,,,
PRO,,R2_上下轴_P5速度,UpDownAxis_P5_Speed,2000,,,,,,,,,,,, PRO,,R2_上下轴_P5速度,UpDownAxis_P5_Speed,3000,,,,,,,,,,,,
PRO,,R2_上下轴_P6速度,UpDownAxis_P6_Speed,150,,,,,,,,,,,, PRO,,R2_上下轴_P6速度,UpDownAxis_P6_Speed,150,,,,,,,,,,,,
PRO,,R2_上下轴_P7速度,UpDownAxis_P7_Speed,2000,,,,,,,,,,,, PRO,,R2_上下轴_P7速度,UpDownAxis_P7_Speed,3000,,,,,,,,,,,,
PRO,,R2_上下轴_P8速度,UpDownAxis_P8_Speed,100,,,,,,,,,,,, PRO,,R2_上下轴_P8速度,UpDownAxis_P8_Speed,100,,,,,,,,,,,,
PRO,,R1_旋转轴_P1速度,MiddleAxis_P1_Speed,1000,,,,,,,,,,,, PRO,,R1_旋转轴_P1速度,MiddleAxis_P1_Speed,1000,,,,,,,,,,,,
PRO,,R1_旋转轴_P2速度,MiddleAxis_P2_Speed,1000,,,,,,,,,,,, PRO,,R1_旋转轴_P2速度,MiddleAxis_P2_Speed,1000,,,,,,,,,,,,
PRO,,R3_进出轴_P1速度,InOutAxis_P1_Speed,3000,,,,,,,,,,,, PRO,,R3_进出轴_P1速度,InOutAxis_P1_Speed,5000,,,,,,,,,,,,
PRO,,R3_进出轴_P2速度,InOutAxis_P2_Speed,3000,,,,,,,,,,,, PRO,,R3_进出轴_P2速度,InOutAxis_P2_Speed,4000,,,,,,,,,,,,
PRO,,R3_进出轴_P3速度,InOutAxis_P3_Speed,3000,,,,,,,,,,,, PRO,,R3_进出轴_P3速度,InOutAxis_P3_Speed,4000,,,,,,,,,,,,
PRO,,R4_压紧轴_P1速度,CompAxis_P1_Speed,6000,,,,,,,,,,,, PRO,,R4_压紧轴_P1速度,CompAxis_P1_Speed,8000,,,,,,,,,,,,
PRO,,R4_压紧轴_P2速度,CompAxis_P2_Speed,9500,,,,,,,,,,,, PRO,,R4_压紧轴_P2速度,CompAxis_P2_Speed,60000,,,,,,,,,,,,
PRO,,R4_压紧轴_P3速度,CompAxis_P3_Speed,9500,,,,,,,,,,,, PRO,,R4_压紧轴_P3速度,CompAxis_P3_Speed,30000,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,R2_上下轴_P11速度/低速,UpDownAxis_P11_Speed,150,,,,,,,,,,,, PRO,,R2_上下轴_P11速度/低速,UpDownAxis_P11_Speed,150,,,,,,,,,,,,
PRO,,R2_上下轴_P12速度/高速,UpDownAxis_P12_Speed,1500,,,,,,,,,,,, PRO,,R2_上下轴_P12速度/高速,UpDownAxis_P12_Speed,1500,,,,,,,,,,,,
PRO,,R3_进出轴_P11速度,InOutAxis_P11_Speed,3000,,,,,,,,,,,, PRO,,R3_进出轴_P11速度,InOutAxis_P11_Speed,4000,,,,,,,,,,,,
PRO,,R1_旋转轴_P11速度,MiddleAxis_P11_Speed,1000,,,,,,,,,,,, PRO,,R1_旋转轴_P11速度,MiddleAxis_P11_Speed,1200,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,温湿度端口号,Humiture_Port,COM5,,,,,,,,,,,, PRO,,温湿度端口号,Humiture_Port,COM5,,,,,,,,,,,,
PRO,,是否是调试状态,IsInDebug,0,,,,,,,,,,,, PRO,,是否是调试状态,IsInDebug,0,,,,,,,,,,,,
PRO,,是否使用料叉盘检测信号,IsUse_Tray_Check,0,,,,,,,,,,,,
PRO,,旋转轴反转点位补偿,MiddleAxis_Reverse_Offset,6,,,,,,,,,,,,
\ No newline at end of file \ No newline at end of file
PRO,,是否使用料叉盘检测信号,IsUse_Tray_Check,1,,,,,,,,,,,,
PRO,,旋转轴反转点位补偿,MiddleAxis_Reverse_Offset,10,,,,,,,,,,,,
位置,优先级,高度,宽度,料仓ID,旋转轴库位点P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3 位置,优先级,高度,宽度,料仓ID,旋转轴库位点P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3
fix_1#7,1,8,7,1,306200,1290614,1299614,1299614,1290614,110692,10,10 fix_1#7,1,16,7,1,8330,3785,4088,4088,3785,4693,1,25127
fix_2#11,2,8,7,2,306200,1290614,1299614,1299614,1290614,110692,10,10 fix_2#13#,2,56,13,2,8478,3136,3475,3475,3136,4120,1,0
fix_2#13,3,8,7,2,306200,1290614,1299614,1299614,1290614,110692,10,10
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,,T1_提升机构升降轴,T1_Batch_Axis,4,HC,,18000,60000,60000,8000,18000,40000,1000,1000,0,0 AXIS,,T1_提升机构升降轴,T1_Batch_Axis,4,HC,,18000,60000,60000,8000,18000,40000,1000,500,0,0
AXIS,,T2_取料机构旋转轴,T2_Middle_Axis,6,HC,,1500,3000,3000,100,500,3000,10,1000,0,0 AXIS,,T2_取料机构旋转轴,T2_Middle_Axis,6,HC,,1500,45000,47000,100,500,3000,10,1000,0,0
AXIS,,T3_取料机构上下轴,T3_Updown_Axis,5,HC,,20000,60000,60000,2000,7000,21000,10,1000,0,0 AXIS,,T3_取料机构上下轴,T3_Updown_Axis,5,HC,,20000,900000,950000,2000,7000,21000,10,1000,0,0
AXIS,,T4_取料机构进出轴,T4_InOut_Axis,7,HC,,600,1500,1500,50,300,1500,10,1000,0,0 AXIS,,T4_取料机构进出轴,T4_InOut_Axis,7,HC,,5000,8000,9000,50,200,1500,10,1000,0,0
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,IO模块对应的DI数量,IO_DILength,192.168.201.21#16;192.168.201.22#16;192.168.200.23#8,,,,,,,,,,,, PRO,,IO模块对应的DI数量,IO_DILength,192.168.201.21#16;192.168.201.22#16;192.168.200.23#8,,,,,,,,,,,,
PRO,,IO模块对应的DO数量,IO_DOLength,192.168.201.21#16;192.168.201.22#16;192.168.200.23#8,,,,,,,,,,,, PRO,,IO模块对应的DO数量,IO_DOLength,192.168.201.21#16;192.168.201.22#16;192.168.200.23#8,,,,,,,,,,,,
...@@ -98,47 +98,46 @@ DO,4,卡爪指令编码4,Clamp_SetPos4,35,HC,Y35,*,,,,,,,,, ...@@ -98,47 +98,46 @@ DO,4,卡爪指令编码4,Clamp_SetPos4,35,HC,Y35,*,,,,,,,,,
DO,5,卡爪动作指令,Clamp_DoAction,36,HC,Y36,*,,,,,,,,, DO,5,卡爪动作指令,Clamp_DoAction,36,HC,Y36,*,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,T1_提升轴待机点 P1,BatchAxis_P1,500,,,,, ,,,,,,, PRO,0,T1_提升轴待机点 P1,BatchAxis_P1,500,,,,, ,,,,,,,
PRO,0,T1_提升轴上升目标点_P2,BatchAxis_P2,562083,,,,, ,,,,,,, PRO,0,T1_提升轴上升目标点_P2,BatchAxis_P2,553847,,,,, ,,,,,,,
PRO,0,T1_提升轴P1速度,BatchAxis_P1Speed,18000,,,,,,,,,,,, PRO,0,T1_提升轴P1速度,BatchAxis_P1Speed,45000,,,,,,,,,,,,
PRO,0,T1_提升轴P2速度,BatchAxis_P2Speed,12000,,,,, ,,,,,,, PRO,0,T1_提升轴P2速度,BatchAxis_P2Speed,12000,,,,, ,,,,,,,
PRO,0,T1_提升轴高度转换系数(1mm对应的脉冲),BatchAxis_ChangeValue,996,,,,,,,,,,,, PRO,0,T1_提升轴高度转换系数(1mm对应的脉冲),BatchAxis_ChangeValue,1022,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,T2_旋转轴待机点/取放料点 P1,MiddleAxis_P1,500,,,,,,,,,,,, PRO,0,T2_旋转轴待机点/取放料点 P1,MiddleAxis_P1,1589,,,,,,,,,,,,
PRO,0,T2_旋转轴左侧料仓取放料点_P2,MiddleAxis_P2,4774,,,,,,,,,,,, PRO,0,T2_旋转轴左侧料仓取放料点_P2,MiddleAxis_P2,4806,,,,,,,,,,,,
PRO,0,T2_旋转轴右侧料仓取放料点_P3,MiddleAxis_P3,-24,,,,,,,,,,,, PRO,0,T2_旋转轴右侧料仓取放料点_P3,MiddleAxis_P3,0,,,,,,,,,,,,
PRO,0,T2_旋转轴_料串取放料点_P4,MiddleAxis_P4,2354,,,,,,,,,,,, PRO,0,T2_旋转轴_料串取放料点_P4,MiddleAxis_P4,2883,,,,,,,,,,,,
PRO,0,T2_旋转轴P1速度,MiddleAxis_P1Speed,1500,,,,,,,,,,,, PRO,0,T2_旋转轴P1速度,MiddleAxis_P1Speed,15000,,,,,,,,,,,,
PRO,0,T2_旋转轴P2速度,MiddleAxis_P2Speed,1500,,,,,,,,,,,, PRO,0,T2_旋转轴P2速度,MiddleAxis_P2Speed,15000,,,,,,,,,,,,
PRO,0,T2_旋转轴P3速度,MiddleAxis_P3Speed,1500,,,,,,,,,,,, PRO,0,T2_旋转轴P3速度,MiddleAxis_P3Speed,15000,,,,,,,,,,,,
PRO,0,T2_旋转轴P4速度,MiddleAxis_P4Speed,1500,,,,,,,,,,,, PRO,0,T2_旋转轴P4速度,MiddleAxis_P4Speed,15000,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,T3_升降轴料串取放料低点 P1,UpdownAxis_P1,129763,,,,,,,,,,,, PRO,0,T3_升降轴料串取放料低点 P1,UpdownAxis_P1,155237,,,,,,,,,,,,
PRO,0,T3_升降轴料串取放料高点/待机点 P2,UpdownAxis_P2,0,,,,,,,,,,,, PRO,0,T3_升降轴料串取放料高点/待机点 P2,UpdownAxis_P2,5425,,,,,,,,,,,,
PRO,0,T3_升降轴左侧料仓取放料低点 P3,UpdownAxis_P3,74285,,,,,,,,,,,, PRO,0,T3_升降轴左侧料仓取放料低点 P3,UpdownAxis_P3,135959,,,,,,,,,,,,
PRO,0,T3_升降轴左侧料仓取放料高点 P4,UpdownAxis_P4,22181,,,,,,,,,,,, PRO,0,T3_升降轴左侧料仓取放料高点 P4,UpdownAxis_P4,17612,,,,,,,,,,,,
PRO,0,T3_升降轴右侧料仓取放料低点 P5,UpdownAxis_P5,71798,,,,,,,,,,,, PRO,0,T3_升降轴右侧料仓取放料低点 P5,UpdownAxis_P5,121300,,,,,,,,,,,,
PRO,0,T3_升降轴右侧料仓取放料高点 P6,UpdownAxis_P6,22181,,,,,,,,,,,, PRO,0,T3_升降轴右侧料仓取放料高点 P6,UpdownAxis_P6,2590,,,,,,,,,,,,
PRO,0,T3_升降轴P1速度/慢速度,UpdownAxis_P1Speed,50000,,,,,,,,,,,, PRO,0,T3_升降轴P1速度/慢速度,UpdownAxis_P1Speed,250000,,,,,,,,,,,,
PRO,0,T3_升降轴P2速度/快速度,UpdownAxis_P2Speed,70000,,,,,,,,,,,, PRO,0,T3_升降轴P2速度/快速度,UpdownAxis_P2Speed,300000,,,,,,,,,,,,
PRO,0,T3_升降轴P3速度/慢速度,UpdownAxis_P3Speed,50000,,,,,,,,,,,, PRO,0,T3_升降轴P3速度/慢速度,UpdownAxis_P3Speed,250000,,,,,,,,,,,,
PRO,0,T3_升降轴P4速度/快速度,UpdownAxis_P4Speed,70000,,,,,,,,,,,, PRO,0,T3_升降轴P4速度/快速度,UpdownAxis_P4Speed,300000,,,,,,,,,,,,
PRO,0,T3_升降轴P5速度/慢速度,UpdownAxis_P5Speed,50000,,,,,,,,,,,, PRO,0,T3_升降轴P5速度/慢速度,UpdownAxis_P5Speed,250000,,,,,,,,,,,,
PRO,0,T3_升降轴P6速度/快速度,UpdownAxis_P6Speed,70000,,,,,,,,,,,, PRO,0,T3_升降轴P6速度/快速度,UpdownAxis_P6Speed,300000,,,,,,,,,,,,
PRO,0,T3_升降轴高度转换系数(1mm对应的脉冲),UpdownAxis_ChangeValue,10041,,,,,,,,,,,, PRO,0,T3_升降轴高度转换系数(1mm对应的脉冲),UpdownAxis_ChangeValue,1004,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,T4_进出轴待机点 P1,InOutAxis_P1,500,,,,,,,,,,,, PRO,0,T4_进出轴待机点 P1,InOutAxis_P1,-10,,,,,,,,,,,,
PRO,0,T4_进出轴7寸取料点P2,InOutAxis_P2,500,,,,,,,,,,,, PRO,0,T4_进出轴7寸取料点P2,InOutAxis_P2,999,,,,,,,,,,,,
PRO,0,T4_进出轴13寸取料点P3,InOutAxis_P3,500,,,,,,,,,,,, PRO,0,T4_进出轴13寸取料点P3,InOutAxis_P3,693,,,,,,,,,,,,
PRO,0,T4_进出轴放料点P4,InOutAxis_P4,500,,,,,,,,,,,, PRO,0,T4_进出轴放料点P4,InOutAxis_P4,673,,,,,,,,,,,,
PRO,0,T4_进出轴待机点 P1Speed,InOutAxis_P1Speed,5000,,,,,,,,,,,, PRO,0,T4_进出轴13寸取料点进入前点P6,InOutAxis_P6,743,,,,,,,,,,,,
PRO,0,T4_进出轴7寸取料点P2Speed,InOutAxis_P2Speed,5000,,,,,,,,,,,, PRO,0,T4_进出轴待机点 P1Speed,InOutAxis_P1Speed,2000,,,,,,,,,,,,
PRO,0,T4_进出轴13寸取料点P3Speed,InOutAxis_P3Speed,5000,,,,,,,,,,,, PRO,0,T4_进出轴7寸取料点P2Speed,InOutAxis_P2Speed,2000,,,,,,,,,,,,
PRO,0,T4_进出轴放料点P4Speed,InOutAxis_P4Speed,5000,,,,,,,,,,,, PRO,0,T4_进出轴13寸取料点P3Speed,InOutAxis_P3Speed,2000,,,,,,,,,,,,
PRO,0,T4_进出轴右侧缓冲点P6,InOutAxis_P6,500,,,,,,,,,,,, PRO,0,T4_进出轴放料点P4Speed,InOutAxis_P4Speed,2000,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,, PRO,0,AgvInName,AgvInName,D3,,,,,,,,,,,,
PRO,0,AgvInName,AgvInName,D1,,,,,,,,,,,, PRO,0,AgvOutName,AgvOutName,D4,,,,,,,,,,,,
PRO,0,AgvOutName,AgvOutName,D2,,,,,,,,,,,,
PRO,0,电夹爪1端口,Clamp1Port,COM12,,,,,,,,,,,, PRO,0,电夹爪1端口,Clamp1Port,COM12,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,预警温度,WarnTemperate,80,,,,,,,,,,,, PRO,,预警温度,WarnTemperate,80,,,,,,,,,,,,
...@@ -155,7 +154,7 @@ PRO,,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,,,,,, ...@@ -155,7 +154,7 @@ PRO,,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,,,,,,
PRO,0,是否调试状态(1=调试,0=正常),IsDebug,1,,,,,,,,,,,, PRO,0,是否调试状态(1=调试,0=正常),IsDebug,1,,,,,,,,,,,,
PRO,,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,,,,,, PRO,,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,,,,,,
PRO,,所有料仓的CID(用#号分隔),All_CIDs,duo-2,,,,,,,,,,,, PRO,,所有料仓的CID(用#号分隔),All_CIDs,duo-2,,,,,,,,,,,,
PRO,,扫码的相机名称(多个用#分隔),CameraNameList,GigE:MV-CE200-10GC (00E96448339)#,,,,,,,,,,,, PRO,,扫码的相机名称(多个用#分隔),CameraNameList,GigE:MV-CE200-10GC (00E76280382)#,,,,,,,,,,,,
PRO,,最后一盘料需要补充的高度,LastTrayAddHeight,10,,,,,,,,,,,, PRO,,最后一盘料需要补充的高度,LastTrayAddHeight,9,,,,,,,,,,,,
PRO,,入料Rfid_IP,In_Rfid_IP,192.168.202.21,,,,,,,,,,,, PRO,,入料Rfid_IP,In_Rfid_IP,192.168.201.21,,,,,,,,,,,,
PRO,,出料Rfid IP,Out_Rfid_IP,192.168.201.21,,,,,,,,,,,, PRO,,出料Rfid IP,Out_Rfid_IP,192.168.202.21,,,,,,,,,,,,
{
"HIKIPCamera":
[
{
"Name":"Box_1",
"IP":"192.168.9.64",
"User":"admin",
"Pwd":"acc12345678",
"Port":"8000"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"HIKIPCamera":
[
{
"Name":"box_2",
"IP":"192.168.2.64",
"User":"admin",
"Pwd":"acc12345678",
"Port":"8000"
}
]
}
\ No newline at end of file \ No newline at end of file
...@@ -292,6 +292,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -292,6 +292,8 @@ namespace OnlineStore.DeviceLibrary
message = message.Replace("\n", ""); message = message.Replace("\n", "");
char a = (char)02; char a = (char)02;
message = message.Replace(a.ToString(), ""); message = message.Replace(a.ToString(), "");
message = message.Replace("\u0026", "");
message = message.Replace("\\000026", "");
message = message.Trim(); message = message.Trim();
System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding(); System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
byte[] bytes = asciiEncoding.GetBytes(message); byte[] bytes = asciiEncoding.GetBytes(message);
...@@ -299,7 +301,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -299,7 +301,7 @@ namespace OnlineStore.DeviceLibrary
foreach (byte by in bytes) foreach (byte by in bytes)
{ {
int value = (int)by; int value = (int)by;
if (value.Equals(24) || value.Equals(30) || value.Equals(29) || value.Equals(4)) if (value.Equals(24) || value.Equals(30) || value.Equals(29) || value.Equals(4) || value.Equals(26))
{ {
continue; continue;
} }
......
...@@ -250,7 +250,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -250,7 +250,7 @@ namespace OnlineStore.DeviceLibrary
LastPosition = -1; LastPosition = -1;
if (targetSpeed > Config.TargetSpeed || targetSpeed <= 0) if (targetSpeed > Config.TargetSpeed || targetSpeed <= 0)
{ {
targetSpeed = Config.TargetSpeed; //targetSpeed = Config.TargetSpeed;
} }
//小于1,表示是目标速度的百分比 //小于1,表示是目标速度的百分比
else if (targetSpeed <= 1) else if (targetSpeed <= 1)
......
...@@ -251,7 +251,44 @@ namespace OnlineStore.DeviceLibrary ...@@ -251,7 +251,44 @@ namespace OnlineStore.DeviceLibrary
break; break;
case StoreMoveStep.BOX_H03_OtherAxisHome_wait: case StoreMoveStep.BOX_H03_OtherAxisHome_wait:
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H03_OtherAxisHome); MoveInfo.NextMoveStep(StoreMoveStep.BOX_H03_SendOut_01);
if (IOValue(IO_Type.OutDoor_Check).Equals(IO_VALUE.HIGH))
{
CylinderMove(MoveInfo, IO_Type.OutDoor_Down, IO_Type.OutDoor_Up);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.OutDoor_Check, IO_VALUE.LOW));
}
break;
case StoreMoveStep.BOX_H03_SendOut_01:
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H03_SendOut_02);
InOutStoreLog("复位:" + "移动到出料口,旋转轴到P11[" + Config.MiddleAxis_P11 + "],升降轴到P12高点[" + Config.UpDownAxis_P12 + "] ");
MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P11, Config.MiddleAxis_P11_Speed);
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxis_P12, Config.UpDownAxis_P12_Speed);
break;
case StoreMoveStep.BOX_H03_SendOut_02:
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H03_SendOut_03);
InOutStoreLog("复位:" + "进出轴到_P11-出料口取放料点 [" + Config.InOutAxis_P11 + "] ");
InoutAxis.AbsMove(MoveInfo, Config.InOutAxis_P11, Config.InOutAxis_P11_Speed);
break;
case StoreMoveStep.BOX_H03_SendOut_03:
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H03_SendOut_04);
InOutStoreLog("复位:" + "升降轴到_P11-出料口-低点[" + Config.UpDownAxis_P11 + "]");
//ComAxis.AbsMove(MoveInfo, Config.CompAxis_P1, Config.CompAxis_P3_Speed);
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxis_P11, Config.UpDownAxis_P11_Speed);
break;
case StoreMoveStep.BOX_H03_SendOut_04:
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H03_SendOut_05);
InOutStoreLog("复位:" + "进出轴返回P1 [" + Config.InOutAxis_P1 + "], 打开出料口门 ");
InOutBackToP1(Config.InOutAxis_P1);
OutDoorReelType = 2;
CylinderMove(MoveInfo, IO_Type.OutDoor_Down, IO_Type.OutDoor_Up);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.OutDoor_Check, IO_VALUE.LOW));
break;
case StoreMoveStep.BOX_H03_SendOut_05:
if (IOValue(IO_Type.OutDoor_SafeSignal).Equals(IO_VALUE.HIGH))
{
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H03_OtherAxisHome);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
}
break; break;
case StoreMoveStep.BOX_H03_OtherAxisHome: case StoreMoveStep.BOX_H03_OtherAxisHome:
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H04_OtherAxisBack); MoveInfo.NextMoveStep(StoreMoveStep.BOX_H04_OtherAxisBack);
...@@ -260,12 +297,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -260,12 +297,13 @@ namespace OnlineStore.DeviceLibrary
MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P1, Config.MiddleAxis_P1_Speed); MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P1, Config.MiddleAxis_P1_Speed);
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxis_P1, Config.UpDownAxis_P1_Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxis_P1, Config.UpDownAxis_P1_Speed);
ComAxis.AbsMove(MoveInfo, Config.CompAxis_P1, Config.CompAxis_P1_Speed); ComAxis.AbsMove(MoveInfo, Config.CompAxis_P1, Config.CompAxis_P1_Speed);
CylinderMove(MoveInfo, IO_Type.OutDoor_Up, IO_Type.OutDoor_Down);
OutDoorReelType = 0;
break; break;
case StoreMoveStep.BOX_H04_OtherAxisBack: case StoreMoveStep.BOX_H04_OtherAxisBack:
HuichuanLibrary.HCBoardManager.SetAxBacklash(MiddleAxis.Config.GetAxisValue(),Config.MiddleAxis_Reverse_Offset, MiddleAxis.Config.HomeLowSpeed,-1); HuichuanLibrary.HCBoardManager.SetAxBacklash(MiddleAxis.Config.GetAxisValue(),Config.MiddleAxis_Reverse_Offset, MiddleAxis.Config.HomeLowSpeed,-1);
LogInfo(MoveInfo.MoveType + ": 完成"); LogInfo(MoveInfo.MoveType + ": 完成");
MoveEndP(); MoveEndP();
if (IOValue(IO_Type.InDoor_Check).Equals(IO_VALUE.HIGH) && IsDebug.Equals(false)) if (IOValue(IO_Type.InDoor_Check).Equals(IO_VALUE.HIGH) && IsDebug.Equals(false))
{ {
LogInfo("发现入口有无信息料"); LogInfo("发现入口有无信息料");
...@@ -365,6 +403,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -365,6 +403,7 @@ namespace OnlineStore.DeviceLibrary
OutDoorCloseCountDown = 5; OutDoorCloseCountDown = 5;
} }
} }
string lastOutPosID = "";
private void AutoResetProcess() private void AutoResetProcess()
{ {
try try
...@@ -427,12 +466,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -427,12 +466,19 @@ namespace OnlineStore.DeviceLibrary
} }
else if (waitOutStoreList.Count > 0 && noInStore && IsDebug.Equals(false)) else if (waitOutStoreList.Count > 0 && noInStore && IsDebug.Equals(false))
{ {
InOutParam param = null; lock (waitOutStoreList)
bool result = waitOutStoreList.TryDequeue(out param);
if (result && param != null)
{ {
LogInfo("执行排队的出库【" + param.ToStr() + "】"); InOutParam param = null;
StartExecuctOut(param); bool result = waitOutStoreList.TryDequeue(out param);
if (result && param != null)
{
if (lastOutPosID != param.PosID)
{
LogInfo("执行排队的出库【" + param.ToStr() + "】");
}
LogUtil.OutputDebugString(Name + "执行排队的出库【" + param.ToStr() + "】");
StartExecuctOut(param);
}
} }
} }
else if (false && IOValue(IO_Type.InDoor_Check).Equals(IO_VALUE.HIGH) && noInStore && IsDebug.Equals(false)) else if (false && IOValue(IO_Type.InDoor_Check).Equals(IO_VALUE.HIGH) && noInStore && IsDebug.Equals(false))
......
...@@ -96,24 +96,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -96,24 +96,26 @@ namespace OnlineStore.DeviceLibrary
GetOut = true; GetOut = true;
} }
LogInfo(" 启动入库【" + param.ToStr() + "】 "); LogInfo(" 启动入库【" + param.ToStr() + "】 ");
LogInfo( "LoadInoutParam" + JsonHelper.SerializeObject(param.MoveP)); LogInfo("LoadInoutParam" + JsonHelper.SerializeObject(param.MoveP));
if (AutoInout.autoNext || param.WareCode == "#test#") if (AutoInout.autoNext || param.WareCode == "#test#")
{ {
LogInfo(" 循环测试入库, 不做入库验证. "); LogInfo(" 循环测试入库, 不做入库验证. ");
} }
else else
{ {
if (param.InStoreNg) if (param.InStoreNg)
{ {
LogInfo(" NG料送出. "); LogInfo(" NG料送出. ");
GetOut = true; GetOut = true;
} }
else if (!ReviceInStoreCMD(param.PosID, param.PlateH, param.PlateW, param.WareCode)) { else if (!ReviceInStoreCMD(param.PosID, param.PlateH, param.PlateW, param.WareCode))
{
LogInfo(" 入库验证失败送出. "); LogInfo(" 入库验证失败送出. ");
GetOut = true; GetOut = true;
} }
} }
if (GetOut) { if (GetOut)
{
param.TargetPosition = 1; param.TargetPosition = 1;
param.InStoreNg = true; param.InStoreNg = true;
param.MoveP = null; param.MoveP = null;
...@@ -193,20 +195,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -193,20 +195,20 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog(outType + "等待料叉检测信号 "); InOutStoreLog(outType + "等待料叉检测信号 ");
if (Config.IsUse_Tray_Check.Equals(1)) if (Config.IsUse_Tray_Check.Equals(1))
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Fixture_Check, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Fixture_Check, IO_VALUE.HIGH));
} }
else if (MoveInfo.IsStep(StoreMoveStep.SI_06_FixtureCheck)) else if (MoveInfo.IsStep(StoreMoveStep.SI_06_FixtureCheck))
{ {
if (MoveInfo.MoveParam.TargetPosition.Equals(0)) if (MoveInfo.MoveParam.TargetPosition.Equals(0))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SI_06_ToPos); MoveInfo.NextMoveStep(StoreMoveStep.SI_06_ToPos);
InOutStoreLog(outType + "移动到库位点,旋转轴到P2["+ moveP.Middle_P2 + "],升降轴到P3 ["+ moveP.UpDown_P3 + "] "); InOutStoreLog(outType + "移动到库位点,旋转轴到P2[" + moveP.Middle_P2 + "],升降轴到P3 [" + moveP.UpDown_P3 + "] ");
MiddleAxis.AbsMove(MoveInfo, moveP.Middle_P2, Config.MiddleAxis_P2_Speed); MiddleAxis.AbsMove(MoveInfo, moveP.Middle_P2, Config.MiddleAxis_P2_Speed);
UpdownAxis.AbsMove(MoveInfo, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed); UpdownAxis.AbsMove(MoveInfo, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
} }
else else
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SI_21_ToOutDoor); MoveInfo.NextMoveStep(StoreMoveStep.SI_21_ToOutDoor);
InOutStoreLog(outType + "移动到出料口,旋转轴到P11["+ Config.MiddleAxis_P11 + "],升降轴到P12高点["+ Config.UpDownAxis_P12 + "] "); InOutStoreLog(outType + "移动到出料口,旋转轴到P11[" + Config.MiddleAxis_P11 + "],升降轴到P12高点[" + Config.UpDownAxis_P12 + "] ");
MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P11, Config.MiddleAxis_P11_Speed); MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P11, Config.MiddleAxis_P11_Speed);
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxis_P12, Config.UpDownAxis_P12_Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxis_P12, Config.UpDownAxis_P12_Speed);
} }
...@@ -217,13 +219,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -217,13 +219,13 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StoreMoveStep.SI_06_ToPos)) else if (MoveInfo.IsStep(StoreMoveStep.SI_06_ToPos))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SI_07_InoutToP3); MoveInfo.NextMoveStep(StoreMoveStep.SI_07_InoutToP3);
InOutStoreLog(outType + "进出轴到P3 ["+ moveP.InOut_P3 + "] "); InOutStoreLog(outType + "进出轴到P3 [" + moveP.InOut_P3 + "] ");
InoutAxis.AbsMove(MoveInfo, moveP.InOut_P3, Config.InOutAxis_P3_Speed); InoutAxis.AbsMove(MoveInfo, moveP.InOut_P3, Config.InOutAxis_P3_Speed);
} }
else if (MoveInfo.IsStep(StoreMoveStep.SI_07_InoutToP3)) else if (MoveInfo.IsStep(StoreMoveStep.SI_07_InoutToP3))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SI_08_PutReel); MoveInfo.NextMoveStep(StoreMoveStep.SI_08_PutReel);
InOutStoreLog(outType + "升降轴到P4["+ moveP.UpDown_P4 + "],压紧轴到P3["+ moveP.ComPress_P3 + "]"); InOutStoreLog(outType + "升降轴到P4[" + moveP.UpDown_P4 + "],压紧轴到P3[" + moveP.ComPress_P3 + "]");
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态) // 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
string posId = MoveInfo.MoveParam.PosID; string posId = MoveInfo.MoveParam.PosID;
...@@ -240,13 +242,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -240,13 +242,17 @@ namespace OnlineStore.DeviceLibrary
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
OutDoorReelType = 2; OutDoorReelType = 2;
} }
else if (MoveInfo.IsStep( StoreMoveStep.SI_09_InoutToP1)) else if (MoveInfo.IsStep(StoreMoveStep.SI_09_InoutToP1))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SI_10_GoBack); MoveInfo.NextMoveStep(StoreMoveStep.SI_10_GoBack);
InOutStoreLog(outType + "升降轴到P1[" + moveP.UpDown_P1 + "],旋转轴到P1[" + moveP.Middle_P1 + "] ,压紧轴到P1[" + moveP.ComPress_P1 + "],"); InOutStoreLog(outType + "升降轴到P1[" + moveP.UpDown_P1 + "],旋转轴到P1[" + moveP.Middle_P1 + "] ,压紧轴到P1[" + moveP.ComPress_P1 + "],");
//ComAxis.AbsMove(MoveInfo, moveP.ComPress_P1, Config.CompAxis_P1_Speed); //ComAxis.AbsMove(MoveInfo, moveP.ComPress_P1, Config.CompAxis_P1_Speed);
MiddleAxis.AbsMove(MoveInfo, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); MiddleAxis.AbsMove(MoveInfo, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
UpdownAxis.AbsMove(MoveInfo, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); UpdownAxis.AbsMove(MoveInfo, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
InOutStoreLog(outType + "等待料叉检测信号 ");
if (Config.IsUse_Tray_Check.Equals(1))
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Fixture_Check, IO_VALUE.LOW));
} }
else if (MoveInfo.IsStep(StoreMoveStep.SI_10_GoBack)) else if (MoveInfo.IsStep(StoreMoveStep.SI_10_GoBack))
{ {
...@@ -270,14 +276,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -270,14 +276,14 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StoreMoveStep.SI_22_OpenOutDoor)) else if (MoveInfo.IsStep(StoreMoveStep.SI_22_OpenOutDoor))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SI_23_InoutToP11); MoveInfo.NextMoveStep(StoreMoveStep.SI_23_InoutToP11);
InOutStoreLog(outType + "进出轴到_P11-出料口取放料点 ["+ Config.InOutAxis_P11 + "] "); InOutStoreLog(outType + "进出轴到_P11-出料口取放料点 [" + Config.InOutAxis_P11 + "] ");
InoutAxis.AbsMove(MoveInfo, Config.InOutAxis_P11, Config.InOutAxis_P11_Speed); InoutAxis.AbsMove(MoveInfo, Config.InOutAxis_P11, Config.InOutAxis_P11_Speed);
//关闭舱门 //关闭舱门
} }
else if (MoveInfo.IsStep(StoreMoveStep.SI_23_InoutToP11)) else if (MoveInfo.IsStep(StoreMoveStep.SI_23_InoutToP11))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SI_24_PurReel); MoveInfo.NextMoveStep(StoreMoveStep.SI_24_PurReel);
InOutStoreLog(outType + "升降轴到_P11-出料口-低点["+ Config.UpDownAxis_P11 + "],压紧轴到压紧前点P3["+ moveP.ComPress_P3 + "] "); InOutStoreLog(outType + "升降轴到_P11-出料口-低点[" + Config.UpDownAxis_P11 + "],压紧轴到压紧前点P3[" + moveP.ComPress_P3 + "] ");
ComAxis.AbsMove(MoveInfo, moveP.ComPress_P3, Config.CompAxis_P3_Speed); ComAxis.AbsMove(MoveInfo, moveP.ComPress_P3, Config.CompAxis_P3_Speed);
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxis_P11, Config.UpDownAxis_P11_Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxis_P11, Config.UpDownAxis_P11_Speed);
...@@ -285,7 +291,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -285,7 +291,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StoreMoveStep.SI_24_PurReel)) else if (MoveInfo.IsStep(StoreMoveStep.SI_24_PurReel))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SI_25_InoutToP1); MoveInfo.NextMoveStep(StoreMoveStep.SI_25_InoutToP1);
InOutStoreLog(outType + "进出轴返回P1 ["+ moveP.InOut_P1 + "] "); InOutStoreLog(outType + "进出轴返回P1 [" + moveP.InOut_P1 + "] ");
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
if (MoveInfo.MoveParam.InStoreNg) if (MoveInfo.MoveParam.InStoreNg)
OutDoorReelType = 2; OutDoorReelType = 2;
...@@ -333,32 +339,37 @@ namespace OnlineStore.DeviceLibrary ...@@ -333,32 +339,37 @@ namespace OnlineStore.DeviceLibrary
private void StartExecuctOut(InOutParam param) private void StartExecuctOut(InOutParam param)
{ {
bool result = false; bool result = false;
if (StoreManager.Store.CanOut(true) || param.TargetPosition==1) if (param.TargetPosition == 1 || StoreManager.Store.CanOut(true))
{ {
result = StartOutStoreMove(param); result = StartOutStoreMove(param);
} }
if (!result) if (!result)
{ {
lock (waitOutStoreList)
if (lastOutPosID != param.PosID)
{ {
LogInfo(" 执行出库【" + param.ToStr() + "】失败,加入等待队列"); LogInfo(" 执行出库【" + param.ToStr() + "】失败,加入等待队列");
if (MoveInfo.MoveType.Equals(MoveType.OutStore) && MoveInfo.MoveParam.PosID.Equals(param.PosID)) lastOutPosID = param.PosID;
{ }
LogUtil.error(Name + " 出库命令【" + param.ToStr() + "】重复,正在【" + MoveInfo.MoveParam.PosID + "】出库中"); LogUtil.OutputDebugString(Name + " 执行出库【" + param.ToStr() + "】失败,加入等待队列");
return; if (MoveInfo.MoveType.Equals(MoveType.OutStore) && MoveInfo.MoveParam.PosID.Equals(param.PosID))
} {
LogUtil.error(Name + " 出库命令【" + param.ToStr() + "】重复,正在【" + MoveInfo.MoveParam.PosID + "】出库中");
return;
}
List<InOutParam> reviceList = new List<InOutParam>(waitOutStoreList); List<InOutParam> reviceList = new List<InOutParam>(waitOutStoreList);
reviceList = (from m in reviceList where m.PosID.Equals(param.PosID) select m).ToList<InOutParam>(); reviceList = (from m in reviceList where m.PosID.Equals(param.PosID) select m).ToList<InOutParam>();
if (reviceList.Count == 0) if (reviceList.Count == 0)
{ {
waitOutStoreList.Enqueue(param); waitOutStoreList.Enqueue(param);
}
if (IOValue(IO_Type.InDoor_Check).Equals(IO_VALUE.HIGH)){
}
} }
if (IOValue(IO_Type.InDoor_Check).Equals(IO_VALUE.HIGH))
{
}
} }
} }
...@@ -510,34 +521,34 @@ namespace OnlineStore.DeviceLibrary ...@@ -510,34 +521,34 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_06A_02_FixDisk); MoveInfo.NextMoveStep(StoreMoveStep.SO_06A_02_FixDisk);
InOutStoreLog(outType + "[修正]升降轴到P3[" + fixMoveP.UpDown_P3 + "]"); InOutStoreLog(outType + "[修正]升降轴到P3[" + fixMoveP.UpDown_P3 + "]");
UpdownAxis.AbsMove(MoveInfo, fixMoveP.UpDown_P3, Config.UpDownAxis_P4_Speed); UpdownAxis.AbsMove(MoveInfo, fixMoveP.UpDown_P3, Config.UpDownAxis_P4_Speed * 3);
} }
else if (MoveInfo.IsStep(StoreMoveStep.SO_06A_02_FixDisk)) else if (MoveInfo.IsStep(StoreMoveStep.SO_06A_02_FixDisk))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_06A_03_FixDisk); MoveInfo.NextMoveStep(StoreMoveStep.SO_06A_03_FixDisk);
InOutStoreLog(outType + "[修正]进出轴到P3 [" + fixMoveP.InOut_P3 + "] "); InOutStoreLog(outType + "[修正]进出轴到P3 [" + fixMoveP.InOut_P3 + "] ");
InoutAxis.AbsMove(MoveInfo, fixMoveP.InOut_P3, Config.InOutAxis_P3_Speed); InoutAxis.AbsMove(MoveInfo, fixMoveP.InOut_P3, Config.InOutAxis_P3_Speed*3);
} }
else if (MoveInfo.IsStep(StoreMoveStep.SO_06A_03_FixDisk)) else if (MoveInfo.IsStep(StoreMoveStep.SO_06A_03_FixDisk))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_06A_04_FixDisk); MoveInfo.NextMoveStep(StoreMoveStep.SO_06A_04_FixDisk);
InOutStoreLog(outType + "[修正]升降轴到P4[" + fixMoveP.UpDown_P4 + "],压紧轴到P3[" + moveP.ComPress_P3 + "]"); InOutStoreLog(outType + "[修正]升降轴到P4[" + fixMoveP.UpDown_P4 + "],压紧轴到P3[" + moveP.ComPress_P3 + "]");
ComAxis.AbsMove(MoveInfo, fixMoveP.ComPress_P3, Config.CompAxis_P3_Speed); ComAxis.AbsMove(MoveInfo, fixMoveP.ComPress_P3, Config.CompAxis_P3_Speed * 3);
UpdownAxis.AbsMove(MoveInfo, fixMoveP.UpDown_P4, Config.UpDownAxis_P4_Speed); UpdownAxis.AbsMove(MoveInfo, fixMoveP.UpDown_P4, Config.UpDownAxis_P4_Speed * 3);
} }
else if (MoveInfo.IsStep(StoreMoveStep.SO_06A_04_FixDisk)) else if (MoveInfo.IsStep(StoreMoveStep.SO_06A_04_FixDisk))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_06A_05_FixDisk); MoveInfo.NextMoveStep(StoreMoveStep.SO_06A_05_FixDisk);
InOutStoreLog(outType + "[修正]升降轴到P6[" + fixMoveP.UpDown_P6 + "],压紧轴到P2[" + fixMoveP.ComPress_P2 + "]"); InOutStoreLog(outType + "[修正]升降轴到P6[" + fixMoveP.UpDown_P6 + "],压紧轴到P2[" + fixMoveP.ComPress_P2 + "]");
ComAxis.AbsMove(MoveInfo, fixMoveP.ComPress_P2, Config.CompAxis_P2_Speed); ComAxis.AbsMove(MoveInfo, fixMoveP.ComPress_P2, Config.CompAxis_P2_Speed * 3);
UpdownAxis.AbsMove(MoveInfo, fixMoveP.UpDown_P6, Config.UpDownAxis_P6_Speed); UpdownAxis.AbsMove(MoveInfo, fixMoveP.UpDown_P6, Config.UpDownAxis_P6_Speed * 3);
} }
else if (MoveInfo.IsStep(StoreMoveStep.SO_06A_05_FixDisk)) else if (MoveInfo.IsStep(StoreMoveStep.SO_06A_05_FixDisk))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_06A_06_FixDisk); MoveInfo.NextMoveStep(StoreMoveStep.SO_06A_06_FixDisk);
InOutStoreLog(outType + "[修正]进出轴返回P1[" + fixMoveP.InOut_P1 + "]"); InOutStoreLog(outType + "[修正]进出轴返回P1[" + fixMoveP.InOut_P1 + "]");
InOutBackToP1(fixMoveP.InOut_P1); InOutBackToP1(fixMoveP.InOut_P1 * 3);
} }
else if (MoveInfo.IsStep(StoreMoveStep.SO_06A_06_FixDisk)) else if (MoveInfo.IsStep(StoreMoveStep.SO_06A_06_FixDisk))
{ {
...@@ -622,12 +633,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -622,12 +633,12 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsTimeOut(60)) else if (MoveInfo.IsTimeOut(60))
{ {
if (StoreManager.Store.MoveInfo.MoveStep == StoreMoveStep.LI_17_SaveSize) { if (StoreManager.Store.MoveInfo.MoveStep == StoreMoveStep.LI_17_SaveSize) {
InOutStoreLog(outType + " 线体开始入, 将当前滞留盘送往紧急出料口"); InOutStoreLog(outType + " 线体开始入, 将当前滞留盘送往紧急出料口");
MoveInfo.NextMoveStep(StoreMoveStep.SO_14_InoutToP1); MoveInfo.NextMoveStep(StoreMoveStep.SO_14_InoutToP1);
} }
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 等待 提升机构可以取料 超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒"; WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 等待 提升机构可以取料 超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, ID * 1000 + 30); LogUtil.error(WarnMsg, ID * 1000 + 30);
Alarm(AlarmType.IoSingleTimeOut); //Alarm(AlarmType.IoSingleTimeOut);
} }
} }
} }
...@@ -737,6 +748,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -737,6 +748,17 @@ namespace OnlineStore.DeviceLibrary
{ {
if (IOValue(IO_Type.OutDoor_SafeSignal).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.OutDoor_SafeSignal).Equals(IO_VALUE.HIGH))
{ {
StoreManager.putShelfFinished(MoveInfo.MoveParam.PosID, "0", "0", MoveInfo.MoveParam.WareCode);
int gongdan = StoreManager.unfinishedTaskCount(Name, "0");
if (gongdan == 0)
{
InOutStoreLog("单盘出库:工单已结束");
lock (StoreManager.Store)
{
StoreManager.LastVisualRfid = "";
StoreManager.ShelfNeedOut = false;
}
}
MoveInfo.NextMoveStep(StoreMoveStep.SO_27_GoBack); MoveInfo.NextMoveStep(StoreMoveStep.SO_27_GoBack);
InOutStoreLog(outType + "升降轴到P1[" + moveP.UpDown_P1 + "],旋转轴到P1[" + moveP.Middle_P1 + "],压紧轴到P1[" + moveP.ComPress_P1 + "],关闭出料口门"); InOutStoreLog(outType + "升降轴到P1[" + moveP.UpDown_P1 + "],旋转轴到P1[" + moveP.Middle_P1 + "],压紧轴到P1[" + moveP.ComPress_P1 + "],关闭出料口门");
//CylinderMove(MoveInfo, IO_Type.OutDoor_Up, IO_Type.OutDoor_Down); //CylinderMove(MoveInfo, IO_Type.OutDoor_Up, IO_Type.OutDoor_Down);
......
...@@ -97,6 +97,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -97,6 +97,13 @@ namespace OnlineStore.DeviceLibrary
lineOperation.cid = CID; lineOperation.cid = CID;
lineOperation.seq = ConfigAppSettings.nextSeq(); lineOperation.seq = ConfigAppSettings.nextSeq();
lineOperation.status = 1; lineOperation.status = 1;
string cids = "";
foreach (int k in StoreManager.Store.BoxMap.Keys)
{
cids += StoreManager.Store.BoxMap[k].CID + ",";
}
cids = cids.TrimEnd(',');
lineOperation.data.Add("cidGroup", cids);
if (WarnMsg != "") if (WarnMsg != "")
{ {
lineOperation.status = (int)StoreStatus.Warning; lineOperation.status = (int)StoreStatus.Warning;
...@@ -265,21 +272,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -265,21 +272,14 @@ namespace OnlineStore.DeviceLibrary
string[] posIdArray = data[ParamDefine.posId].Split(splitChar); string[] posIdArray = data[ParamDefine.posId].Split(splitChar);
string[] plateWArray = data[ParamDefine.plateW].Split(splitChar); string[] plateWArray = data[ParamDefine.plateW].Split(splitChar);
string[] plateHArray = data[ParamDefine.plateH].Split(splitChar); string[] plateHArray = data[ParamDefine.plateH].Split(splitChar);
if (string.IsNullOrEmpty(StoreManager.LastVisualRfid))
{
StoreManager.LastVisualRfid = data[ParamDefine.rfid];
}
else if (StoreManager.LastVisualRfid != data[ParamDefine.rfid])
{
LogUtil.error(Name + $" 上一个工单还未结束LastVisualRfid={StoreManager.LastVisualRfid}, CurrentVisualRfid={data[ParamDefine.rfid]}");
return;
}
bool urgentReel = FormUtil.GetBoolData(data, ParamDefine.urgentReel); bool urgentReel = FormUtil.GetBoolData(data, ParamDefine.urgentReel);
bool singleOut = FormUtil.GetBoolData(data, ParamDefine.singleOut);
//bool cutReel = FormUtil.GetBoolData(data, ParamDefine.cutReel); //bool cutReel = FormUtil.GetBoolData(data, ParamDefine.cutReel);
//bool smallReel = FormUtil.GetBoolData(data, ParamDefine.smallReel); //bool smallReel = FormUtil.GetBoolData(data, ParamDefine.smallReel);
//string rfid = data.ContainsKey(ParamDefine.rfid) ? data[ParamDefine.rfid] : ""; //string rfid = data.ContainsKey(ParamDefine.rfid) ? data[ParamDefine.rfid] : "";
//int rfidLoc = FormUtil.GetIntData(data, ParamDefine.rfidLoc); //int rfidLoc = FormUtil.GetIntData(data, ParamDefine.rfidLoc);
string barcode = data.ContainsKey(ParamDefine.barcode) ? data[ParamDefine.barcode] : ""; string barcode = data.ContainsKey(ParamDefine.barcode) ? data[ParamDefine.barcode] : "";
//string realRfid = data.ContainsKey(ParamDefine.realRfid) ? data[ParamDefine.realRfid] : ""; //string realRfid = data.ContainsKey(ParamDefine.realRfid) ? data[ParamDefine.realRfid] : "";
//int taskCount = FormUtil.GetIntData(data, ParamDefine.taskCount, 0); //int taskCount = FormUtil.GetIntData(data, ParamDefine.taskCount, 0);
...@@ -289,6 +289,33 @@ namespace OnlineStore.DeviceLibrary ...@@ -289,6 +289,33 @@ namespace OnlineStore.DeviceLibrary
//rfid: 分配的料架RFID //rfid: 分配的料架RFID
//rfidLoc: 料架的架位,值为 - 1时,可以自由分配皮带线, 小料时,架位为1 - 46优先走1 / 2号皮带线,47 - 92优先走3 / 4号皮带线, 70,71,72时只能分配到3 / 4号皮带线; 大料时,架位1 - 6优先走1 / 2号皮带线, 7 - 12优先走3 / 4号皮带线 //rfidLoc: 料架的架位,值为 - 1时,可以自由分配皮带线, 小料时,架位为1 - 46优先走1 / 2号皮带线,47 - 92优先走3 / 4号皮带线, 70,71,72时只能分配到3 / 4号皮带线; 大料时,架位1 - 6优先走1 / 2号皮带线, 7 - 12优先走3 / 4号皮带线
if (!singleOut)
{
lock (StoreManager.Store)
{
string vrfid = data[ParamDefine.rfid];
if (vrfid.IndexOf("-") > 0)
{
vrfid = vrfid.Substring(0, vrfid.IndexOf("-"));
//if (vrfid == "1")
//{
// LogUtil.info(Name + $" 单盘出库,不保存需求单号");
// vrfid = "";
//}
}
if (string.IsNullOrEmpty(StoreManager.LastVisualRfid))
{
StoreManager.LastVisualRfid = vrfid;
LogUtil.info(Name + $" 新需求单号 LastVisualRfid={StoreManager.LastVisualRfid}");
}
else if (StoreManager.LastVisualRfid != vrfid)
{
LogUtil.error(Name + $" 上一个需求单还未结束LastVisualRfid={StoreManager.LastVisualRfid}, CurrentVisualRfid={vrfid}");
StoreManager.ShelfNeedOut = true;
return;
}
}
}
string dataStr = JsonHelper.SerializeObject(data); string dataStr = JsonHelper.SerializeObject(data);
LogUtil.info("收到服务器出库消息:【" + dataStr + "】"); LogUtil.info("收到服务器出库消息:【" + dataStr + "】");
...@@ -298,7 +325,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -298,7 +325,7 @@ namespace OnlineStore.DeviceLibrary
index++; index++;
int plateW =Convert.ToInt32( plateWArray[index]); int plateW =Convert.ToInt32( plateWArray[index]);
int plateH = Convert.ToInt32(plateHArray[index]); int plateH = Convert.ToInt32(plateHArray[index]);
InOutParam inoutParam = new InOutParam(MoveType.OutStore, barcode, posId, plateW, plateH, (urgentReel ? 1 : 0)); InOutParam inoutParam = new InOutParam(MoveType.OutStore, barcode, posId, plateW, plateH, singleOut ? 1 : 0);
//根据发送的posId获取位置列表 //根据发送的posId获取位置列表
ACBoxPosition position = CSVPositionReader<ACBoxPosition>.GetPositon(posId); ACBoxPosition position = CSVPositionReader<ACBoxPosition>.GetPositon(posId);
...@@ -342,7 +369,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -342,7 +369,6 @@ namespace OnlineStore.DeviceLibrary
} }
} }
} }
#endregion #endregion
} }
} }
...@@ -45,6 +45,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -45,6 +45,7 @@ namespace OnlineStore.DeviceLibrary
public AxisBean T4_InOut_Axis = null; public AxisBean T4_InOut_Axis = null;
public bool HasT4Axis = false; public bool HasT4Axis = false;
/// <summary> /// <summary>
/// 轴列表 /// 轴列表
/// </summary> /// </summary>
...@@ -101,9 +102,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -101,9 +102,7 @@ namespace OnlineStore.DeviceLibrary
IOManager.Init(); IOManager.Init();
CodeManager.LoadConfig(); CodeManager.LoadConfig();
CurrShelfNum = ConfigAppSettings.GetValue(Setting_Init.CurrShelfNum);
CurrShelfType = ConfigAppSettings.GetIntValue(Setting_Init.CurrShelfType);
UpdateShelfNum(CurrShelfNum, CurrShelfType);
HasT4Axis = Convert.ToBoolean(ConfigAppSettings.GetValue(Setting_Init.HasT4Axis)); HasT4Axis = Convert.ToBoolean(ConfigAppSettings.GetValue(Setting_Init.HasT4Axis));
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
...@@ -330,6 +329,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -330,6 +329,10 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StoreMoveStep.LR_06_TopDown)) else if (MoveInfo.IsStep(StoreMoveStep.LR_06_TopDown))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LR_07_WaitBox); MoveInfo.NextMoveStep(StoreMoveStep.LR_07_WaitBox);
CurrShelfNum = ConfigAppSettings.GetValue(Setting_Init.CurrShelfNum);
CurrShelfType = ConfigAppSettings.GetIntValue(Setting_Init.CurrShelfType);
UpdateShelfNum(CurrShelfNum, CurrShelfType);
StoreManager.LastVisualRfid = "";
LogUtil.info(Name + "复位 " + MoveInfo.MoveStep + " :等待料仓复位完成"); LogUtil.info(Name + "复位 " + MoveInfo.MoveStep + " :等待料仓复位完成");
} }
else if (MoveInfo.IsStep(StoreMoveStep.LR_07_WaitBox)) else if (MoveInfo.IsStep(StoreMoveStep.LR_07_WaitBox))
...@@ -785,12 +788,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -785,12 +788,12 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.Line_Stop4_Out, IO_VALUE.HIGH, false, 1000); IOMove(IO_Type.Line_Stop4_Out, IO_VALUE.HIGH, false, 1000);
if (WaitIo(IO_Type.Line_OutCheck, IO_VALUE.LOW, 30000, "送出一个料架")) if (WaitIo(IO_Type.Line_OutCheck, IO_VALUE.LOW, 30000, "送出一个料架"))
{ {
LineRun("agvout",15); LineRun("agvout",30);
Task.Delay(5*1000); Task.Delay(10*1000);
AgvClient.SetStatus(StoreManager.Config.AgvOutName, "", Agv.ClientAction.FinishLeave); AgvClient.SetStatus(StoreManager.Config.AgvOutName, "", Agv.ClientAction.FinishLeave);
_ = Task.Run(() => { _ = Task.Run(() => {
Task.Delay(2000); Task.Delay(2000);
AgvClient.SetStatus(StoreManager.Config.AgvInName, "", Agv.ClientAction.None); AgvClient.SetStatus(StoreManager.Config.AgvOutName, "", Agv.ClientAction.None);
}); });
} }
}); });
...@@ -799,13 +802,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -799,13 +802,32 @@ namespace OnlineStore.DeviceLibrary
Agv.ClientShelf AgvNeedInshelf = Agv.ClientShelf.None; Agv.ClientShelf AgvNeedInshelf = Agv.ClientShelf.None;
Agv.ClientShelf AgvNeedOutshelf = Agv.ClientShelf.None; Agv.ClientShelf AgvNeedOutshelf = Agv.ClientShelf.None;
void IOMinoitor() { void IOMinoitor() {
if (IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.LOW) && AgvClient.GetAction(Config.AgvInName) == Agv.ClientAction.None
&& MoveInfo.MoveType.Equals(MoveType.None) && BoxMap[1].waitOutStoreList.Count==0 && BoxMap[2].waitOutStoreList.Count == 0) // bool isLineEmpty = IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.LOW) || IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.LOW);
{ LogUtil.OutputDebugString($"IOMinoitor Line_OutCheck:{IOValue(IO_Type.Line_OutCheck)},Line_WaitCheck:{IOValue(IO_Type.Line_WaitCheck)},MoveType:{MoveInfo.MoveType},Box1Count:{BoxMap[1].waitOutStoreList.Count},Box2Count:{BoxMap[2].waitOutStoreList.Count},{Config.AgvInName}:{AgvClient.GetAction(Config.AgvInName)},{AgvClient.GetShelf(Config.AgvInName)}");
bool boxwaitout = BoxMap[1].MoveInfo.MoveStep == StoreMoveStep.SO_11_GoBack || BoxMap[2].MoveInfo.MoveStep == StoreMoveStep.SO_11_GoBack;
bool boxmovetype = BoxMap[1].MoveInfo.MoveType == MoveType.OutStore || BoxMap[2].MoveInfo.MoveType == MoveType.OutStore;
//有料盘正在舱口等待出库
if (boxwaitout && MoveInfo.MoveType.Equals(MoveType.None)
&& (AgvClient.GetAction(Config.AgvInName) != Agv.ClientAction.NeedEnter || AgvClient.GetShelf(Config.AgvInName)!= Agv.ClientShelf.Empty) )
{
AgvNeedInshelf = Agv.ClientShelf.Empty;
AgvClient.NeedEnter(Config.AgvInName, "", AgvNeedInshelf);
LogUtil.info(Name + "IOMinoitor AgvClient.NeedEnter:" + Config.AgvInName + ",AgvNeedInshelf:" + AgvClient.GetShelf(Config.AgvInName));
}
//线体等待区没有料串,同时没有出库任务
else if (IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.LOW) && AgvClient.GetAction(Config.AgvInName) == Agv.ClientAction.None
&& BoxMap[1].waitOutStoreList.Count == 0 && BoxMap[2].waitOutStoreList.Count == 0 && !boxwaitout && !boxmovetype) //&& MoveInfo.MoveType.Equals(MoveType.None) //线体不在运动中
{
//排除单盘出库任务
//if (BoxMap[1].waitOutStoreList.ToList().Select(x => x.TargetPosition == 0).Count() > 0
// || BoxMap[2].waitOutStoreList.ToList().Select(x => x.TargetPosition == 0).Count() > 0)
//{
AgvNeedInshelf = Agv.ClientShelf.Full; AgvNeedInshelf = Agv.ClientShelf.Full;
AgvClient.NeedEnter(Config.AgvInName,"", AgvNeedInshelf); AgvClient.NeedEnter(Config.AgvInName, "", AgvNeedInshelf);
LogUtil.info(Name + "IOMinoitor AgvClient.NeedEnter" + Config.AgvInName+ ",AgvNeedInshelf:" + AgvNeedInshelf); LogUtil.info(Name + "IOMinoitor AgvClient.NeedEnter:" + Config.AgvInName + ",AgvNeedInshelf:" + AgvNeedInshelf);
//AgvNeedInshelf = Agv.ClientShelf.None; //AgvNeedInshelf = Agv.ClientShelf.None;
// }
} }
if (IOValue(IO_Type.Line_OutCheck).Equals(IO_VALUE.HIGH) && AgvClient.GetAction(Config.AgvOutName) == Agv.ClientAction.None) if (IOValue(IO_Type.Line_OutCheck).Equals(IO_VALUE.HIGH) && AgvClient.GetAction(Config.AgvOutName) == Agv.ClientAction.None)
{ {
...@@ -845,7 +867,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -845,7 +867,7 @@ namespace OnlineStore.DeviceLibrary
) )
{ {
LineRun("releashelf", 4); LineRun("releashelf", 4);
IOMove(IO_Type.Line_Stop2_Work, IO_VALUE.HIGH, false, 2000); IOMove(IO_Type.Line_Stop2_Work, IO_VALUE.HIGH, false, 1000);
LogUtil.info(Name + "料串手动出库, 工作区放行"); LogUtil.info(Name + "料串手动出库, 工作区放行");
return true; return true;
} }
...@@ -865,22 +887,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -865,22 +887,22 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
public void LineRun(StoreMoveInfo move=null ) public void LineRun(StoreMoveInfo move=null, string parentname="")
{ {
if (move != null) if (move != null)
{ {
move.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Line_Run, IO_VALUE.HIGH)); move.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Line_Run, IO_VALUE.HIGH));
} }
LineRun("n", 999); LineRun("n", 999, parentname);
} }
public void LineStop(StoreMoveInfo move=null ) public void LineStop(StoreMoveInfo move=null, string parentname = "")
{ {
if (move != null) if (move != null)
{ {
move.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Line_Run, IO_VALUE.LOW)); move.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Line_Run, IO_VALUE.LOW));
} }
LineStop("n"); LineStop("n", parentname);
} }
public void OpenGate(StoreMoveInfo move = null) { public void OpenGate(StoreMoveInfo move = null) {
......
...@@ -14,7 +14,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -14,7 +14,6 @@ namespace OnlineStore.DeviceLibrary
Timer lineTimer = null; Timer lineTimer = null;
Dictionary<string, DateTime> linrunlist = new Dictionary<string, DateTime>(); Dictionary<string, DateTime> linrunlist = new Dictionary<string, DateTime>();
void LineInit() { void LineInit() {
if (lineTimer == null) { if (lineTimer == null) {
lineTimer = new Timer(300); lineTimer = new Timer(300);
...@@ -26,8 +25,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -26,8 +25,14 @@ namespace OnlineStore.DeviceLibrary
private void LineTimer_Elapsed(object sender, ElapsedEventArgs e) private void LineTimer_Elapsed(object sender, ElapsedEventArgs e)
{ {
if (canStopLine(out _)) lock (linrunlist)
IOMove(IO_Type.Line_Run, IO_VALUE.LOW); {
if (canStopLine(out _) && IOValue(IO_Type.Line_Run).Equals(IO_VALUE.HIGH))
{
IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
LogUtil.info(Name + $" 线体管理器 停止线体.");
}
}
} }
...@@ -36,12 +41,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -36,12 +41,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
/// <param name="id">需求方标识</param> /// <param name="id">需求方标识</param>
/// <param name="seconds">秒数</param> /// <param name="seconds">秒数</param>
void LineRun(string id, int seconds) { void LineRun(string id, int seconds, string parentname="") {
LineInit(); LineInit();
IOMove(IO_Type.Line_Run, IO_VALUE.HIGH); IOMove(IO_Type.Line_Run, IO_VALUE.HIGH);
lock (linrunlist) lock (linrunlist)
{ {
IOMove(IO_Type.Line_Run, IO_VALUE.HIGH);
if (!string.IsNullOrEmpty(id) && seconds > 0) if (!string.IsNullOrEmpty(id) && seconds > 0)
{ {
if (linrunlist.ContainsKey(id)) if (linrunlist.ContainsKey(id))
...@@ -50,18 +56,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -50,18 +56,18 @@ namespace OnlineStore.DeviceLibrary
{ {
linrunlist.Add(id, DateTime.Now.AddSeconds(seconds)); linrunlist.Add(id, DateTime.Now.AddSeconds(seconds));
} }
LogUtil.info(Name + $" {id} 请求链条运行 {seconds}秒."); LogUtil.info(Name + $" 线体管理器 {id},{parentname} 请求链条运行 {seconds}秒.");
} }
} }
} }
void LineStop(string id = "") { void LineStop(string id = "", string parentname = "") {
lock (linrunlist) lock (linrunlist)
{ {
if (!string.IsNullOrEmpty(id)) if (!string.IsNullOrEmpty(id))
{ {
if (linrunlist.ContainsKey(id)) if (linrunlist.ContainsKey(id))
linrunlist.Remove(id); linrunlist.Remove(id);
LogUtil.info(Name + $" {id} 请求立刻停止线体."); LogUtil.info(Name + $" 线体管理器 {id},{parentname} 请求立刻停止线体.");
} }
} }
if (!canStopLine(out string msg)) if (!canStopLine(out string msg))
...@@ -78,11 +84,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -78,11 +84,11 @@ namespace OnlineStore.DeviceLibrary
if (x.Value > DateTime.Now) if (x.Value > DateTime.Now)
{ {
canStop = false; canStop = false;
msg = Name + $" {x.Key} 不允许停止线体 需求停止时间 {x.Value.ToString()}."; msg = Name + $" 线体管理器 {x.Key} 不允许停止线体 需求停止时间 {x.Value.ToString()}.";
//LogUtil.info(Name + $" {x.Key} 不允许停止线体 需求停止时间 {x.Value.ToString()}."); //LogUtil.info(Name + $" {x.Key} 不允许停止线体 需求停止时间 {x.Value.ToString()}.");
} }
else { else {
LogUtil.info(Name + $" {x.Key} 请求时间已过期,删除."); LogUtil.info(Name + $" 线体管理器 {x.Key} 请求时间已过期,删除.");
linrunlist.Remove(x.Key); linrunlist.Remove(x.Key);
} }
......
...@@ -25,17 +25,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -25,17 +25,21 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
/// <param name="num">料架编号</param> /// <param name="num">料架编号</param>
/// <param name="type">料架类型,0=空料架,1=入库料架,2=出库料架</param> /// <param name="type">料架类型,0=空料架,1=入库料架,2=出库料架</param>
private void UpdateShelfNum(string num,int type) private void UpdateShelfNum(string num, int type)
{ {
CurrShelfNum = num; CurrShelfNum = num;
ConfigAppSettings.SaveValue(Setting_Init.CurrShelfNum, num);
CurrShelfType = type; CurrShelfType = type;
ConfigAppSettings.SaveValue(Setting_Init.CurrShelfType, type); ConfigAppSettings.SaveValue(Setting_Init.CurrShelfType, type);
ConfigAppSettings.SaveValue(Setting_Init.CurrShelfNum, num);
if (type.Equals(0) || type.Equals(1)) if (type.Equals(0) || type.Equals(1))
{ {
outStoreCount = 0; outStoreCount = 0;
} }
LogUtil.info(Name + "更新料架信息:【" + CurrShelfNum + "】【" + CurrShelfType + "】"); LogUtil.info(Name + $"更新料架信息:【" + CurrShelfNum + "】【" + CurrShelfType + "】");
} }
protected override bool CheckWaitResult(StoreMoveInfo moveInfo, WaitResultInfo wait) protected override bool CheckWaitResult(StoreMoveInfo moveInfo, WaitResultInfo wait)
...@@ -92,6 +96,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -92,6 +96,9 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
LogUtil.OutputDebugString($"CanOut MoveType:{MoveInfo.MoveType},IsStart:{IsStart},Line_WaitCheck:{IOValue(IO_Type.Line_WaitCheck)},{Config.AgvInName}:{AgvClient.GetAction(Config.AgvInName)},{AgvClient.GetShelf(Config.AgvInName)}");
if (MoveInfo.MoveType.Equals(MoveType.OutStore)) if (MoveInfo.MoveType.Equals(MoveType.OutStore))
{ {
return true; return true;
...@@ -113,7 +120,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -113,7 +120,8 @@ namespace OnlineStore.DeviceLibrary
} }
} }
} }
if (IsStart && IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.LOW) && (AgvClient.GetAction(Config.AgvInName) == Agv.ClientAction.None || AgvClient.GetAction(Config.AgvInName) == Agv.ClientAction.NeedEnter) && AgvClient.GetShelf(Config.AgvInName) != Agv.ClientShelf.Empty) bool isLineEmpty = IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.LOW);
if (IsStart && isLineEmpty && (AgvClient.GetAction(Config.AgvInName) == Agv.ClientAction.None || AgvClient.GetAction(Config.AgvInName) == Agv.ClientAction.NeedEnter) && AgvClient.GetShelf(Config.AgvInName) != Agv.ClientShelf.Empty)
{ {
AgvNeedInshelf= Agv.ClientShelf.Empty; AgvNeedInshelf= Agv.ClientShelf.Empty;
AgvClient.SetToNone(Config.AgvInName); AgvClient.SetToNone(Config.AgvInName);
...@@ -161,6 +169,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -161,6 +169,7 @@ namespace OnlineStore.DeviceLibrary
} }
public bool StartTrayOut(InOutParam outParam) public bool StartTrayOut(InOutParam outParam)
{ {
if (outParam == null || outParam.PosID == null || outParam.PosID.Equals("")) if (outParam == null || outParam.PosID == null || outParam.PosID.Equals(""))
{ {
LogUtil.error(Name + " StartTrayOut 出库失败,参数不完整:"); LogUtil.error(Name + " StartTrayOut 出库失败,参数不完整:");
...@@ -168,36 +177,39 @@ namespace OnlineStore.DeviceLibrary ...@@ -168,36 +177,39 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
bool rightTrayHas15 = false; bool rightTrayHas15 = false;
if (outParam.TargetBox==1 && IOManager.IOValue(IO_Type.InDoor_Check, 2).Equals(IO_VALUE.HIGH) && BoxMap[2].MoveInfo.MoveParam!=null && BoxMap[2].MoveInfo.MoveParam.PlateW==15) if (outParam.TargetBox == 1 && IOManager.IOValue(IO_Type.InDoor_Check, 2).Equals(IO_VALUE.HIGH) && BoxMap[2].MoveInfo.MoveParam != null && BoxMap[2].MoveInfo.MoveParam.PlateW == 15)
{ {
rightTrayHas15 = true; rightTrayHas15 = true;
LogUtil.error(Name + "StartTrayOut 左侧出库,但右侧料架存在15村盘"); LogUtil.error(Name + "StartTrayOut 左侧出库,但右侧料架存在15村盘");
} }
//MoveInfo.NextMoveStep(StoreMoveStep.LO_11_BatchAxisDown); //MoveInfo.NextMoveStep(StoreMoveStep.LO_11_BatchAxisDown);
//InOutStoreLog("取料:批量轴下降指定的高度"); //InOutStoreLog("取料:批量轴下降指定的高度");
if (MoveInfo.MoveType.Equals(MoveType.OutStore) && MoveInfo.MoveStep.Equals(StoreMoveStep.LO_09_WaitOut) && !rightTrayHas15) lock (worklock)
{
MoveInfo.NewMove(MoveType.OutStore, outParam);
//可以开始出库啦
MoveInfo.NextMoveStep(StoreMoveStep.LO_11_BatchAxisDown);
int height = outParam.PlateH + 4;
if (outParam.PlateH >= 24)
height += 6;
int targetPosition = T1_BatchAxis.GetAclPosition() - height * Config.BatchAxis_ChangeValue;
if (targetPosition < Config.BatchAxis_P1)
{
targetPosition = Config.BatchAxis_P1;
}
InOutStoreLog(" StartTrayOut 出库移栽:" + outParam.ToStr() + " 提升伺服下降" + height + "mm,目标:" + targetPosition);
T1_BatchAxis.AbsMove(null, targetPosition, Config.BatchAxis_P2Speed);
outStoreCount++;
StoreManager.putShelfFinished(outParam.PosID, CurrShelfNum, outStoreCount.ToString(), outParam.WareCode);
return true;
}
else
{ {
LogUtil.error(Name + "StartTrayOut 出库" + outParam.ToStr() + "失败,未准备好料架"); if (MoveInfo.MoveType.Equals(MoveType.OutStore) && MoveInfo.MoveStep.Equals(StoreMoveStep.LO_09_WaitOut) && !rightTrayHas15)
return false; {
MoveInfo.NewMove(MoveType.OutStore, outParam);
//可以开始出库啦
MoveInfo.NextMoveStep(StoreMoveStep.LO_11_BatchAxisDown);
int height = outParam.PlateH + 4;
if (outParam.PlateH >= 24)
height += 6;
int targetPosition = T1_BatchAxis.GetAclPosition() - height * Config.BatchAxis_ChangeValue;
if (targetPosition < Config.BatchAxis_P1)
{
targetPosition = Config.BatchAxis_P1;
}
InOutStoreLog(" StartTrayOut 出库移栽:" + outParam.ToStr() + " 提升伺服下降" + height + "mm,目标:" + targetPosition);
T1_BatchAxis.AbsMove(null, targetPosition, Config.BatchAxis_P2Speed);
outStoreCount++;
StoreManager.putShelfFinished(outParam.PosID, CurrShelfNum, outStoreCount.ToString(), outParam.WareCode);
return true;
}
else
{
LogUtil.error(Name + "StartTrayOut 出库" + outParam.ToStr() + "失败,未准备好料架");
return false;
}
} }
} }
...@@ -220,6 +232,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -220,6 +232,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.LO_06_TopUp); MoveInfo.NextMoveStep(StoreMoveStep.LO_06_TopUp);
InOutStoreLog("料架出库: 提升机构上升"); InOutStoreLog("料架出库: 提升机构上升");
InOutStation_RasieUp(); InOutStation_RasieUp();
OpenGate(MoveInfo);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LO_06_TopUp)) else if (MoveInfo.IsStep(StoreMoveStep.LO_06_TopUp))
{ {
...@@ -242,6 +255,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -242,6 +255,7 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog("料架出库:上料轴开始慢速上升到P2点[" + Config.BatchAxis_P2 + "],等待检测到料盘"); InOutStoreLog("料架出库:上料轴开始慢速上升到P2点[" + Config.BatchAxis_P2 + "],等待检测到料盘");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
BatchAxisToP2(true); BatchAxisToP2(true);
//CloseGate(MoveInfo);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LO_08_AxisUpToP2)) else if (MoveInfo.IsStep(StoreMoveStep.LO_08_AxisUpToP2))
{ {
...@@ -259,14 +273,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -259,14 +273,20 @@ namespace OnlineStore.DeviceLibrary
//} //}
//else //else
{ {
if (outStoreCount ==0 || StoreManager.unfinishedTaskCount(Name, CurrShelfNum) > 0) int xuqiudan = StoreManager.unfinishedTaskCount(Name, CurrShelfNum);
if (outStoreCount == 0 || (xuqiudan > 0))// && !StoreManager.ShelfNeedOut))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LO_09_WaitOut); MoveInfo.NextMoveStep(StoreMoveStep.LO_09_WaitOut);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000));
} }
else { else
{
InOutStoreLog("料架出库:工单已结束,已出库盘数[" + outStoreCount + "],开始送出料架"); InOutStoreLog("料架出库:工单已结束,已出库盘数[" + outStoreCount + "],开始送出料架");
StoreManager.LastVisualRfid = ""; lock (StoreManager.Store)
{
StoreManager.ShelfNeedOut = false;
StoreManager.LastVisualRfid = "";
}
outStoreCount = 0; outStoreCount = 0;
LO_31_BatchAxisToP1(); LO_31_BatchAxisToP1();
} }
...@@ -287,7 +307,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -287,7 +307,7 @@ namespace OnlineStore.DeviceLibrary
waitRightLeave = true; waitRightLeave = true;
} }
*/ */
UpdateShelfNum(CurrShelfNum, 2);
if (MoveInfo.MoveParam.TargetBox.Equals(1)) if (MoveInfo.MoveParam.TargetBox.Equals(1))
{ {
InOutStoreLog("取料, BOX1 升降轴到料门口高点[" + Config.UpdownAxis_P4 + "],旋转轴到料仓门口 P2 [" + Config.MiddleAxis_P2 + "]"); InOutStoreLog("取料, BOX1 升降轴到料门口高点[" + Config.UpdownAxis_P4 + "],旋转轴到料仓门口 P2 [" + Config.MiddleAxis_P2 + "]");
...@@ -304,7 +324,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -304,7 +324,8 @@ namespace OnlineStore.DeviceLibrary
if (HasT4Axis) if (HasT4Axis)
T4_InOut_Axis.AbsMove(MoveInfo, Config.InOutAxis_P1, Config.InOutAxis_P3Speed); T4_InOut_Axis.AbsMove(MoveInfo, Config.InOutAxis_P1, Config.InOutAxis_P3Speed);
} }
}else if (MoveInfo.IsStep(StoreMoveStep.LO_12a_ToBoxDoor)) }
else if (MoveInfo.IsStep(StoreMoveStep.LO_12a_ToBoxDoor))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LO_12_ToBoxDoor); MoveInfo.NextMoveStep(StoreMoveStep.LO_12_ToBoxDoor);
if (HasT4Axis) if (HasT4Axis)
...@@ -340,6 +361,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -340,6 +361,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.LO_14_CylinderTighten); MoveInfo.NextMoveStep(StoreMoveStep.LO_14_CylinderTighten);
InOutStoreLog("取料:夹爪气缸夹紧"); InOutStoreLog("取料:夹爪气缸夹紧");
electricClamp.Clamp(null, MoveInfo.MoveParam.PlateW); electricClamp.Clamp(null, MoveInfo.MoveParam.PlateW);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1500));
} }
else if (MoveInfo.IsStep(StoreMoveStep.LO_14_CylinderTighten)) else if (MoveInfo.IsStep(StoreMoveStep.LO_14_CylinderTighten))
{ {
...@@ -406,15 +428,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -406,15 +428,21 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(StoreMoveStep.LO_19_CylinderRelax)) else if (MoveInfo.IsStep(StoreMoveStep.LO_19_CylinderRelax))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LO_20_UpdownUp); MoveInfo.NextMoveStep(StoreMoveStep.LO_20_BatchAxisToP2);
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P2, Config.UpdownAxis_P2Speed); T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P2, Config.UpdownAxis_P2Speed);
InOutStoreLog("料盘移栽: 升降轴上升到P2");
}
else if (MoveInfo.IsStep(StoreMoveStep.LO_20_BatchAxisToP2))
{
MoveInfo.NextMoveStep(StoreMoveStep.LO_20_UpdownUp);
//只有提升轴位置过低时才需要到P3 //只有提升轴位置过低时才需要到P3
int currPosition = T1_BatchAxis.GetAclPosition(); int currPosition = T1_BatchAxis.GetAclPosition();
if (currPosition <= (Config.BatchAxis_P1 + Config.BatchAxis_ChangeValue * 40)) int reoppos = (Config.BatchAxis_P1 + Config.BatchAxis_ChangeValue * 120);
InOutStoreLog($"料盘移栽: 当前T1位置[{currPosition}],最低需要重新上升位置:[{reoppos}]");
if (currPosition <= reoppos)
{ {
InOutStoreLog("料盘移栽: 升降轴到料串高点[" + Config.UpdownAxis_P2 + "],提升轴[" + currPosition + "]需要到P2"); MoveInfo.NextMoveStep(StoreMoveStep.LO_20_UpdownUp_wait);
InOutStoreLog("料盘移栽: 升降轴到料串高点[" + Config.UpdownAxis_P2 + "],提升轴[" + currPosition + $"]需要到P2");
BatchAxisToP2(); BatchAxisToP2();
} }
else else
...@@ -422,6 +450,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -422,6 +450,13 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog("料盘移栽: 升降轴到料串高点[" + Config.UpdownAxis_P2 + "],提升轴[" + currPosition + "]不需要到P2"); InOutStoreLog("料盘移栽: 升降轴到料串高点[" + Config.UpdownAxis_P2 + "],提升轴[" + currPosition + "]不需要到P2");
} }
} }
else if (MoveInfo.IsStep(StoreMoveStep.LO_20_UpdownUp_wait))
{
MoveInfo.NextMoveStep(StoreMoveStep.LO_20_UpdownUp);
int currPosition = T1_BatchAxis.GetAclPosition();
int targetP2 = currPosition - Config.BatchAxis_ChangeValue * 20;
T1_BatchAxis.AbsMove(MoveInfo, targetP2, Config.BatchAxis_P1);
}
else if (MoveInfo.IsStep(StoreMoveStep.LO_20_UpdownUp)) else if (MoveInfo.IsStep(StoreMoveStep.LO_20_UpdownUp))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LO_21_NeedSendShelf); MoveInfo.NextMoveStep(StoreMoveStep.LO_21_NeedSendShelf);
...@@ -432,11 +467,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -432,11 +467,10 @@ namespace OnlineStore.DeviceLibrary
T4_InOut_Axis.AbsMove(MoveInfo, Config.InOutAxis_P1, Config.InOutAxis_P1Speed); T4_InOut_Axis.AbsMove(MoveInfo, Config.InOutAxis_P1, Config.InOutAxis_P1Speed);
int currPositon = T1_BatchAxis.GetAclPosition(); int currPositon = T1_BatchAxis.GetAclPosition();
int tp = currPositon - Config.BatchAxis_ChangeValue * 80; int tp = currPositon - Config.BatchAxis_ChangeValue * 60;
if (tp <= Config.BatchAxis_P1) if (tp <= Config.BatchAxis_P1)
{ {
LO_31_BatchAxisToP1(" 提升轴位置:" + currPositon + ",料架已满,需要送出料架"); LO_31_BatchAxisToP1(" 提升轴位置:" + currPositon + ",料架已满,需要送出料架");
} }
else else
{ {
...@@ -454,6 +488,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -454,6 +488,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.LO_32_RaiseStationBack); MoveInfo.NextMoveStep(StoreMoveStep.LO_32_RaiseStationBack);
InOutStoreLog("送出料架:升降盘定位气缸后退"); InOutStoreLog("送出料架:升降盘定位气缸后退");
InOutStation_LocationDown(); InOutStation_LocationDown();
InOutStation_RasieUp();
OpenGate(MoveInfo);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LO_32_RaiseStationBack)) else if (MoveInfo.IsStep(StoreMoveStep.LO_32_RaiseStationBack))
{ {
...@@ -473,7 +509,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -473,7 +509,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.LO_33_TopCylinderDown); MoveInfo.NextMoveStep(StoreMoveStep.LO_33_TopCylinderDown);
InOutStoreLog("送出料架:顶升气缸下降"); InOutStoreLog("送出料架:顶升气缸下降");
CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down); InOutStation_RasieDown();
CloseGate(MoveInfo);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LO_33_TopCylinderDown)) else if (MoveInfo.IsStep(StoreMoveStep.LO_33_TopCylinderDown))
{ {
...@@ -489,14 +526,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -489,14 +526,15 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.LO_35_WaitShelfGo); MoveInfo.NextMoveStep(StoreMoveStep.LO_35_WaitShelfGo);
InOutStoreLog("送出料架:上料阻挡下降2秒,等待上料无料架"); InOutStoreLog("送出料架:上料阻挡下降2秒,等待上料无料架");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1500)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1500));
IOMove(IO_Type.Line_Stop2_Work, IO_VALUE.HIGH, false, 2000); IOMove(IO_Type.Line_Stop2_Work, IO_VALUE.HIGH, false, 1000);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Line_WorkCheck, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Line_WorkCheck, IO_VALUE.LOW));
} }
else if (MoveInfo.IsStep(StoreMoveStep.LO_35_WaitShelfGo)) else if (MoveInfo.IsStep(StoreMoveStep.LO_35_WaitShelfGo))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LO_36_LineRun); MoveInfo.NextMoveStep(StoreMoveStep.LO_36_LineRun);
InOutStoreLog("送出料架:流水线再转动3秒"); AgvNeedOutshelf = Agv.ClientShelf.Full;
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3500)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3500));
InOutStoreLog($"送出料架:流水线再转动3秒 AgvNeedOutshelf:{AgvNeedOutshelf}");
LineRun(MoveInfo); LineRun(MoveInfo);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Line_OutCheck, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Line_OutCheck, IO_VALUE.HIGH));
} }
...@@ -505,8 +543,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -505,8 +543,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.LO_37_LineStop); MoveInfo.NextMoveStep(StoreMoveStep.LO_37_LineStop);
//var rfiddevice = RFIDManager.GetShelfId(Config.Out_Rfid_IP); //var rfiddevice = RFIDManager.GetShelfId(Config.Out_Rfid_IP);
//var rfid = rfiddevice.NumStr(); //var rfid = rfiddevice.NumStr();
AgvNeedOutshelf = Agv.ClientShelf.Full; //AgvNeedOutshelf = Agv.ClientShelf.Full;
InOutStoreLog($"送出料架:流水线停止转动 AgvNeedOutshelf:{AgvNeedOutshelf}"); InOutStoreLog($"送出料架:流水线停止转动");
LineStop(MoveInfo); LineStop(MoveInfo);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LO_37_LineStop)) else if (MoveInfo.IsStep(StoreMoveStep.LO_37_LineStop))
...@@ -586,9 +624,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -586,9 +624,10 @@ namespace OnlineStore.DeviceLibrary
{ {
InOutStoreLog("检测到入口(X03-Line_InCheck)有料"); InOutStoreLog("检测到入口(X03-Line_InCheck)有料");
InShelfInProcess = true; InShelfInProcess = true;
LineRun(null); LineRun("ShelfEnterProcess",999);
Thread.Sleep(1000 * 20);
//等待进料检测信号 //等待进料检测信号
//bool result = WaitIo(IO_Type.Line_InCheck, IO_VALUE.LOW, 10000); result = WaitIo(IO_Type.Line_InCheck, IO_VALUE.LOW, 10000);
result = WaitIo(IO_Type.Line_WaitCheck, IO_VALUE.HIGH, 50000); result = WaitIo(IO_Type.Line_WaitCheck, IO_VALUE.HIGH, 50000);
} }
catch (Exception ex) catch (Exception ex)
...@@ -598,7 +637,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -598,7 +637,7 @@ namespace OnlineStore.DeviceLibrary
finally finally
{ {
InShelfInProcess = false; InShelfInProcess = false;
LineStop("n"); LineStop("ShelfEnterProcess");
} }
return result; return result;
})); }));
...@@ -621,14 +660,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -621,14 +660,15 @@ namespace OnlineStore.DeviceLibrary
//UpdateShelfNum(GetShelfNum(), 1); //UpdateShelfNum(GetShelfNum(), 1);
if (IOValue(IO_Type.Line_WorkCheck).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.Line_WorkCheck).Equals(IO_VALUE.HIGH))
{ {
InOutStoreLog($"入料检测: 上料工作区有料架1 ,阻挡1下降2000,阻挡2上升,流水线转动 ,等待料架到达上料区,CurrShelfType:{CurrShelfType}");
L_05_WaitTime(StoreMoveStep.LI_05_WaitTime); L_05_WaitTime(StoreMoveStep.LI_05_WaitTime);
} }
else if (IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.HIGH)) else if (IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.HIGH))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LI_05_WaitTime); MoveInfo.NextMoveStep(StoreMoveStep.LI_05_WaitTime);
InOutStoreLog("入料检测: 上料等待区有料架 ,阻挡1下降2000,阻挡2上升,流水线转动 ,等待料架到达上料区"); InOutStoreLog($"入料检测: 上料等待区有料架2 ,阻挡1下降2000,阻挡2上升,流水线转动 ,等待料架到达上料区,CurrShelfType:{CurrShelfType}");
IOMove(IO_Type.Line_Stop1_Wait, IO_VALUE.HIGH, false, 2000);//进料阻挡下降 IOMove(IO_Type.Line_Stop1_Wait, IO_VALUE.HIGH, false, 1000);//进料阻挡下降
IOMove(IO_Type.Line_Stop2_Work, IO_VALUE.LOW);//缓冲阻挡前进1000 IOMove(IO_Type.Line_Stop2_Work, IO_VALUE.LOW);//缓冲阻挡前进1000
LineRun(MoveInfo); LineRun(MoveInfo);
//等待指定时间 //等待指定时间
...@@ -639,7 +679,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -639,7 +679,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (!InShelfInProcess) if (!InShelfInProcess)
{ {
LineStop("n"); LineStop("n", "LI_04_LineStart");
} }
MoveEndP(); MoveEndP();
...@@ -656,13 +696,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -656,13 +696,14 @@ namespace OnlineStore.DeviceLibrary
{ {
if (IOValue(IO_Type.Line_WorkCheck).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.Line_WorkCheck).Equals(IO_VALUE.HIGH))
{ {
InOutStoreLog($"StartInStoreMove CurrShelfNum:{CurrShelfNum},CurrShelfType={CurrShelfType}");
runStatus = StoreRunStatus.Busy; runStatus = StoreRunStatus.Busy;
storeStatus = StoreStatus.InStoreExecute; storeStatus = StoreStatus.InStoreExecute;
MoveInfo.NewMove(MoveType.InStore, new InOutParam(MoveType.InStore)); MoveInfo.NewMove(MoveType.InStore, new InOutParam(MoveType.InStore));
L_05_WaitTime(StoreMoveStep.LI_05_WaitTime); L_05_WaitTime(StoreMoveStep.LI_05_WaitTime);
return true; return true;
//InOutStoreLog($"CurrShelfNum:{CurrShelfNum},CurrShelfType={CurrShelfType}");
} }
else { else {
runStatus = StoreRunStatus.Busy; runStatus = StoreRunStatus.Busy;
...@@ -671,6 +712,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -671,6 +712,14 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.LI_06_TopUp); MoveInfo.NextMoveStep(StoreMoveStep.LI_06_TopUp);
return true; return true;
} }
} else if (CurrShelfType==2)
{
//runStatus = StoreRunStatus.Busy;
//storeStatus = StoreStatus.OutStoreExecute;
//MoveInfo.NewMove(MoveType.OutStore, new InOutParam(MoveType.OutStore));
StartOutStoreMove(new InOutParam(MoveType.OutStore));
//先将当前料架送出
//LO_31_BatchAxisToP1();
} }
else if (IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.HIGH)) else if (IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.HIGH))
{ {
...@@ -747,6 +796,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -747,6 +796,7 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog("入料检测:链条停止转动, 进出机构上升"); InOutStoreLog("入料检测:链条停止转动, 进出机构上升");
LineStop(MoveInfo); LineStop(MoveInfo);
InOutStation_RasieUp(); InOutStation_RasieUp();
OpenGate(MoveInfo);
CurrShelfNum = ConfigAppSettings.GetValue(Setting_Init.CurrShelfNum); CurrShelfNum = ConfigAppSettings.GetValue(Setting_Init.CurrShelfNum);
CurrShelfType = ConfigAppSettings.GetIntValue(Setting_Init.CurrShelfType); CurrShelfType = ConfigAppSettings.GetIntValue(Setting_Init.CurrShelfType);
var rfiddevice = RFIDManager.GetShelfId(Config.In_Rfid_IP); var rfiddevice = RFIDManager.GetShelfId(Config.In_Rfid_IP);
...@@ -778,6 +828,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -778,6 +828,7 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog("入料检测:定位销上升"); InOutStoreLog("入料检测:定位销上升");
InOutStation_LocationUp(); InOutStation_LocationUp();
InOutStation_Stop(); InOutStation_Stop();
//CloseGate(MoveInfo);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LI_07_HoisterForward_2)) else if (MoveInfo.IsStep(StoreMoveStep.LI_07_HoisterForward_2))
{ {
...@@ -826,6 +877,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -826,6 +877,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.LI_13_CylinderTighten); MoveInfo.NextMoveStep(StoreMoveStep.LI_13_CylinderTighten);
InOutStoreLog("取料:夹爪气缸夹紧"); InOutStoreLog("取料:夹爪气缸夹紧");
electricClamp.Clamp(null); electricClamp.Clamp(null);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1500));
} }
else if (MoveInfo.IsStep(StoreMoveStep.LI_13_CylinderTighten)) else if (MoveInfo.IsStep(StoreMoveStep.LI_13_CylinderTighten))
{ {
...@@ -837,6 +889,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -837,6 +889,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LI_15_WaitNoCheck); MoveInfo.NextMoveStep(StoreMoveStep.LI_15_WaitNoCheck);
InOutStoreLog("取料:等待没有提升机构料盘检测"); InOutStoreLog("取料:等待没有提升机构料盘检测");
InOutStoreLog($"取料:夹爪状态 IsPushEmpty:{!electricClamp.IsClamp},IsReached:{!electricClamp.IsBusy}");
if (Math.Abs(T1_BatchAxis.GetAclPosition() - Config.BatchAxis_P2) > T1_BatchAxis.Config.CanErrorCountMin) if (Math.Abs(T1_BatchAxis.GetAclPosition() - Config.BatchAxis_P2) > T1_BatchAxis.Config.CanErrorCountMin)
{ {
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.BatchAxis_Check, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.BatchAxis_Check, IO_VALUE.LOW));
...@@ -856,6 +909,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -856,6 +909,7 @@ namespace OnlineStore.DeviceLibrary
//if (LastWidth == 13) //if (LastWidth == 13)
// electricClamp.Clamp(null,15); // electricClamp.Clamp(null,15);
InOutStoreLog($"取料:记录高度尺寸 LastWidth:{LastWidth}, LastHeight{LastHeight},计算高度"); InOutStoreLog($"取料:记录高度尺寸 LastWidth:{LastWidth}, LastHeight{LastHeight},计算高度");
MoveInfo.WaitList.Add(WaitResultInfo.WaitScanCode());
} }
else if (MoveInfo.IsStep(StoreMoveStep.LI_17_SaveSize)) else if (MoveInfo.IsStep(StoreMoveStep.LI_17_SaveSize))
{ {
...@@ -1067,6 +1121,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1067,6 +1121,7 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog("送出料架:顶升气缸下降"); InOutStoreLog("送出料架:顶升气缸下降");
InOutStation_LocationDown(); InOutStation_LocationDown();
InOutStation_RasieUp(); InOutStation_RasieUp();
OpenGate(MoveInfo);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LI_32_HoisterBack)) else if (MoveInfo.IsStep(StoreMoveStep.LI_32_HoisterBack))
{ {
...@@ -1086,10 +1141,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -1086,10 +1141,12 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.LI_33_TopCylinderDown_3); MoveInfo.NextMoveStep(StoreMoveStep.LI_33_TopCylinderDown_3);
InOutStoreLog("送出料架:进出机构下降"); InOutStoreLog("送出料架:进出机构下降");
InOutStation_RasieDown(); InOutStation_RasieDown();
} }
else if (MoveInfo.IsStep(StoreMoveStep.LI_33_TopCylinderDown_3)) else if (MoveInfo.IsStep(StoreMoveStep.LI_33_TopCylinderDown_3))
{ {
InOutStation_Stop(1000); InOutStation_Stop(1000);
CloseGate(MoveInfo);
/* /*
InOutStoreLog($"送出料架:BoxMap[1]={BoxMap[1].storeStatus},BoxMap[2]={BoxMap[2].storeStatus}"); InOutStoreLog($"送出料架:BoxMap[1]={BoxMap[1].storeStatus},BoxMap[2]={BoxMap[2].storeStatus}");
//如果有等待出库的料先出库 //如果有等待出库的料先出库
...@@ -1106,7 +1163,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -1106,7 +1163,8 @@ namespace OnlineStore.DeviceLibrary
} }
} }
//判断是否需要送出料架,如果入口和等待区无料架,暂不送出 //判断是否需要送出料架,如果入口和等待区无料架,暂不送出
else */if (IOValue(IO_Type.Line_InCheck).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.HIGH) || InstoreEndSendShelf) else */
if (true || IOValue(IO_Type.Line_InCheck).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.Line_WaitCheck).Equals(IO_VALUE.HIGH) || InstoreEndSendShelf)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LI_34_WorkStopDown); MoveInfo.NextMoveStep(StoreMoveStep.LI_34_WorkStopDown);
InOutStoreLog("送出料架[" + InstoreEndSendShelf + "]:上料阻挡下降1秒,流水线开始转动"); InOutStoreLog("送出料架[" + InstoreEndSendShelf + "]:上料阻挡下降1秒,流水线开始转动");
...@@ -1114,7 +1172,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1114,7 +1172,7 @@ namespace OnlineStore.DeviceLibrary
ConfigAppSettings.SaveValue(Setting_Init.LastOutShelfType,0); ConfigAppSettings.SaveValue(Setting_Init.LastOutShelfType,0);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
LineRun(MoveInfo); LineRun(MoveInfo);
IOMove(IO_Type.Line_Stop2_Work, IO_VALUE.HIGH, false, 2000); IOMove(IO_Type.Line_Stop2_Work, IO_VALUE.HIGH, false, 1000);
} }
else else
...@@ -1248,7 +1306,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1248,7 +1306,7 @@ namespace OnlineStore.DeviceLibrary
{ {
InOutStoreLog("料盘移栽 :开始扫码"); InOutStoreLog("料盘移栽 :开始扫码");
MoveInfo.OneWaitCanEndStep = true; MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitScanCode()); //MoveInfo.WaitList.Add(WaitResultInfo.WaitScanCode());
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
try try
{ {
...@@ -1290,7 +1348,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1290,7 +1348,7 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH); IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH);
Task.Delay(10).Wait(); Task.Delay(10).Wait();
YuCodeList = CodeManager.CameraScan(Config.GetCameraList(), Name.Trim() + "预扫码"); YuCodeList = CodeManager.CameraScan(Config.GetCameraList(), Name.Trim() + "预扫码");
IOMove(IO_Type.Camera_Led, IO_VALUE.LOW); //IOMove(IO_Type.Camera_Led, IO_VALUE.LOW);
bool isCanUse = true; bool isCanUse = true;
//判断是否可用 //判断是否可用
foreach (string nC in YuCodeList) foreach (string nC in YuCodeList)
...@@ -1348,22 +1406,49 @@ namespace OnlineStore.DeviceLibrary ...@@ -1348,22 +1406,49 @@ namespace OnlineStore.DeviceLibrary
//无料盘 //无料盘
ShelfNoTray = true; ShelfNoTray = true;
UpdateShelfNum(CurrShelfNum, 0); UpdateShelfNum(CurrShelfNum, 0);
InOutStoreLog($"检测料架为空:BoxMap[1]={BoxMap[1].waitOutStoreList.Count},BoxMap[2]={BoxMap[2].waitOutStoreList.Count}"); int box1miscout = 0;
//如果有等待出库的料先出库 int box2miscout = 0;
if (BoxMap[1].waitOutStoreList.Count>0 || BoxMap[2].waitOutStoreList.Count > 0) bool hasMission = false;
int MissionTest = 0;
while (MissionTest < 10 && !hasMission)
{
//lock (BoxMap[1].waitOutStoreList)
{
var box1wl = BoxMap[1].waitOutStoreList.ToList();
box1miscout = (from a in box1wl where a.TargetPosition == 0 select a).Count();
}
//lock (BoxMap[2].waitOutStoreList)
{
var box1wl = BoxMap[2].waitOutStoreList.ToList();
box2miscout = (from a in box1wl where a.TargetPosition == 0 select a).Count();
}
//如果有等待出库的料先出库
if (box1miscout > 0 || box2miscout > 0)
hasMission = true;
MissionTest++;
Thread.Sleep(50);
}
if (!hasMission) {
hasMission= BoxMap[1].MoveInfo.MoveStep == StoreMoveStep.SO_11_GoBack || BoxMap[2].MoveInfo.MoveStep == StoreMoveStep.SO_11_GoBack;
}
InOutStoreLog($"检测料架为空:BoxMap[1]={box1miscout},BoxMap[2]={box2miscout}");
if (hasMission)
{ {
InOutStoreLog("检测料架为空:检测到有待出库料盘,立刻开始出库"); InOutStoreLog("检测料架为空:检测到有待出库料盘,立刻开始出库");
if (!StartOutStoreMove(new InOutParam(MoveType.OutStore), true)) if (!StartOutStoreMove(new InOutParam(MoveType.OutStore), true))
{ {
InOutStoreLog("检测料架为空:转换出库失败."); InOutStoreLog("检测料架为空:转换出库失败.");
//MoveEndP(); //MoveEndP();
} }
} }
else else
{ {
LI_31_BatchAxisToP1(); LI_31_BatchAxisToP1();
} }
} }
} }
...@@ -1401,7 +1486,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1401,7 +1486,7 @@ namespace OnlineStore.DeviceLibrary
StartMovePosition = T1_BatchAxis.GetAclPosition(); StartMovePosition = T1_BatchAxis.GetAclPosition();
MoveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxisMove(Config.T1_Batch_Axis, targetP2, targetSpeed)); MoveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxisMove(Config.T1_Batch_Axis, targetP2, targetSpeed));
Config.T1_Batch_Axis.TargetPosition = targetP2; Config.T1_Batch_Axis.TargetPosition = targetP2;
T1_BatchAxis.AbsMove(null, targetP2, targetSpeed); T1_BatchAxis.AbsMove(null, targetP2, isFirstMove?targetSpeed: targetSpeed/2);
//开始检测信号 //开始检测信号
T1_BatchAxis.BatchAxisStartCheck(IO_Type.BatchAxis_Check, IO_VALUE.HIGH); T1_BatchAxis.BatchAxisStartCheck(IO_Type.BatchAxis_Check, IO_VALUE.HIGH);
} }
......
...@@ -30,11 +30,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -30,11 +30,11 @@ namespace OnlineStore.DeviceLibrary
//if (plateW > 7) //if (plateW > 7)
if (true) if (true)
{ {
axis.Push(99, 7, 500); axis.Push(99, 7, 10);
} }
else else
{ {
axis.Push(50, 7, 500); axis.Push(50, 7, 10);
} }
if (moveInfo!=null) if (moveInfo!=null)
moveInfo.WaitList.Add(WaitResultInfo.WaitTime(100)); moveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
...@@ -71,7 +71,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -71,7 +71,7 @@ namespace OnlineStore.DeviceLibrary
} }
public bool IsBusy { public bool IsBusy {
get { get {
axis.GetPosition(); //axis.GetPosition();
return !axis.IsReached; return !axis.IsReached;
} }
} }
......
...@@ -292,6 +292,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -292,6 +292,8 @@ namespace OnlineStore.DeviceLibrary
if (isOk) if (isOk)
{ {
MoveInfo.EndStepWait(); MoveInfo.EndStepWait();
alarmType = AlarmType.None;
WarnMsg = "";
} }
else if (span.TotalSeconds > MoveInfo.TimeOutSeconds) else if (span.TotalSeconds > MoveInfo.TimeOutSeconds)
{ {
......
...@@ -80,6 +80,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -80,6 +80,7 @@ namespace OnlineStore.DeviceLibrary
if (param != null) if (param != null)
{ {
humidity = param.Humidity; humidity = param.Humidity;
LastData = param;
temp = param.Temperate; temp = param.Temperate;
currTempStr = Name + ("湿度:" + humidity.ToString() + ",温度:" + temp); currTempStr = Name + ("湿度:" + humidity.ToString() + ",温度:" + temp);
} }
......
...@@ -22,6 +22,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -22,6 +22,7 @@ namespace OnlineStore.DeviceLibrary
public static bool IsConnectServer = !ConfigAppSettings.GetValue(Setting_Init.http_server).Equals(""); public static bool IsConnectServer = !ConfigAppSettings.GetValue(Setting_Init.http_server).Equals("");
public static string LastVisualRfid = ""; public static string LastVisualRfid = "";
public volatile static bool ShelfNeedOut = false;
public StoreManager() public StoreManager()
{ {
...@@ -108,7 +109,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -108,7 +109,7 @@ namespace OnlineStore.DeviceLibrary
CSVPositionReader<ACBoxPosition>.AddCSVFile(positionConfigFile); CSVPositionReader<ACBoxPosition>.AddCSVFile(positionConfigFile);
} }
CSVPositionReader<ACBoxPosition>.AddCSVFile(Path.Combine(appPath, @"StoreConfig\FixPositions.csv")); CSVPositionReader<ACBoxPosition>.AddCSVFile(Path.Combine(appPath, @"StoreConfig\FixPositions.csv"));
AgvClient.Init(); //AgvClient.Init();
LogUtil.info("加载料仓完成!"); LogUtil.info("加载料仓完成!");
} }
...@@ -369,7 +370,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -369,7 +370,8 @@ namespace OnlineStore.DeviceLibrary
string cids = ""; string cids = "";
foreach(int k in Store.BoxMap.Keys) foreach(int k in Store.BoxMap.Keys)
{ {
if (Store.BoxMap[k].runStatus > StoreRunStatus.Wait && Store.BoxMap[k].IOValue(IO_Type.InDoor_Check).Equals(IO_VALUE.LOW)) //if (Store.BoxMap[k].runStatus > StoreRunStatus.Wait && Store.BoxMap[k].IOValue(IO_Type.InDoor_Check).Equals(IO_VALUE.LOW))
if (!Store.BoxMap[k].IsDebug && !Store.BoxMap[k].Disabled && Store.BoxMap[k].runStatus > StoreRunStatus.Wait)
{ {
cids += Store.BoxMap[k].CID+","; cids += Store.BoxMap[k].CID+",";
} }
...@@ -384,7 +386,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -384,7 +386,7 @@ namespace OnlineStore.DeviceLibrary
DateTime startTime = DateTime.Now; DateTime startTime = DateTime.Now;
LogUtil.info(deviceName + "【" + shelfNum + "】【 " + codeStr + "】 ,获取入库库位:"); LogUtil.info(deviceName + "【" + shelfNum + "】【 " + codeStr + "】 ,获取入库库位:");
string resultStr = HttpHelper.Post(server, "", Encoding.UTF8, 10000, out result.IsTimeOut); string resultStr = HttpHelper.Post(server, "", Encoding.UTF8, 3500, out result.IsTimeOut);
LogUtil.info(deviceName + "CodeReceived " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】"); LogUtil.info(deviceName + "CodeReceived " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
if (result.IsTimeOut) if (result.IsTimeOut)
......
...@@ -126,25 +126,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -126,25 +126,27 @@ namespace OnlineStore.DeviceLibrary
} }
public string ToStr() public string ToStr()
{ {
var TargetPositionTxt = TargetPosition == 1 ? "单盘出口":"料串";
var NGTxt = InStoreNg ? "[NG料]" : "";
if (InStoreNg) if (InStoreNg)
{ {
return " 入库失败[BOX_" + TargetBox + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] [" + TargetPosition + "] [isNG:" + InStoreNg + "]"; return " 入库失败[BOX_" + TargetBox + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] [" + TargetPositionTxt + "] " + NGTxt + "";
} }
else else
{ {
if (moveType.Equals(MoveType.InStore)) if (moveType.Equals(MoveType.InStore))
{ {
return " 入库 [" + PosID + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] [" + TargetPosition + "] [isNG:" + InStoreNg + "]"; return " 入库 [" + PosID + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] [" + TargetPositionTxt + "] " + NGTxt + "";
} }
else else
{ {
if (TargetPosition.Equals(1)) if (TargetPosition.Equals(1))
{ {
return " 批量出库 [" + PosID + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] [" + TargetPosition + "] [isNG:" + InStoreNg + "]"; return $" 批量出库 [{PosID}] [{WareCode}], [{PlateW}x{PlateH}] [{TargetPositionTxt}] {NGTxt}[需求单:" + StoreManager.LastVisualRfid + "]";
} }
else else
{ {
return " 单盘出库 [" + PosID + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] [" + TargetPosition + "] [isNG:" + InStoreNg + "]"; return $" 单盘出库 [{PosID}] [{WareCode}], [{PlateW}x{PlateH}] [" + TargetPositionTxt + "] " + NGTxt + "[需求单:" + StoreManager.LastVisualRfid + "]";
} }
} }
} }
......
...@@ -94,7 +94,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -94,7 +94,7 @@ namespace OnlineStore.DeviceLibrary
/// 运动处理 /// 运动处理
/// </summary> /// </summary>
protected bool isInPro = false; protected bool isInPro = false;
object worklock = new object(); protected object worklock = new object();
protected virtual void BusyMoveProcess() protected virtual void BusyMoveProcess()
{ {
//if (isInPro) //if (isInPro)
......
...@@ -576,6 +576,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -576,6 +576,7 @@ namespace OnlineStore.DeviceLibrary
/// 料盘移栽: 夹爪气缸放松 /// 料盘移栽: 夹爪气缸放松
/// </summary> /// </summary>
LO_19_CylinderRelax, LO_19_CylinderRelax,
LO_20_BatchAxisToP2,
/// <summary> /// <summary>
/// 料盘移栽: 升降轴到料串高点 /// 料盘移栽: 升降轴到料串高点
/// </summary> /// </summary>
...@@ -619,6 +620,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -619,6 +620,12 @@ namespace OnlineStore.DeviceLibrary
///送出料架, 流水线停止转动, ///送出料架, 流水线停止转动,
/// </summary> /// </summary>
LO_37_LineStop, LO_37_LineStop,
BOX_H03_SendOut_01,
BOX_H03_SendOut_02,
BOX_H03_SendOut_03,
BOX_H03_SendOut_04,
BOX_H03_SendOut_05,
LO_20_UpdownUp_wait,
#endregion #endregion
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!