Commit b4fc74eb LN

侧挡气缸和底部气缸增加禁用功能

1 个父辈 64e1a1b2
...@@ -165,5 +165,9 @@ namespace TSA_V.Common ...@@ -165,5 +165,9 @@ namespace TSA_V.Common
/// 是否需要输入pcb条码 /// 是否需要输入pcb条码
/// </summary> /// </summary>
public static string NeedPCBCode = "NeedPCBCode"; public static string NeedPCBCode = "NeedPCBCode";
public static string DisableSideCylinder = "DisableSideCylinder";
public static string DisableBottomCylinder = "DisableBottomCylinder";
} }
} }
...@@ -21,6 +21,10 @@ namespace TSA_V.DeviceLibrary ...@@ -21,6 +21,10 @@ namespace TSA_V.DeviceLibrary
public static int DefaultPType = ConfigAppSettings.GetIntValue(Setting_Init.DefaultPointType); public static int DefaultPType = ConfigAppSettings.GetIntValue(Setting_Init.DefaultPointType);
public static int DefaultPSize = ConfigAppSettings.GetIntValue(Setting_Init.DefaultPointSize); public static int DefaultPSize = ConfigAppSettings.GetIntValue(Setting_Init.DefaultPointSize);
public static bool DisableSideCylinder = false;
public static bool DisableBottomCylinder = false;
private static string warnMsg = ""; private static string warnMsg = "";
public static string WarnMsg public static string WarnMsg
{ {
...@@ -66,6 +70,8 @@ namespace TSA_V.DeviceLibrary ...@@ -66,6 +70,8 @@ namespace TSA_V.DeviceLibrary
public static string LoadTSAV() public static string LoadTSAV()
{ {
LogUtil.info(Name + "开始加载电机配置。。"); LogUtil.info(Name + "开始加载电机配置。。");
DisableSideCylinder = ConfigAppSettings.GetBoolValue(Setting_Init.DisableSideCylinder);
DisableBottomCylinder = ConfigAppSettings.GetBoolValue(Setting_Init.DisableBottomCylinder);
if (workTimer == null) if (workTimer == null)
{ {
workTimer = new System.Timers.Timer(); workTimer = new System.Timers.Timer();
...@@ -570,7 +576,7 @@ namespace TSA_V.DeviceLibrary ...@@ -570,7 +576,7 @@ namespace TSA_V.DeviceLibrary
LogUtil.info("StopMove,停止所有运动"); LogUtil.info("StopMove,停止所有运动");
BottomCylinderDown(false); BottomCylinderDown(false);
CylinderMove(IOManager.StopCylinder_Down, IOManager.StopCylinder_Up, false); CylinderMove(IOManager.StopCylinder_Down, IOManager.StopCylinder_Up, false);
CylinderMove(IOManager.SideCylinder_Forward, IOManager.SideCylinder_Back, false); SideCyliderBack(false );
Work.StopWork(); Work.StopWork();
LineStep.EndMove(); LineStep.EndMove();
......
...@@ -55,7 +55,7 @@ namespace TSA_V.DeviceLibrary ...@@ -55,7 +55,7 @@ namespace TSA_V.DeviceLibrary
LogUtil.info("开始流水线转动:挡停气缸下降,侧挡气缸后退,底部气缸下降"); LogUtil.info("开始流水线转动:挡停气缸下降,侧挡气缸后退,底部气缸下降");
BottomCylinderDown(true ); BottomCylinderDown(true );
CylinderMove(IOManager.StopCylinder_Up, IOManager.StopCylinder_Down, true ); CylinderMove(IOManager.StopCylinder_Up, IOManager.StopCylinder_Down, true );
CylinderMove(IOManager.SideCylinder_Forward, IOManager.SideCylinder_Back, true ); SideCyliderBack(true );
} }
else else
{ {
...@@ -97,7 +97,7 @@ namespace TSA_V.DeviceLibrary ...@@ -97,7 +97,7 @@ namespace TSA_V.DeviceLibrary
LogUtil.info("检测到流水线前端信号:挡停气缸下降,侧挡气缸后退,底部气缸下降"); LogUtil.info("检测到流水线前端信号:挡停气缸下降,侧挡气缸后退,底部气缸下降");
BottomCylinderDown(true); BottomCylinderDown(true);
CylinderMove(IOManager.StopCylinder_Up, IOManager.StopCylinder_Down, true); CylinderMove(IOManager.StopCylinder_Up, IOManager.StopCylinder_Down, true);
CylinderMove(IOManager.SideCylinder_Forward, IOManager.SideCylinder_Back, true); SideCyliderBack(true);
} }
else else
{ {
...@@ -191,7 +191,7 @@ namespace TSA_V.DeviceLibrary ...@@ -191,7 +191,7 @@ namespace TSA_V.DeviceLibrary
{ {
LineStep.NextMoveStep(LineStepBean.LS06_SideCylindeMove); LineStep.NextMoveStep(LineStepBean.LS06_SideCylindeMove);
LineLog("流水线转动:侧挡气缸前进"); LineLog("流水线转动:侧挡气缸前进");
CylinderMove(IOManager.SideCylinder_Back, IOManager.SideCylinder_Forward, true); SideCyliderForward(true);
} }
else if (LineStep.lineStep.Equals(LineStepBean.LS06_SideCylindeMove)) else if (LineStep.lineStep.Equals(LineStepBean.LS06_SideCylindeMove))
{ {
...@@ -222,7 +222,7 @@ namespace TSA_V.DeviceLibrary ...@@ -222,7 +222,7 @@ namespace TSA_V.DeviceLibrary
LineStep.NextMoveStep(LineStepBean.LS09_StopBack); LineStep.NextMoveStep(LineStepBean.LS09_StopBack);
LineLog("流水线转动:底部气缸下降,侧挡后退,工作统计"); LineLog("流水线转动:底部气缸下降,侧挡后退,工作统计");
BottomCylinderDown(true); BottomCylinderDown(true);
CylinderMove(IOManager.SideCylinder_Forward, IOManager.SideCylinder_Back, true); SideCyliderBack(true);
} }
else if (LineStep.lineStep.Equals(LineStepBean.LS09_StopBack)) else if (LineStep.lineStep.Equals(LineStepBean.LS09_StopBack))
{ {
...@@ -338,24 +338,44 @@ namespace TSA_V.DeviceLibrary ...@@ -338,24 +338,44 @@ namespace TSA_V.DeviceLibrary
public static void BottomCylinderDown(bool isWait=false ) public static void BottomCylinderDown(bool isWait=false )
{ {
if (isWait) if (!DisableBottomCylinder)
{ {
LineStep.WaitList.Add(WaitResultInfo.WaitIO(IOManager.BottomCylinder_Down1, IO_VALUE.HIGH)); if (isWait)
LineStep.WaitList.Add(WaitResultInfo.WaitIO(IOManager.BottomCylinder_Down2, IO_VALUE.HIGH)); {
} LineStep.WaitList.Add(WaitResultInfo.WaitIO(IOManager.BottomCylinder_Down1, IO_VALUE.HIGH));
IOManager.IOMove(IOManager.BottomCylinder_Up, IO_VALUE.LOW); LineStep.WaitList.Add(WaitResultInfo.WaitIO(IOManager.BottomCylinder_Down2, IO_VALUE.HIGH));
IOManager.IOMove(IOManager.BottomCylinder_Down, IO_VALUE.HIGH); }
IOManager.IOMove(IOManager.BottomCylinder_Up, IO_VALUE.LOW);
IOManager.IOMove(IOManager.BottomCylinder_Down, IO_VALUE.HIGH);
}
} }
public static void BottomCylinderUp(bool isWait=false ) public static void BottomCylinderUp(bool isWait = false)
{ {
if (isWait) if (!DisableBottomCylinder)
{ {
LineStep.WaitList.Add(WaitResultInfo.WaitIO(IOManager.BottomCylinder_Down1, IO_VALUE.LOW)); if (isWait)
LineStep.WaitList.Add(WaitResultInfo.WaitIO(IOManager.BottomCylinder_Down2, IO_VALUE.LOW)); {
} LineStep.WaitList.Add(WaitResultInfo.WaitIO(IOManager.BottomCylinder_Down1, IO_VALUE.LOW));
IOManager.IOMove(IOManager.BottomCylinder_Down, IO_VALUE.LOW); LineStep.WaitList.Add(WaitResultInfo.WaitIO(IOManager.BottomCylinder_Down2, IO_VALUE.LOW));
IOManager.IOMove(IOManager.BottomCylinder_Up, IO_VALUE.HIGH); }
IOManager.IOMove(IOManager.BottomCylinder_Down, IO_VALUE.LOW);
IOManager.IOMove(IOManager.BottomCylinder_Up, IO_VALUE.HIGH);
}
}
public static void SideCyliderForward(bool isWait = false)
{
if (!DisableSideCylinder)
{
CylinderMove(IOManager.SideCylinder_Back, IOManager.SideCylinder_Forward, isWait);
}
}
public static void SideCyliderBack(bool isWait=false )
{
if (!DisableSideCylinder)
{
CylinderMove(IOManager.SideCylinder_Forward, IOManager.SideCylinder_Back, isWait);
}
} }
public static void CylinderMove( string lowType, string highType, bool isWait=false ) public static void CylinderMove( string lowType, string highType, bool isWait=false )
...@@ -372,7 +392,7 @@ namespace TSA_V.DeviceLibrary ...@@ -372,7 +392,7 @@ namespace TSA_V.DeviceLibrary
{ {
BottomCylinderDown(isWait); BottomCylinderDown(isWait);
CylinderMove(IOManager.StopCylinder_Down, IOManager.StopCylinder_Up, isWait); CylinderMove(IOManager.StopCylinder_Down, IOManager.StopCylinder_Up, isWait);
CylinderMove(IOManager.SideCylinder_Forward, IOManager.SideCylinder_Back, isWait); SideCyliderBack(isWait);
} }
} }
/// <summary> /// <summary>
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<add key="Line_WidthPosition" value="" /> <add key="Line_WidthPosition" value="" />
<add key="Server_Log_Open" value="0" /> <add key="Server_Log_Open" value="0" />
<!--本地开放的http服务器端口号--> <!--本地开放的http服务器端口号-->
<!--<add key="WebServiceAddr" value="http://localhost:4090/rest/api/v1/station/" />--> <add key="WebServiceAddr" value="http://localhost:4090/rest/api/v1/station/" />
<!--组装完成后上传数据的服务器地址--> <!--组装完成后上传数据的服务器地址-->
<!--<add key="DCSServerAddr" value="http://192.168.8.1:1007/DCS_Integration/Cartridge.asmx?op=CartridgeInfo" />--> <!--<add key="DCSServerAddr" value="http://192.168.8.1:1007/DCS_Integration/Cartridge.asmx?op=CartridgeInfo" />-->
<!--组装工作前,需要输入pcb板条码--> <!--组装工作前,需要输入pcb板条码-->
......
...@@ -57,6 +57,8 @@ ...@@ -57,6 +57,8 @@
this.cmbTestProName = new System.Windows.Forms.ComboBox(); this.cmbTestProName = new System.Windows.Forms.ComboBox();
this.txtCode = new System.Windows.Forms.TextBox(); this.txtCode = new System.Windows.Forms.TextBox();
this.lblCode = new System.Windows.Forms.Label(); this.lblCode = new System.Windows.Forms.Label();
this.chbDisBottomCylinder = new System.Windows.Forms.CheckBox();
this.chbDisSideCylinder = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numSizeY)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numSizeY)).BeginInit();
...@@ -68,11 +70,13 @@ ...@@ -68,11 +70,13 @@
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.chbDisSideCylinder);
this.groupBox1.Controls.Add(this.chbDisBottomCylinder);
this.groupBox1.Controls.Add(this.chbISDebug); this.groupBox1.Controls.Add(this.chbISDebug);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(27, 15); this.groupBox1.Location = new System.Drawing.Point(27, 13);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(541, 70); this.groupBox1.Size = new System.Drawing.Size(541, 134);
this.groupBox1.TabIndex = 284; this.groupBox1.TabIndex = 284;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "其他参数"; this.groupBox1.Text = "其他参数";
...@@ -80,7 +84,7 @@ ...@@ -80,7 +84,7 @@
// chbISDebug // chbISDebug
// //
this.chbISDebug.AutoSize = true; this.chbISDebug.AutoSize = true;
this.chbISDebug.Location = new System.Drawing.Point(103, 28); this.chbISDebug.Location = new System.Drawing.Point(103, 22);
this.chbISDebug.Name = "chbISDebug"; this.chbISDebug.Name = "chbISDebug";
this.chbISDebug.Size = new System.Drawing.Size(183, 21); this.chbISDebug.Size = new System.Drawing.Size(183, 21);
this.chbISDebug.TabIndex = 19; this.chbISDebug.TabIndex = 19;
...@@ -102,9 +106,9 @@ ...@@ -102,9 +106,9 @@
this.groupBox4.Controls.Add(this.label3); this.groupBox4.Controls.Add(this.label3);
this.groupBox4.Controls.Add(this.cmbBoardList); this.groupBox4.Controls.Add(this.cmbBoardList);
this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox4.Location = new System.Drawing.Point(27, 89); this.groupBox4.Location = new System.Drawing.Point(27, 156);
this.groupBox4.Name = "groupBox4"; this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(541, 258); this.groupBox4.Size = new System.Drawing.Size(541, 219);
this.groupBox4.TabIndex = 284; this.groupBox4.TabIndex = 284;
this.groupBox4.TabStop = false; this.groupBox4.TabStop = false;
this.groupBox4.Text = "坐标修正(会修正所选程序的组装坐标,点击更新生效)"; this.groupBox4.Text = "坐标修正(会修正所选程序的组装坐标,点击更新生效)";
...@@ -112,7 +116,7 @@ ...@@ -112,7 +116,7 @@
// numSizeY // numSizeY
// //
this.numSizeY.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.numSizeY.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numSizeY.Location = new System.Drawing.Point(178, 168); this.numSizeY.Location = new System.Drawing.Point(178, 142);
this.numSizeY.Maximum = new decimal(new int[] { this.numSizeY.Maximum = new decimal(new int[] {
255, 255,
0, 0,
...@@ -135,7 +139,7 @@ ...@@ -135,7 +139,7 @@
// numSizeX // numSizeX
// //
this.numSizeX.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.numSizeX.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numSizeX.Location = new System.Drawing.Point(178, 128); this.numSizeX.Location = new System.Drawing.Point(178, 107);
this.numSizeX.Maximum = new decimal(new int[] { this.numSizeX.Maximum = new decimal(new int[] {
255, 255,
0, 0,
...@@ -158,7 +162,7 @@ ...@@ -158,7 +162,7 @@
// numPenWidth // numPenWidth
// //
this.numPenWidth.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.numPenWidth.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numPenWidth.Location = new System.Drawing.Point(178, 208); this.numPenWidth.Location = new System.Drawing.Point(178, 177);
this.numPenWidth.Minimum = new decimal(new int[] { this.numPenWidth.Minimum = new decimal(new int[] {
1, 1,
0, 0,
...@@ -176,7 +180,7 @@ ...@@ -176,7 +180,7 @@
// lblLineWidth // lblLineWidth
// //
this.lblLineWidth.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblLineWidth.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblLineWidth.Location = new System.Drawing.Point(12, 212); this.lblLineWidth.Location = new System.Drawing.Point(12, 181);
this.lblLineWidth.Name = "lblLineWidth"; this.lblLineWidth.Name = "lblLineWidth";
this.lblLineWidth.Size = new System.Drawing.Size(160, 17); this.lblLineWidth.Size = new System.Drawing.Size(160, 17);
this.lblLineWidth.TabIndex = 325; this.lblLineWidth.TabIndex = 325;
...@@ -185,7 +189,7 @@ ...@@ -185,7 +189,7 @@
// //
// label1 // label1
// //
this.label1.Location = new System.Drawing.Point(12, 171); this.label1.Location = new System.Drawing.Point(12, 145);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(160, 17); this.label1.Size = new System.Drawing.Size(160, 17);
this.label1.TabIndex = 306; this.label1.TabIndex = 306;
...@@ -204,7 +208,7 @@ ...@@ -204,7 +208,7 @@
"4=━━", "4=━━",
"5=□", "5=□",
"6=○"}); "6=○"});
this.cmbType.Location = new System.Drawing.Point(178, 86); this.cmbType.Location = new System.Drawing.Point(178, 70);
this.cmbType.Name = "cmbType"; this.cmbType.Name = "cmbType";
this.cmbType.Size = new System.Drawing.Size(119, 28); this.cmbType.Size = new System.Drawing.Size(119, 28);
this.cmbType.TabIndex = 305; this.cmbType.TabIndex = 305;
...@@ -212,7 +216,7 @@ ...@@ -212,7 +216,7 @@
// lbltype // lbltype
// //
this.lbltype.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lbltype.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbltype.Location = new System.Drawing.Point(12, 89); this.lbltype.Location = new System.Drawing.Point(12, 73);
this.lbltype.Name = "lbltype"; this.lbltype.Name = "lbltype";
this.lbltype.Size = new System.Drawing.Size(160, 17); this.lbltype.Size = new System.Drawing.Size(160, 17);
this.lbltype.TabIndex = 304; this.lbltype.TabIndex = 304;
...@@ -224,7 +228,7 @@ ...@@ -224,7 +228,7 @@
this.btnUpdateSize.Anchor = System.Windows.Forms.AnchorStyles.Top; this.btnUpdateSize.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.btnUpdateSize.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnUpdateSize.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdateSize.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnUpdateSize.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpdateSize.Location = new System.Drawing.Point(349, 172); this.btnUpdateSize.Location = new System.Drawing.Point(349, 153);
this.btnUpdateSize.Name = "btnUpdateSize"; this.btnUpdateSize.Name = "btnUpdateSize";
this.btnUpdateSize.Size = new System.Drawing.Size(149, 45); this.btnUpdateSize.Size = new System.Drawing.Size(149, 45);
this.btnUpdateSize.TabIndex = 284; this.btnUpdateSize.TabIndex = 284;
...@@ -234,7 +238,7 @@ ...@@ -234,7 +238,7 @@
// //
// label4 // label4
// //
this.label4.Location = new System.Drawing.Point(12, 130); this.label4.Location = new System.Drawing.Point(12, 109);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(160, 17); this.label4.Size = new System.Drawing.Size(160, 17);
this.label4.TabIndex = 282; this.label4.TabIndex = 282;
...@@ -243,7 +247,7 @@ ...@@ -243,7 +247,7 @@
// //
// label3 // label3
// //
this.label3.Location = new System.Drawing.Point(12, 48); this.label3.Location = new System.Drawing.Point(12, 37);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(160, 17); this.label3.Size = new System.Drawing.Size(160, 17);
this.label3.TabIndex = 281; this.label3.TabIndex = 281;
...@@ -255,7 +259,7 @@ ...@@ -255,7 +259,7 @@
this.cmbBoardList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbBoardList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbBoardList.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.cmbBoardList.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbBoardList.FormattingEnabled = true; this.cmbBoardList.FormattingEnabled = true;
this.cmbBoardList.Location = new System.Drawing.Point(178, 43); this.cmbBoardList.Location = new System.Drawing.Point(178, 32);
this.cmbBoardList.Name = "cmbBoardList"; this.cmbBoardList.Name = "cmbBoardList";
this.cmbBoardList.Size = new System.Drawing.Size(215, 29); this.cmbBoardList.Size = new System.Drawing.Size(215, 29);
this.cmbBoardList.TabIndex = 280; this.cmbBoardList.TabIndex = 280;
...@@ -264,7 +268,7 @@ ...@@ -264,7 +268,7 @@
// //
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCancel.Location = new System.Drawing.Point(312, 561); this.btnCancel.Location = new System.Drawing.Point(312, 568);
this.btnCancel.Name = "btnCancel"; this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(120, 45); this.btnCancel.Size = new System.Drawing.Size(120, 45);
this.btnCancel.TabIndex = 279; this.btnCancel.TabIndex = 279;
...@@ -276,7 +280,7 @@ ...@@ -276,7 +280,7 @@
// //
this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOk.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnOk.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOk.Location = new System.Drawing.Point(161, 561); this.btnOk.Location = new System.Drawing.Point(161, 568);
this.btnOk.Name = "btnOk"; this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(120, 45); this.btnOk.Size = new System.Drawing.Size(120, 45);
this.btnOk.TabIndex = 278; this.btnOk.TabIndex = 278;
...@@ -345,9 +349,9 @@ ...@@ -345,9 +349,9 @@
this.groupBox3.Controls.Add(this.txtCode); this.groupBox3.Controls.Add(this.txtCode);
this.groupBox3.Controls.Add(this.lblCode); this.groupBox3.Controls.Add(this.lblCode);
this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox3.Location = new System.Drawing.Point(27, 351); this.groupBox3.Location = new System.Drawing.Point(27, 379);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(541, 188); this.groupBox3.Size = new System.Drawing.Size(541, 168);
this.groupBox3.TabIndex = 286; this.groupBox3.TabIndex = 286;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "DCS测试"; this.groupBox3.Text = "DCS测试";
...@@ -356,7 +360,7 @@ ...@@ -356,7 +360,7 @@
// //
this.btnTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTest.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnTest.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTest.Location = new System.Drawing.Point(349, 116); this.btnTest.Location = new System.Drawing.Point(349, 103);
this.btnTest.Name = "btnTest"; this.btnTest.Name = "btnTest";
this.btnTest.Size = new System.Drawing.Size(149, 45); this.btnTest.Size = new System.Drawing.Size(149, 45);
this.btnTest.TabIndex = 291; this.btnTest.TabIndex = 291;
...@@ -369,7 +373,7 @@ ...@@ -369,7 +373,7 @@
this.txtAddr.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtAddr.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtAddr.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtAddr.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAddr.Location = new System.Drawing.Point(103, 38); this.txtAddr.Location = new System.Drawing.Point(103, 33);
this.txtAddr.MaxLength = 300; this.txtAddr.MaxLength = 300;
this.txtAddr.Name = "txtAddr"; this.txtAddr.Name = "txtAddr";
this.txtAddr.Size = new System.Drawing.Size(395, 23); this.txtAddr.Size = new System.Drawing.Size(395, 23);
...@@ -378,7 +382,7 @@ ...@@ -378,7 +382,7 @@
// label6 // label6
// //
this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.Location = new System.Drawing.Point(5, 41); this.label6.Location = new System.Drawing.Point(5, 36);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(91, 17); this.label6.Size = new System.Drawing.Size(91, 17);
this.label6.TabIndex = 289; this.label6.TabIndex = 289;
...@@ -388,7 +392,7 @@ ...@@ -388,7 +392,7 @@
// label5 // label5
// //
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.Location = new System.Drawing.Point(6, 131); this.label5.Location = new System.Drawing.Point(6, 118);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(91, 17); this.label5.Size = new System.Drawing.Size(91, 17);
this.label5.TabIndex = 288; this.label5.TabIndex = 288;
...@@ -400,7 +404,7 @@ ...@@ -400,7 +404,7 @@
this.cmbTestProName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbTestProName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbTestProName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.cmbTestProName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbTestProName.FormattingEnabled = true; this.cmbTestProName.FormattingEnabled = true;
this.cmbTestProName.Location = new System.Drawing.Point(103, 127); this.cmbTestProName.Location = new System.Drawing.Point(103, 114);
this.cmbTestProName.Name = "cmbTestProName"; this.cmbTestProName.Name = "cmbTestProName";
this.cmbTestProName.Size = new System.Drawing.Size(215, 25); this.cmbTestProName.Size = new System.Drawing.Size(215, 25);
this.cmbTestProName.TabIndex = 287; this.cmbTestProName.TabIndex = 287;
...@@ -410,7 +414,7 @@ ...@@ -410,7 +414,7 @@
this.txtCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtCode.Location = new System.Drawing.Point(103, 80); this.txtCode.Location = new System.Drawing.Point(103, 70);
this.txtCode.MaxLength = 300; this.txtCode.MaxLength = 300;
this.txtCode.Name = "txtCode"; this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(395, 23); this.txtCode.Size = new System.Drawing.Size(395, 23);
...@@ -420,13 +424,33 @@ ...@@ -420,13 +424,33 @@
// lblCode // lblCode
// //
this.lblCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblCode.Location = new System.Drawing.Point(8, 83); this.lblCode.Location = new System.Drawing.Point(8, 73);
this.lblCode.Name = "lblCode"; this.lblCode.Name = "lblCode";
this.lblCode.Size = new System.Drawing.Size(91, 17); this.lblCode.Size = new System.Drawing.Size(91, 17);
this.lblCode.TabIndex = 15; this.lblCode.TabIndex = 15;
this.lblCode.Text = "条码:"; this.lblCode.Text = "条码:";
this.lblCode.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblCode.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// chbDisBottonCylinder
//
this.chbDisBottomCylinder.AutoSize = true;
this.chbDisBottomCylinder.Location = new System.Drawing.Point(103, 59);
this.chbDisBottomCylinder.Name = "chbDisBottonCylinder";
this.chbDisBottomCylinder.Size = new System.Drawing.Size(99, 21);
this.chbDisBottomCylinder.TabIndex = 20;
this.chbDisBottomCylinder.Text = "禁用底部气缸";
this.chbDisBottomCylinder.UseVisualStyleBackColor = true;
//
// chbDisSideCylinder
//
this.chbDisSideCylinder.AutoSize = true;
this.chbDisSideCylinder.Location = new System.Drawing.Point(103, 96);
this.chbDisSideCylinder.Name = "chbDisSideCylinder";
this.chbDisSideCylinder.Size = new System.Drawing.Size(99, 21);
this.chbDisSideCylinder.TabIndex = 21;
this.chbDisSideCylinder.Text = "禁用侧挡气缸";
this.chbDisSideCylinder.UseVisualStyleBackColor = true;
//
// FrmDeviceConfig // FrmDeviceConfig
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
...@@ -486,5 +510,7 @@ ...@@ -486,5 +510,7 @@
private System.Windows.Forms.TextBox txtCode; private System.Windows.Forms.TextBox txtCode;
private System.Windows.Forms.Label lblCode; private System.Windows.Forms.Label lblCode;
private System.Windows.Forms.Button btnTest; private System.Windows.Forms.Button btnTest;
private System.Windows.Forms.CheckBox chbDisSideCylinder;
private System.Windows.Forms.CheckBox chbDisBottomCylinder;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -43,7 +43,8 @@ namespace TSA_V ...@@ -43,7 +43,8 @@ namespace TSA_V
{ {
LanguageProcess(); LanguageProcess();
this.chbISDebug.Checked = TSAVBean.IsDebug; this.chbISDebug.Checked = TSAVBean.IsDebug;
this.chbDisBottomCylinder.Checked = TSAVBean.DisableBottomCylinder;
this.chbDisSideCylinder.Checked = TSAVBean.DisableSideCylinder;
this.txtKNDIP.Text = IOManager.KNDIP.ToString(); this.txtKNDIP.Text = IOManager.KNDIP.ToString();
this.txtKNDPort.Text = IOManager.KNDPort.ToString(); this.txtKNDPort.Text = IOManager.KNDPort.ToString();
LoadCom(); LoadCom();
...@@ -106,10 +107,20 @@ namespace TSA_V ...@@ -106,10 +107,20 @@ namespace TSA_V
bool isDebug = chbISDebug.Checked; bool isDebug = chbISDebug.Checked;
ConfigAppSettings.SaveValue(Setting_Init.IsDebug, isDebug); ConfigAppSettings.SaveValue(Setting_Init.IsDebug, isDebug);
TSAVBean.IsDebug = isDebug; TSAVBean.IsDebug = isDebug;
bool disBottom = chbDisBottomCylinder.Checked;
ConfigAppSettings.SaveValue(Setting_Init.DisableBottomCylinder,disBottom);
TSAVBean.DisableBottomCylinder = disBottom;
bool disSide = chbDisSideCylinder.Checked;
ConfigAppSettings.SaveValue(Setting_Init.DisableSideCylinder, disSide);
TSAVBean.DisableSideCylinder = disSide;
string server = txtAddr.Text.Trim(); string server = txtAddr.Text.Trim();
ConfigAppSettings.SaveValue(Setting_Init.DCSServerAddr, server); ConfigAppSettings.SaveValue(Setting_Init.DCSServerAddr, server);
MesUtil.serverAddress = server; MesUtil.serverAddress = server;
LogUtil.info("保存配置成功: 调试[" + isDebug + "],地址["+server+"] "); LogUtil.info($"保存配置成功: 调试{ isDebug },禁用底部气缸{disBottom},禁用侧挡气缸{disSide},地址{server} ");
MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SaveOk, "保存成功")); MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SaveOk, "保存成功"));
} }
......
...@@ -2362,4 +2362,6 @@ ...@@ -2362,4 +2362,6 @@
<data name="ItemText_Disable" xml:space="preserve"> <data name="ItemText_Disable" xml:space="preserve">
<value>Disable</value> <value>Disable</value>
</data> </data>
<data name = "FrmDeviceConfig_chbDisSideCylinder_Text" xml:space = "preserve"> <value> Disable the side brake cylinder </value> </data>
<data name = "FrmDeviceConfig_chbDisBottonCylinder_Text" xml:space = "preserve"> <value> Disable bottom cylinder </value> </data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -2376,4 +2376,6 @@ ...@@ -2376,4 +2376,6 @@
<data name="ItemText_Disable" xml:space="preserve"> <data name="ItemText_Disable" xml:space="preserve">
<value>禁用</value> <value>禁用</value>
</data> </data>
<data name = "FrmDeviceConfig_chbDisSideCylinder_Text" xml:space = "preserve"> <value> 禁用侧挡气缸 </value> </data>
<data name = "FrmDeviceConfig_chbDisBottonCylinder_Text" xml:space = "preserve"> <value> 禁用底部气缸 </value> </data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -323,12 +323,12 @@ namespace TSA_V ...@@ -323,12 +323,12 @@ namespace TSA_V
private void btnSideForward_Click(object sender, EventArgs e) private void btnSideForward_Click(object sender, EventArgs e)
{ {
TSAVBean.CylinderMove(IOManager.SideCylinder_Back, IOManager.SideCylinder_Forward); TSAVBean.SideCyliderForward();
} }
private void btnSideBack_Click(object sender, EventArgs e) private void btnSideBack_Click(object sender, EventArgs e)
{ {
TSAVBean.CylinderMove(IOManager.SideCylinder_Forward, IOManager.SideCylinder_Back); TSAVBean.SideCyliderBack();
} }
private void btnBottomUp_Click(object sender, EventArgs e) private void btnBottomUp_Click(object sender, EventArgs e)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!