Commit 41890ca1 几米阳光

压紧轴回原点向上,正方向

1 个父辈 2ab07c86
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
this.btnInOutMove.Name = "btnInOutMove"; this.btnInOutMove.Name = "btnInOutMove";
this.btnInOutMove.Size = new System.Drawing.Size(131, 36); this.btnInOutMove.Size = new System.Drawing.Size(131, 36);
this.btnInOutMove.TabIndex = 10; this.btnInOutMove.TabIndex = 10;
this.btnInOutMove.Text = "进出轴+(后退)"; this.btnInOutMove.Text = "进出轴+(前进)";
this.btnInOutMove.UseVisualStyleBackColor = true; this.btnInOutMove.UseVisualStyleBackColor = true;
this.btnInOutMove.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnInOutMove_MouseDown); this.btnInOutMove.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnInOutMove_MouseDown);
this.btnInOutMove.MouseUp += new System.Windows.Forms.MouseEventHandler(this.btnInOutMove_MouseUp); this.btnInOutMove.MouseUp += new System.Windows.Forms.MouseEventHandler(this.btnInOutMove_MouseUp);
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
this.btnInOutMovej.Name = "btnInOutMovej"; this.btnInOutMovej.Name = "btnInOutMovej";
this.btnInOutMovej.Size = new System.Drawing.Size(131, 36); this.btnInOutMovej.Size = new System.Drawing.Size(131, 36);
this.btnInOutMovej.TabIndex = 14; this.btnInOutMovej.TabIndex = 14;
this.btnInOutMovej.Text = "进出轴-(前进)"; this.btnInOutMovej.Text = "进出轴-(后退)";
this.btnInOutMovej.UseVisualStyleBackColor = true; this.btnInOutMovej.UseVisualStyleBackColor = true;
this.btnInOutMovej.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnInOutMovej_MouseDown); this.btnInOutMovej.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnInOutMovej_MouseDown);
this.btnInOutMovej.MouseUp += new System.Windows.Forms.MouseEventHandler(this.btnInOutMovej_MouseUp); this.btnInOutMovej.MouseUp += new System.Windows.Forms.MouseEventHandler(this.btnInOutMovej_MouseUp);
......
...@@ -98,7 +98,7 @@ namespace OnlineStore.ACSingleStore ...@@ -98,7 +98,7 @@ namespace OnlineStore.ACSingleStore
private void btnInOutMove_MouseDown(object sender, MouseEventArgs e) private void btnInOutMove_MouseDown(object sender, MouseEventArgs e)
{ {
if (ACStoreManager.store.LoacationIsDown().Equals(false)) if ( ACStoreManager.store.InOutAxisCanMove().Equals(false))
{ {
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
...@@ -194,7 +194,7 @@ namespace OnlineStore.ACSingleStore ...@@ -194,7 +194,7 @@ namespace OnlineStore.ACSingleStore
private void btnInOutMovej_MouseDown(object sender, MouseEventArgs e) private void btnInOutMovej_MouseDown(object sender, MouseEventArgs e)
{ {
if (ACStoreManager.store.LoacationIsDown().Equals(false)) if (ACStoreManager.store.InOutAxisCanMove().Equals(false))
{ {
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
......
...@@ -645,7 +645,7 @@ ...@@ -645,7 +645,7 @@
this.txtAPosition.RightToLeft = System.Windows.Forms.RightToLeft.No; this.txtAPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtAPosition.Size = new System.Drawing.Size(75, 23); this.txtAPosition.Size = new System.Drawing.Size(75, 23);
this.txtAPosition.TabIndex = 244; this.txtAPosition.TabIndex = 244;
this.txtAPosition.Text = "30"; this.txtAPosition.Text = "3000";
// //
// label48 // label48
// //
...@@ -1761,55 +1761,55 @@ ...@@ -1761,55 +1761,55 @@
// 查看IOToolStripMenuItem // 查看IOToolStripMenuItem
// //
this.查看IOToolStripMenuItem.Name = "查看IOToolStripMenuItem"; this.查看IOToolStripMenuItem.Name = "查看IOToolStripMenuItem";
this.查看IOToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.查看IOToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.查看IOToolStripMenuItem.Text = "查看IO"; this.查看IOToolStripMenuItem.Text = "查看IO";
this.查看IOToolStripMenuItem.Click += new System.EventHandler(this.查看IOToolStripMenuItem_Click); this.查看IOToolStripMenuItem.Click += new System.EventHandler(this.查看IOToolStripMenuItem_Click);
// //
// toolStripSeparator5 // toolStripSeparator5
// //
this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator5.Size = new System.Drawing.Size(172, 6);
// //
// 料仓运转ONToolStripMenuItem // 料仓运转ONToolStripMenuItem
// //
this.料仓运转ONToolStripMenuItem.Name = "料仓运转ONToolStripMenuItem"; this.料仓运转ONToolStripMenuItem.Name = "料仓运转ONToolStripMenuItem";
this.料仓运转ONToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.料仓运转ONToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.料仓运转ONToolStripMenuItem.Text = "料仓运转ON"; this.料仓运转ONToolStripMenuItem.Text = "料仓运转ON";
this.料仓运转ONToolStripMenuItem.Click += new System.EventHandler(this.料仓运转ONToolStripMenuItem_Click); this.料仓运转ONToolStripMenuItem.Click += new System.EventHandler(this.料仓运转ONToolStripMenuItem_Click);
// //
// toolStripSeparator6 // toolStripSeparator6
// //
this.toolStripSeparator6.Name = "toolStripSeparator6"; this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator6.Size = new System.Drawing.Size(172, 6);
// //
// 料仓运转OFFToolStripMenuItem // 料仓运转OFFToolStripMenuItem
// //
this.料仓运转OFFToolStripMenuItem.Name = "料仓运转OFFToolStripMenuItem"; this.料仓运转OFFToolStripMenuItem.Name = "料仓运转OFFToolStripMenuItem";
this.料仓运转OFFToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.料仓运转OFFToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.料仓运转OFFToolStripMenuItem.Text = "料仓运转OFF"; this.料仓运转OFFToolStripMenuItem.Text = "料仓运转OFF";
this.料仓运转OFFToolStripMenuItem.Click += new System.EventHandler(this.料仓运转OFFToolStripMenuItem_Click); this.料仓运转OFFToolStripMenuItem.Click += new System.EventHandler(this.料仓运转OFFToolStripMenuItem_Click);
// //
// toolStripSeparator7 // toolStripSeparator7
// //
this.toolStripSeparator7.Name = "toolStripSeparator7"; this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator7.Size = new System.Drawing.Size(172, 6);
// //
// 打开舱门ToolStripMenuItem // 打开舱门ToolStripMenuItem
// //
this.打开舱门ToolStripMenuItem.Name = "打开舱门ToolStripMenuItem"; this.打开舱门ToolStripMenuItem.Name = "打开舱门ToolStripMenuItem";
this.打开舱门ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.打开舱门ToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.打开舱门ToolStripMenuItem.Text = "打开仓门"; this.打开舱门ToolStripMenuItem.Text = "打开仓门";
this.打开舱门ToolStripMenuItem.Click += new System.EventHandler(this.打开舱门ToolStripMenuItem_Click); this.打开舱门ToolStripMenuItem.Click += new System.EventHandler(this.打开舱门ToolStripMenuItem_Click);
// //
// toolStripSeparator8 // toolStripSeparator8
// //
this.toolStripSeparator8.Name = "toolStripSeparator8"; this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator8.Size = new System.Drawing.Size(172, 6);
// //
// 关闭仓门ToolStripMenuItem // 关闭仓门ToolStripMenuItem
// //
this.关闭仓门ToolStripMenuItem.Name = "关闭仓门ToolStripMenuItem"; this.关闭仓门ToolStripMenuItem.Name = "关闭仓门ToolStripMenuItem";
this.关闭仓门ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.关闭仓门ToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.关闭仓门ToolStripMenuItem.Text = "关闭仓门"; this.关闭仓门ToolStripMenuItem.Text = "关闭仓门";
this.关闭仓门ToolStripMenuItem.Click += new System.EventHandler(this.关闭仓门ToolStripMenuItem_Click); this.关闭仓门ToolStripMenuItem.Click += new System.EventHandler(this.关闭仓门ToolStripMenuItem_Click);
// //
...@@ -2143,7 +2143,7 @@ ...@@ -2143,7 +2143,7 @@
this.txtLinePosition.Name = "txtLinePosition"; this.txtLinePosition.Name = "txtLinePosition";
this.txtLinePosition.Size = new System.Drawing.Size(103, 23); this.txtLinePosition.Size = new System.Drawing.Size(103, 23);
this.txtLinePosition.TabIndex = 83; this.txtLinePosition.TabIndex = 83;
this.txtLinePosition.Text = "10000"; this.txtLinePosition.Text = "-10000";
// //
// btnHomeMove // btnHomeMove
// //
...@@ -2207,7 +2207,7 @@ ...@@ -2207,7 +2207,7 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(1029, 760); this.ClientSize = new System.Drawing.Size(1029, 749);
this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox3);
......
...@@ -509,7 +509,7 @@ namespace OnlineStore.ACSingleStore ...@@ -509,7 +509,7 @@ namespace OnlineStore.ACSingleStore
// MessageBox.Show("位置超出" + axisC.Explain + "上下限(" + axisC.PositionMin + "-" + axisC.PositionMax + ")"); // MessageBox.Show("位置超出" + axisC.Explain + "上下限(" + axisC.PositionMin + "-" + axisC.PositionMax + ")");
// return; // return;
//} //}
if (portName.Equals(store.Config.InOut_Axis.DeviceName) && (store.LoacationIsDown().Equals(false))) if (portName.Equals(store.Config.InOut_Axis.DeviceName) && (store.InOutAxisCanMove().Equals(false)))
{ {
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
...@@ -523,7 +523,7 @@ namespace OnlineStore.ACSingleStore ...@@ -523,7 +523,7 @@ namespace OnlineStore.ACSingleStore
string portName = txtAxisDeviceName.Text; string portName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue); short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
int speed = FormUtil.GetIntValue(txtASpeed); int speed = FormUtil.GetIntValue(txtASpeed);
if (portName.Equals(store.Config.InOut_Axis.DeviceName) && (store.LoacationIsDown().Equals(false))) if (portName.Equals(store.Config.InOut_Axis.DeviceName) && (store.InOutAxisCanMove().Equals(false)))
{ {
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
...@@ -547,7 +547,7 @@ namespace OnlineStore.ACSingleStore ...@@ -547,7 +547,7 @@ namespace OnlineStore.ACSingleStore
// return; // return;
//} //}
if (portName.Equals(store.Config.InOut_Axis.DeviceName) && (store.LoacationIsDown().Equals(false))) if (portName.Equals(store.Config.InOut_Axis.DeviceName) && (store.InOutAxisCanMove().Equals(false)))
{ {
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
...@@ -763,7 +763,7 @@ namespace OnlineStore.ACSingleStore ...@@ -763,7 +763,7 @@ namespace OnlineStore.ACSingleStore
private void btnInOutP1_Click(object sender, EventArgs e) private void btnInOutP1_Click(object sender, EventArgs e)
{ {
if (store.LoacationIsDown().Equals(false)) if (store.InOutAxisCanMove().Equals(false))
{ {
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
...@@ -774,7 +774,7 @@ namespace OnlineStore.ACSingleStore ...@@ -774,7 +774,7 @@ namespace OnlineStore.ACSingleStore
private void btnInOutP3_Click(object sender, EventArgs e) private void btnInOutP3_Click(object sender, EventArgs e)
{ {
if (store.LoacationIsDown().Equals(false)) if (store.InOutAxisCanMove().Equals(false))
{ {
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
...@@ -785,7 +785,7 @@ namespace OnlineStore.ACSingleStore ...@@ -785,7 +785,7 @@ namespace OnlineStore.ACSingleStore
private void btnInOutP2_Click(object sender, EventArgs e) private void btnInOutP2_Click(object sender, EventArgs e)
{ {
if (store.LoacationIsDown().Equals(false)) if (store.InOutAxisCanMove().Equals(false))
{ {
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
......
...@@ -31,9 +31,9 @@ DO,相机照明开,CameraLight_Power,110,192.168.200.10,0,相机照明开,Y11,DO-11,0, ...@@ -31,9 +31,9 @@ DO,相机照明开,CameraLight_Power,110,192.168.200.10,0,相机照明开,Y11,DO-11,0,
,,,113,192.168.200.10,0,,Y14,DO-14,0, ,,,113,192.168.200.10,0,,Y14,DO-14,0,
,,,114,192.168.200.10,0,,Y15,DO-15,0, ,,,114,192.168.200.10,0,,Y15,DO-15,0,
,,,115,192.168.200.10,0,,Y16,DO-16,0, ,,,115,192.168.200.10,0,,Y16,DO-16,0,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM3,0,,,,, AXIS,(轴一)旋转轴,Middle_Axis,1,COM4,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,1,COM4,0,,,,, AXIS,(轴二)升降轴轴,UpDown_Axis,1,COM5,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,1,COM5,0,,,,, AXIS,(轴三)进出轴,InOut_Axis,1,COM6,0,,,,,
,温湿度传感器地址,Temperate_ServerAddress,192.168.200.14,,,,,,, ,温湿度传感器地址,Temperate_ServerAddress,192.168.200.14,,,,,,,
,扫码枪IP,Scanner_Ip,192.168.200.13,,,,,,, ,扫码枪IP,Scanner_Ip,192.168.200.13,,,,,,,
,扫码枪端口号,Scanner_Port,51236,,,,,,, ,扫码枪端口号,Scanner_Port,51236,,,,,,,
...@@ -105,7 +105,7 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,, ...@@ -105,7 +105,7 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,, PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM1,,,,,,, PRO,温湿度端口号,Humiture_Port,COM1,,,,,,,
,,,,,,,,, , ,,,,,,,,, ,
PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM2,,,,,,, PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM3,,,,,,,
PRO,硕科步进电机(压紧轴)控制波特率,CompressAxis_PortBaudrate,9600,,,,,,, PRO,硕科步进电机(压紧轴)控制波特率,CompressAxis_PortBaudrate,9600,,,,,,,
PRO,硕科步进电机(压紧轴)控制奇偶校验,CompressAxis_PortParity,0,,,,,,, PRO,硕科步进电机(压紧轴)控制奇偶校验,CompressAxis_PortParity,0,,,,,,,
PRO,硕科步进电机(压紧轴)控制停止位,CompressAxis_StopBits,1,,,,,,, PRO,硕科步进电机(压紧轴)控制停止位,CompressAxis_StopBits,1,,,,,,,
......
...@@ -389,7 +389,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -389,7 +389,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack); StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack);
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
ShuoKeControls.HomeMove(Config.CompressAxis_Slv, 0); ShuoKeControls.HomeMove(Config.CompressAxis_Slv, 1);
StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, 0, true)); StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, 0, true));
} }
ACAxisHomeMove(Config.Middle_Axis); ACAxisHomeMove(Config.Middle_Axis);
...@@ -418,7 +418,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -418,7 +418,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, StoreName + "到待机状态,压紧轴回原点,关闭舱门"); LogUtil.info(LOGGER, StoreName + "到待机状态,压紧轴回原点,关闭舱门");
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
ShuoKeControls.HomeMove(Config.CompressAxis_Slv, 0); ShuoKeControls.HomeMove(Config.CompressAxis_Slv, 1);
StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, 1, true)); StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, 1, true));
} }
//关闭舱门 //关闭舱门
...@@ -505,7 +505,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -505,7 +505,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack); StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack);
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
ShuoKeControls.HomeMove(Config.CompressAxis_Slv, 0); ShuoKeControls.HomeMove(Config.CompressAxis_Slv, 1);
StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, 0, true)); StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, 0, true));
} }
ACAxisHomeMove(Config.Middle_Axis); ACAxisHomeMove(Config.Middle_Axis);
......
...@@ -685,8 +685,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -685,8 +685,13 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed); ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
NeedCheckSafetyLight = 1; NeedCheckSafetyLight = 1;
} }
public bool LoacationIsDown() public bool InOutAxisCanMove()
{ {
if (ACStoreManager.store.Config.IsHasLocationCylinder.Equals(0))
{
return true;
}
if (KNDIOValue(IO_Type.LocationCylinder_Down).Equals(IO_VALUE.HIGH) if (KNDIOValue(IO_Type.LocationCylinder_Down).Equals(IO_VALUE.HIGH)
&& KNDIOValue(IO_Type.LocationCylinder_Up).Equals(IO_VALUE.LOW) && KNDIOValue(IO_Type.LocationCylinder_Up).Equals(IO_VALUE.LOW)
&& KNDIOValue(IO_Type.LocationCylinder2_Down).Equals(IO_VALUE.HIGH) && KNDIOValue(IO_Type.LocationCylinder2_Down).Equals(IO_VALUE.HIGH)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!