Commit c47fe5e0 LN

吸料改为夹紧气缸

1 个父辈 9a5953e1
......@@ -140,9 +140,9 @@
// btnDisDoorClose
//
this.btnDisDoorClose.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDisDoorClose.Location = new System.Drawing.Point(294, 449);
this.btnDisDoorClose.Location = new System.Drawing.Point(297, 470);
this.btnDisDoorClose.Name = "btnDisDoorClose";
this.btnDisDoorClose.Size = new System.Drawing.Size(134, 34);
this.btnDisDoorClose.Size = new System.Drawing.Size(134, 52);
this.btnDisDoorClose.TabIndex = 268;
this.btnDisDoorClose.Text = "门禁功能打开";
this.btnDisDoorClose.UseVisualStyleBackColor = true;
......@@ -151,9 +151,9 @@
// btnDisDoorOpen
//
this.btnDisDoorOpen.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDisDoorOpen.Location = new System.Drawing.Point(294, 412);
this.btnDisDoorOpen.Location = new System.Drawing.Point(297, 412);
this.btnDisDoorOpen.Name = "btnDisDoorOpen";
this.btnDisDoorOpen.Size = new System.Drawing.Size(134, 34);
this.btnDisDoorOpen.Size = new System.Drawing.Size(134, 52);
this.btnDisDoorOpen.TabIndex = 267;
this.btnDisDoorOpen.Text = "门禁功能屏蔽";
this.btnDisDoorOpen.UseVisualStyleBackColor = true;
......@@ -162,7 +162,7 @@
// button4
//
this.button4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button4.Location = new System.Drawing.Point(154, 449);
this.button4.Location = new System.Drawing.Point(154, 359);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(134, 34);
this.button4.TabIndex = 266;
......@@ -173,7 +173,7 @@
// button5
//
this.button5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button5.Location = new System.Drawing.Point(154, 412);
this.button5.Location = new System.Drawing.Point(154, 322);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(134, 34);
this.button5.TabIndex = 265;
......@@ -206,11 +206,11 @@
// btnSXil
//
this.btnSXil.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSXil.Location = new System.Drawing.Point(13, 449);
this.btnSXil.Location = new System.Drawing.Point(13, 470);
this.btnSXil.Name = "btnSXil";
this.btnSXil.Size = new System.Drawing.Size(134, 34);
this.btnSXil.Size = new System.Drawing.Size(134, 52);
this.btnSXil.TabIndex = 262;
this.btnSXil.Text = "停止吸料";
this.btnSXil.Text = "夹爪放松";
this.btnSXil.UseVisualStyleBackColor = true;
this.btnSXil.Click += new System.EventHandler(this.btnSXil_Click);
//
......@@ -219,9 +219,9 @@
this.btnSXi.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSXi.Location = new System.Drawing.Point(13, 412);
this.btnSXi.Name = "btnSXi";
this.btnSXi.Size = new System.Drawing.Size(134, 34);
this.btnSXi.Size = new System.Drawing.Size(134, 52);
this.btnSXi.TabIndex = 261;
this.btnSXi.Text = "开始吸料";
this.btnSXi.Text = "夹爪夹紧";
this.btnSXi.UseVisualStyleBackColor = true;
this.btnSXi.Click += new System.EventHandler(this.btnSXi_Click);
//
......@@ -250,22 +250,22 @@
// btnSuckingDiscDown
//
this.btnSuckingDiscDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSuckingDiscDown.Location = new System.Drawing.Point(154, 359);
this.btnSuckingDiscDown.Location = new System.Drawing.Point(154, 470);
this.btnSuckingDiscDown.Name = "btnSuckingDiscDown";
this.btnSuckingDiscDown.Size = new System.Drawing.Size(134, 34);
this.btnSuckingDiscDown.Size = new System.Drawing.Size(134, 52);
this.btnSuckingDiscDown.TabIndex = 258;
this.btnSuckingDiscDown.Text = "吸盘下降";
this.btnSuckingDiscDown.Text = "夹爪下降";
this.btnSuckingDiscDown.UseVisualStyleBackColor = true;
this.btnSuckingDiscDown.Click += new System.EventHandler(this.btnSuckingDiscDown_Click);
//
// btnSuckingDiscUp
//
this.btnSuckingDiscUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSuckingDiscUp.Location = new System.Drawing.Point(154, 322);
this.btnSuckingDiscUp.Location = new System.Drawing.Point(154, 412);
this.btnSuckingDiscUp.Name = "btnSuckingDiscUp";
this.btnSuckingDiscUp.Size = new System.Drawing.Size(134, 34);
this.btnSuckingDiscUp.Size = new System.Drawing.Size(134, 52);
this.btnSuckingDiscUp.TabIndex = 257;
this.btnSuckingDiscUp.Text = "吸盘上升";
this.btnSuckingDiscUp.Text = "夹爪上升";
this.btnSuckingDiscUp.UseVisualStyleBackColor = true;
this.btnSuckingDiscUp.Click += new System.EventHandler(this.btnSuckingDiscUp_Click);
//
......
......@@ -50,7 +50,7 @@ namespace OnlineStore.AutoInOutStore
foreach (ConfigIO ioValue in boxBean.Config.StoreDIList.Values)
{
this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 26));
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName,240);
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ResourceCulture.GetString(ioValue.ElectricalDefinition, ioValue.Explain), ioValue.ProName,240);
this.tableLayoutPanel1.Controls.Add(control, 0, roleindex);
roleindex++;
DIControlList.Add(ioValue.ProName, control);
......@@ -62,7 +62,7 @@ namespace OnlineStore.AutoInOutStore
foreach (ConfigIO ioValue in boxBean.Config.StoreDOList.Values)
{
this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName, 240);
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ResourceCulture.GetString(ioValue.ElectricalDefinition, ioValue.Explain), ioValue.ProName, 240);
this.tableLayoutPanel2.Controls.Add(control, 0, roleindex);
roleindex++;
DOControlList.Add(ioValue.ProName, control);
......@@ -295,12 +295,14 @@ namespace OnlineStore.AutoInOutStore
private void btnSXi_Click(object sender, EventArgs e)
{
IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.HIGH);
// IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.HIGH);
AutomaticBaiting.CylinderMove(IO_Type.Clamping_Relax, IO_Type.Clamping_Work);
}
private void btnSXil_Click(object sender, EventArgs e)
{
IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
{
// IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
AutomaticBaiting.CylinderMove(IO_Type.Clamping_Work, IO_Type.Clamping_Relax);
}
private void button3_Click(object sender, EventArgs e)
......
......@@ -800,10 +800,10 @@
<value>Portal descent position</value>
</data>
<data name="X07" xml:space="preserve">
<value>Chuck cylinder ascent position</value>
<value>Clamping jaw ascent position</value>
</data>
<data name="X08" xml:space="preserve">
<value>Chuck cylinder descent position</value>
<value>Clamping jaw descent position</value>
</data>
<data name="X09" xml:space="preserve">
<value>Reel width detection1</value>
......@@ -860,10 +860,10 @@
<value>Portal descent SOL</value>
</data>
<data name="Y11" xml:space="preserve">
<value>Chuck cylinder ascent SOL</value>
<value>Clamping jaw ascent SOL</value>
</data>
<data name="Y12" xml:space="preserve">
<value>Chuck cylinder descent SOL</value>
<value>Clamping jaw descent SOL</value>
</data>
<data name="Y13" xml:space="preserve">
<value>Doorlock cylinder open SOL</value>
......@@ -884,10 +884,10 @@
<value>Pressure detection</value>
</data>
<data name="X23" xml:space="preserve">
<value>Confirm sucker pressure signal</value>
<value>left door limit</value>
</data>
<data name="X24" xml:space="preserve">
<value>door limit</value>
<value>right door limit</value>
</data>
<data name="Batch_Axis" xml:space="preserve">
<value>(Axis 5) Batch loading axis</value>
......@@ -1127,10 +1127,10 @@
<value>Start operation ON</value>
</data>
<data name="FrmIOStatus_btnSXil_Text" xml:space="preserve">
<value>Stop grip material</value>
<value>The Clamping jaw relax</value>
</data>
<data name="FrmIOStatus_btnSXi_Text" xml:space="preserve">
<value>Start grip material</value>
<value>The Clamping jaw clamping</value>
</data>
<data name="FrmIOStatus_btnDClose_Text" xml:space="preserve">
<value>Door lock close</value>
......@@ -1139,10 +1139,10 @@
<value>Door lock open</value>
</data>
<data name="FrmIOStatus_btnSuckingDiscDown_Text" xml:space="preserve">
<value>Sucker descent</value>
<value>Clamping jaw descent</value>
</data>
<data name="FrmIOStatus_btnSuckingDiscUp_Text" xml:space="preserve">
<value>Sucker ascent</value>
<value>Clamping jaw ascent</value>
</data>
<data name="PreConnectFail" xml:space="preserve">
<value>Startup failure: compression shaft connection failed</value>
......@@ -1246,4 +1246,16 @@
<data name="NoCodeMsg" xml:space="preserve">
<value>If the qr code is not scanned, please put it back into the material tray</value>
</data>
<data name="X29" xml:space="preserve">
<value>Clamping end of cylinder clamping jaw</value>
</data>
<data name="X30" xml:space="preserve">
<value>Loosen end of gripper cylinder</value>
</data>
<data name="Y21" xml:space="preserve">
<value>Clamping jaw cylinder clamping SOL</value>
</data>
<data name="Y22" xml:space="preserve">
<value>Loosen the clamping cylinder SOL</value>
</data>
</root>
\ No newline at end of file
......@@ -670,7 +670,7 @@
<value>料仓运转ON</value>
</data>
<data name="FrmStoreBox_显示ToolStripMenuItem_Text" xml:space="preserve">
<value>显示(&amp;S)</value>
<value>显示</value>
</data>
<data name="FrmStoreBox_查看IOToolStripMenuItem_Text" xml:space="preserve">
<value>查看IO</value>
......@@ -796,10 +796,10 @@
<value>进料口门下降端</value>
</data>
<data name="X07" xml:space="preserve">
<value>吸盘气缸上升端</value>
<value>夹爪气缸上升端</value>
</data>
<data name="X08" xml:space="preserve">
<value>吸盘气缸下降端</value>
<value>夹爪气缸下降端</value>
</data>
<data name="X09" xml:space="preserve">
<value>料盘宽度检测1</value>
......@@ -856,10 +856,10 @@
<value>进料口门下降SOL</value>
</data>
<data name="Y11" xml:space="preserve">
<value>吸盘气缸上升SOL</value>
<value>夹爪气缸上升SOL</value>
</data>
<data name="Y12" xml:space="preserve">
<value>吸盘气缸下降SOL</value>
<value>夹爪气缸下降SOL</value>
</data>
<data name="Y13" xml:space="preserve">
<value>门锁气缸打开SOL</value>
......@@ -880,10 +880,10 @@
<value>气压检测</value>
</data>
<data name="X23" xml:space="preserve">
<value>吸盘压力确认信号</value>
<value>左侧门关闭</value>
</data>
<data name="X24" xml:space="preserve">
<value>左侧门关闭</value>
<value />
</data>
<data name="Batch_Axis" xml:space="preserve">
<value>(轴五)批量上下料轴</value>
......@@ -1126,10 +1126,10 @@
<value>打开运转ON</value>
</data>
<data name="FrmIOStatus_btnSXil_Text" xml:space="preserve">
<value>停止吸料</value>
<value>夹爪放松</value>
</data>
<data name="FrmIOStatus_btnSXi_Text" xml:space="preserve">
<value>开始吸料</value>
<value>夹爪夹紧</value>
</data>
<data name="FrmIOStatus_btnDClose_Text" xml:space="preserve">
<value>门锁关闭</value>
......@@ -1138,10 +1138,10 @@
<value>门锁打开</value>
</data>
<data name="FrmIOStatus_btnSuckingDiscDown_Text" xml:space="preserve">
<value>吸盘下降</value>
<value>夹爪下降</value>
</data>
<data name="FrmIOStatus_btnSuckingDiscUp_Text" xml:space="preserve">
<value>吸盘上升</value>
<value>夹爪上升</value>
</data>
<data name="PreConnectFail" xml:space="preserve">
<value>启动失败:压紧轴连接失败</value>
......@@ -1195,10 +1195,10 @@
<value>门锁气缸关闭端2</value>
</data>
<data name="X27" xml:space="preserve">
<value>批量轴极限信号</value>
<value>上料机构上极限</value>
</data>
<data name="X28" xml:space="preserve">
<value>仓门料盘检测信号</value>
<value>入料口料盘检测</value>
</data>
<data name="FrmIOStatus_radioButton2_Text" xml:space="preserve">
<value>关闭</value>
......@@ -1245,4 +1245,16 @@
<data name="NoCodeMsg" xml:space="preserve">
<value>未扫到二维码,请重新放入料盘</value>
</data>
<data name="X29" xml:space="preserve">
<value>夹爪气缸夹紧端</value>
</data>
<data name="X30" xml:space="preserve">
<value>夹爪气缸放松端</value>
</data>
<data name="Y21" xml:space="preserve">
<value>夹爪气缸夹紧SOL</value>
</data>
<data name="Y22" xml:space="preserve">
<value>夹爪气缸放松SOL</value>
</data>
</root>
\ No newline at end of file

using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.ACSingleStore
{
public partial class FrmPositionTool : Form
{
private string PortName = "";
private int SlvAddr = 0;
private string IoIp = "";
private int IoIndex = 0;
private System.Timers.Timer toolTimer = new System.Timers.Timer();
public FrmPositionTool(string protName, int slvAddr,string ioIp, int ioIndex)
{
InitializeComponent();
this.PortName = protName;
this.SlvAddr = slvAddr;
this.IoIp = ioIp;
this.IoIndex = ioIndex;
toolTimer.Enabled = false;
toolTimer.Interval = 300;
toolTimer.AutoReset = true;
toolTimer.Elapsed += ToolTimer_Elapsed;
}
private void Form1_Load(object sender, EventArgs e)
{
ACServerManager.IsShowMsg = true;
LogUtil.logBox = this.richTextBox1;
//ACServerManager.richeBox = this.richTextBox1;
formStatus(false);
CheckForIllegalCrossThreadCalls = false;
txtPortName.Text = PortName;
txtAddr.Text = SlvAddr.ToString();
txtIOIndex .Text= IoIndex.ToString();
txtIoIp.Text = IoIp.ToString();
}
private void btnServoOn_Click(object sender, EventArgs e)
{
this.PortName = txtPortName.Text;
this.SlvAddr = FormUtil.GetIntValue(txtAddr);
bool result = ACServerManager.OpenPort(PortName);
if (!result)
{
MessageBox.Show("打开串口失败!");
return;
}
formStatus(true);
ACServerManager.InitSlvAddr(PortName, SlvAddr);
Thread.Sleep(100);
ACServerManager.AlarmClear(PortName, SlvAddr);
ACServerManager.ServoOn(PortName, SlvAddr);
}
private void btnServoOff_Click(object sender, EventArgs e)
{
toolTimer.Stop();
ACServerManager.SuddenStop(PortName, SlvAddr);
Thread.Sleep(100);
ACServerManager.ServoOff(PortName, SlvAddr);
}
private void formStatus(bool p)
{
txtPortName.Enabled = !p;
txtAddr.Enabled = !p;
txtIOIndex.Enabled = !p;
txtIoIp.Enabled = !p;
btnAbsMove.Enabled = p;
btnSdStop.Enabled = p;
btnHomeMove.Enabled = p;
timer1.Enabled = p;
btnServoOff.Enabled = p;
btnServoOn.Enabled = !p;
btnGetActualPosition.Enabled = p;
}
private void btnClear_Click(object sender, EventArgs e)
{
this.richTextBox1.Text = "";
}
private void btnRelMove_Click(object sender, EventArgs e)
{
int position = Convert.ToInt32(txtPosition.Text);
ACServerManager.RelMove(PortName, SlvAddr, position);
}
private void btnHomeMove_Click(object sender, EventArgs e)
{
int speed = Convert.ToInt32(txtSpeed.Text);
ACServerManager.HomeMove(PortName, SlvAddr, speed);
}
private void btnSpeedMove_Click(object sender, EventArgs e)
{
int speed = Convert.ToInt32(txtSpeed.Text);
ACServerManager.SpeedMove(PortName, SlvAddr, speed);
}
private int TargetPostion = 0;
private void btnAbsMove_Click(object sender, EventArgs e)
{
int speed = Convert.ToInt32(txtSpeed.Text);
int position = Convert.ToInt32(txtPosition.Text.Trim(), 10);
TargetPostion = position;
if (speed<=(0))
{
MessageBox.Show("请输入正确的速度");
txtSpeed.Focus();
return;
}
toolTimer.Start();
ACServerManager.AbsMove(PortName, SlvAddr, position);
}
private void btnSdStop_Click(object sender, EventArgs e)
{
toolTimer.Stop();
ACServerManager.SuddenStop(PortName, SlvAddr);
}
private void btnGetActualPosition_Click(object sender, EventArgs e)
{
int value = ACServerManager.GetTargetPosition(PortName, SlvAddr);
txtTargetPosition.Text = value.ToString();
value = ACServerManager.GetActualtPosition(PortName, SlvAddr);
txtActualPosition.Text = value.ToString();
}
private bool isInProcesss = false;
private void ToolTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
}
private int getDataIndex = 0;
private void timer1_Tick(object sender, EventArgs e)
{
try
{
getDataIndex++;
}
catch (Exception ex)
{
}
try
{
}
catch (Exception ex)
{
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file
......@@ -223,4 +223,4 @@ DI9 不要,只判断DI10
压紧轴改为伺服,压紧轴计量检测信号去掉。
IO配置修改,改为新的IO配置。
吸盘改为夹爪,代码逻辑修改。
......@@ -206,7 +206,9 @@ namespace OnlineStore.DeviceLibrary
{
runTimeWatch.Restart();
LogUtil.info(LOGGER, StoreName + "开始启动,启动时间:" + DateTime.Now.ToLongTimeString());
IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
AutomaticBaiting.CylinderMove(IO_Type.Clamping_Work, IO_Type.Clamping_Relax, null);
// IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
//if (IsHasCompress_Axis)
//{
// if (ShuoKeControls.isRun == false && (!StoreManager.OpenShuoKe(this)))
......
......@@ -168,16 +168,16 @@ namespace OnlineStore.DeviceLibrary
{
timeOutMs = 650000;
}
if (!wait.IsEnd && span.TotalSeconds > 2 && wait.IoType.Equals(IO_Type.SuckingDisc_Air))
{
string ioType = IO_Type.SuckingDisc_Work;
IO_VALUE doValue = IOManager.DOValue(ioType);
if (!doValue.Equals(wait.IoValue))
{
LogUtil.error("等待[" + NotOkMsg + "],重写DO(" + ioType + "=" + wait.IoValue + ")");
IOManager.IOMove(ioType, wait.IoValue);
}
}
//if (!wait.IsEnd && span.TotalSeconds > 2 && wait.IoType.Equals(IO_Type.SuckingDisc_Air))
//{
// string ioType = IO_Type.SuckingDisc_Work;
// IO_VALUE doValue = IOManager.DOValue(ioType);
// if (!doValue.Equals(wait.IoValue))
// {
// LogUtil.error("等待[" + NotOkMsg + "],重写DO(" + ioType + "=" + wait.IoValue + ")");
// IOManager.IOMove(ioType, wait.IoValue);
// }
//}
if ((!wait.IsEnd) && span.TotalMilliseconds > timeOutMs)
{
ConfigIO io = Config.getWaitIO(wait.IoType);
......@@ -410,9 +410,11 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog("入库:SI_05 等待吸盘放下物品");
StoreMove.NextMoveStep(StoreMoveStep.SI_05_DoorWarToDevice);
IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
// IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
// StoreMove.WaitList.Add(WaitResultInfo.WaitTime(1000));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Air, IO_VALUE.LOW));
// StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Air, IO_VALUE.LOW));
AutomaticBaiting.CylinderMove(IO_Type.Clamping_Work, IO_Type.Clamping_Relax, StoreMove);
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_05_DoorWarToDevice)
{
......@@ -581,6 +583,7 @@ namespace OnlineStore.DeviceLibrary
if (IOManager.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH))
{
InStoreLog("送出料盘:SI_13 叉子从库位返回,进出轴到P1(待机点) ");
CodeOrInoutMsg = "";
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
lastPosId = "";
......
......@@ -141,7 +141,8 @@ namespace OnlineStore.DeviceLibrary
public static void StopRun()
{
IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
// IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
AutomaticBaiting.CylinderMove(IO_Type.Clamping_Work, IO_Type.Clamping_Relax, null);
ClearInStoreInfo();
ClearOutStoreInfo();
}
......@@ -150,7 +151,8 @@ namespace OnlineStore.DeviceLibrary
BatchAxisController.StopCheck();
StoreMove.EndMove();
ClearInStoreInfo();
IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
// IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
AutomaticBaiting.CylinderMove(IO_Type.Clamping_Work, IO_Type.Clamping_Relax, null);
CylinderMove(IO_Type.ClampingDisc_Up, IO_Type.ClampingDisc_Down, false);
BatchDoorClose(false);
}
......@@ -213,7 +215,8 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.AUTO_R01_CloseDoor);
//关闭门,轴回原点,检测
BatchDoorClose(true);
IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
// IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
AutomaticBaiting.CylinderMove(IO_Type.Clamping_Work, IO_Type.Clamping_Relax, StoreMove);
CylinderMove(IO_Type.ClampingDisc_Up, IO_Type.ClampingDisc_Down, true);
LogUtil.info(Name + "复位中:关闭门锁");
break;
......@@ -360,13 +363,15 @@ namespace OnlineStore.DeviceLibrary
}
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I05_SuckingDisc_Work))
{
if (IOManager.IOValue(IO_Type.SuckingDisc_Air).Equals(IO_VALUE.HIGH))
// if (IOManager.IOValue(IO_Type.SuckingDisc_Air).Equals(IO_VALUE.HIGH))
if (IOManager.IOValue(IO_Type.Clamping_Work).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.Clamping_Relax).Equals(IO_VALUE.LOW))
{
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I06_SuckingDisc_Up);
LogUtil.info(Name + "入料: 吸盘上升");
CylinderMove(IO_Type.ClampingDisc_Up, IO_Type.ClampingDisc_Down, false );
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampingDisc_Down, IO_VALUE.LOW));
CylinderMove(IO_Type.ClampingDisc_Up, IO_Type.ClampingDisc_Down, false);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampingDisc_Down, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(1500));
}
......@@ -385,7 +390,8 @@ namespace OnlineStore.DeviceLibrary
}
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I06_SuckingDisc_Up))
{
if (IOManager.IOValue(IO_Type.SuckingDisc_Air).Equals(IO_VALUE.HIGH))
if (IOManager.IOValue(IO_Type.Clamping_Work).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.Clamping_Relax).Equals(IO_VALUE.LOW))
// if (IOManager.IOValue(IO_Type.SuckingDisc_Air).Equals(IO_VALUE.HIGH))
{
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I07_BatchAxisUp);
LogUtil.info(Name + "入料: 批量轴匀速上升【" + StoreManager.Config.BatchAxis_SlowSpeed + "】");
......@@ -408,7 +414,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
// WarnMsg = ResourceControl.GetString(ResourceControl.XiLiaoError, "吸盘吸料失败");
// WarnMsg = ResourceControl.GetString(ResourceControl.XiLiaoError, "吸盘吸料失败");
SetWarnMsg(ResourceControl.XiLiaoError);
StoreManager.Store.Alarm(StoreAlarmType.BatchAlarm, WarnObj.WarnMsg, WarnObj.WarnMsg, StoreMoveType.InStore);
LogUtil.error(Name + "入料: 吸盘上升后未检测到吸盘压力信号,吸取料盘失败", 105);
......@@ -416,7 +422,8 @@ namespace OnlineStore.DeviceLibrary
}
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I07_BatchAxisUp))
{
if (IOManager.IOValue(IO_Type.SuckingDisc_Air).Equals(IO_VALUE.HIGH))
// if (IOManager.IOValue(IO_Type.SuckingDisc_Air).Equals(IO_VALUE.HIGH))
if (IOManager.IOValue(IO_Type.Clamping_Work).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.Clamping_Relax).Equals(IO_VALUE.LOW))
{
TimeSpan span = DateTime.Now - StoreMove.LastSetpTime;
......@@ -459,7 +466,7 @@ namespace OnlineStore.DeviceLibrary
{
StoreManager.Store.LoguStatus();
//一分钟还未开始,报警超时
// WarnMsg = "[" + StoreMove.MoveStep + "]" + ResourceControl.GetString(ResourceControl.TimeOut, "超时") + "[等待可以入库][" + Math.Round(span.TotalSeconds, 0) + "秒]";
// WarnMsg = "[" + StoreMove.MoveStep + "]" + ResourceControl.GetString(ResourceControl.TimeOut, "超时") + "[等待可以入库][" + Math.Round(span.TotalSeconds, 0) + "秒]";
SetWarnMsg(ResourceControl.WaitInstoreTimeOut, StoreMove.MoveStep + "", Math.Round(span.TotalSeconds, 0) + "");
LogUtil.error(WarnObj.WarnMsg, 105);
StoreManager.Store.Alarm(StoreAlarmType.BatchIoTimeOut, "", WarnObj.WarnMsg, StoreMove.MoveType);
......@@ -480,7 +487,9 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I09_WaitTrayLeave);
LogUtil.info(Name + "入料: 开始入库【" + LastPosId + "】,等待料盘拿走");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Air, IO_VALUE.LOW));
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Air, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Clamping_Relax, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Clamping_Work, IO_VALUE.LOW));
}
else
{
......@@ -591,13 +600,15 @@ namespace OnlineStore.DeviceLibrary
private static void SuckingDiscWork()
{
IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
// IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I05_SuckingDisc_Work);
SuckingDisc_WorkCount++;
LogUtil.info(Name + "入料: 吸盘开始第" + SuckingDisc_WorkCount + "次工作");
IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.HIGH);
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(500));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Air, IO_VALUE.HIGH));
// IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.HIGH);
// StoreMove.WaitList.Add(WaitResultInfo.WaitTime(500));
// StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Air, IO_VALUE.HIGH));
CylinderMove(IO_Type.Clamping_Relax, IO_Type.Clamping_Work, StoreMove);
StoreMove.OneWaitCanEndStep = true;
}
......
......@@ -131,16 +131,17 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error("等待[" + wait.ToStr() + "],重写气缸DO(" + ioType + "=" + ioValue + ")");
IOManager.IOMove(ioType, ioValue);
}
}else if (wait.IoType.Equals(IO_Type.SuckingDisc_Air))
{
string ioType = IO_Type.SuckingDisc_Work;
IO_VALUE doValue = IOManager.DOValue(ioType);
if (!doValue.Equals(wait.IoValue))
{
LogUtil.error("等待[" + NotOkMsg + "],重写DO(" + ioType + "=" + wait.IoValue + ")");
IOManager.IOMove(ioType, wait.IoValue);
}
}
//else if (wait.IoType.Equals(IO_Type.SuckingDisc_Air))
//{
// string ioType = IO_Type.SuckingDisc_Work;
// IO_VALUE doValue = IOManager.DOValue(ioType);
// if (!doValue.Equals(wait.IoValue))
// {
// LogUtil.error("等待[" + NotOkMsg + "],重写DO(" + ioType + "=" + wait.IoValue + ")");
// IOManager.IOMove(ioType, wait.IoValue);
// }
//}
}
}
else if (wait.WaitType == (int)Wait_Type.Time_3)
......@@ -712,5 +713,16 @@ namespace OnlineStore.DeviceLibrary
}
return "";
}
public static void CylinderMove( string IoLowType, string IoHighType,StoreMoveInfo moveInfo=null)
{
IOManager.IOMove(IoLowType, IO_VALUE.LOW);
IOManager.IOMove(IoHighType, IO_VALUE.HIGH);
if (moveInfo != null)
{
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IoLowType, IO_VALUE.LOW));
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IoHighType, IO_VALUE.HIGH));
}
}
}
}
......@@ -122,11 +122,11 @@ namespace OnlineStore.LoadCSVLibrary
//public static string DoorColse_Single = "DoorColse_Single";
/// <summary>
/// 吸盘气缸上升端 SuckingDisc_Up X07 DI-07
/// 抓取气缸上升端 SuckingDisc_Up X07 DI-07
/// </summary>
public static string ClampingDisc_Up = "SuckingDisc_Up";
/// <summary>
/// 吸盘气缸下降端 SuckingDisc_Down X08 DI-08
/// 抓取气缸下降端 SuckingDisc_Down X08 DI-08
/// </summary>
public static string ClampingDisc_Down = "SuckingDisc_Down";
/// <summary>
......@@ -229,13 +229,13 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
public static string Clamping_Relax = "Clamping_Relax";
/// <summary>
/// 吸盘压力确认信号 SuckingDisc_Air 202 192.168.200.11 0 吸盘压力确认信号 X19 DI-23
/// </summary>
public static string SuckingDisc_Air = "SuckingDisc_Air";
/// <summary>
/// DO 吸盘吸料SOL SuckingDisc_Work 107 192.168.200.10 0 吸盘吸料SOL Y08 DO-08
/// </summary>
public static string SuckingDisc_Work = "SuckingDisc_Work";
///// <summary>
///// 吸盘压力确认信号 SuckingDisc_Air 202 192.168.200.11 0 吸盘压力确认信号 X19 DI-23
///// </summary>
//public static string SuckingDisc_Air = "SuckingDisc_Air";
///// <summary>
///// DO 吸盘吸料SOL SuckingDisc_Work 107 192.168.200.10 0 吸盘吸料SOL Y08 DO-08
///// </summary>
//public static string SuckingDisc_Work = "SuckingDisc_Work";
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!