Commit b07881a1 LN

1

1 个父辈 5f25134d
......@@ -19,6 +19,8 @@
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.button1 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnNGlineStop = new System.Windows.Forms.Button();
this.btnNgLine = new System.Windows.Forms.Button();
this.btnDoorStop = new System.Windows.Forms.Button();
this.btnBlow = new System.Windows.Forms.Button();
this.btnStoreOn = new System.Windows.Forms.Button();
......@@ -48,8 +50,7 @@
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.btnNGlineStop = new System.Windows.Forms.Button();
this.btnNgLine = new System.Windows.Forms.Button();
this.btnLineBack = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
......@@ -75,6 +76,7 @@
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox1.Controls.Add(this.btnLineBack);
this.groupBox1.Controls.Add(this.btnNGlineStop);
this.groupBox1.Controls.Add(this.btnNgLine);
this.groupBox1.Controls.Add(this.btnDoorStop);
......@@ -110,6 +112,30 @@
this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入";
//
// btnNGlineStop
//
this.btnNGlineStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNGlineStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNGlineStop.Location = new System.Drawing.Point(175, 210);
this.btnNGlineStop.Name = "btnNGlineStop";
this.btnNGlineStop.Size = new System.Drawing.Size(125, 34);
this.btnNGlineStop.TabIndex = 298;
this.btnNGlineStop.Text = "NG线体停止";
this.btnNGlineStop.UseVisualStyleBackColor = false;
this.btnNGlineStop.Click += new System.EventHandler(this.btnNGlineStop_Click);
//
// btnNgLine
//
this.btnNgLine.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNgLine.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNgLine.Location = new System.Drawing.Point(12, 210);
this.btnNgLine.Name = "btnNgLine";
this.btnNgLine.Size = new System.Drawing.Size(125, 34);
this.btnNgLine.TabIndex = 297;
this.btnNgLine.Text = "NG线体运转";
this.btnNgLine.UseVisualStyleBackColor = false;
this.btnNgLine.Click += new System.EventHandler(this.btnNgLine_Click);
//
// btnDoorStop
//
this.btnDoorStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
......@@ -150,11 +176,11 @@
//
this.btnStopMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStopMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStopMove.Location = new System.Drawing.Point(175, 429);
this.btnStopMove.Location = new System.Drawing.Point(208, 428);
this.btnStopMove.Name = "btnStopMove";
this.btnStopMove.Size = new System.Drawing.Size(125, 34);
this.btnStopMove.Size = new System.Drawing.Size(92, 34);
this.btnStopMove.TabIndex = 292;
this.btnStopMove.Text = "线体停止转动";
this.btnStopMove.Text = "线体停止";
this.btnStopMove.UseVisualStyleBackColor = false;
this.btnStopMove.Click += new System.EventHandler(this.btnStopMove_Click);
//
......@@ -162,9 +188,9 @@
//
this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
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(12, 429);
this.button4.Location = new System.Drawing.Point(12, 428);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(125, 34);
this.button4.Size = new System.Drawing.Size(92, 34);
this.button4.TabIndex = 291;
this.button4.Text = "线体正转";
this.button4.UseVisualStyleBackColor = false;
......@@ -463,29 +489,17 @@
this.tableLayoutPanel1.Size = new System.Drawing.Size(218, 570);
this.tableLayoutPanel1.TabIndex = 102;
//
// btnNGlineStop
// btnLineBack
//
this.btnNGlineStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNGlineStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNGlineStop.Location = new System.Drawing.Point(175, 210);
this.btnNGlineStop.Name = "btnNGlineStop";
this.btnNGlineStop.Size = new System.Drawing.Size(125, 34);
this.btnNGlineStop.TabIndex = 298;
this.btnNGlineStop.Text = "NG线体停止";
this.btnNGlineStop.UseVisualStyleBackColor = false;
this.btnNGlineStop.Click += new System.EventHandler(this.btnNGlineStop_Click);
//
// btnNgLine
//
this.btnNgLine.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNgLine.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNgLine.Location = new System.Drawing.Point(12, 210);
this.btnNgLine.Name = "btnNgLine";
this.btnNgLine.Size = new System.Drawing.Size(125, 34);
this.btnNgLine.TabIndex = 297;
this.btnNgLine.Text = "NG线体运转";
this.btnNgLine.UseVisualStyleBackColor = false;
this.btnNgLine.Click += new System.EventHandler(this.btnNgLine_Click);
this.btnLineBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLineBack.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLineBack.Location = new System.Drawing.Point(110, 428);
this.btnLineBack.Name = "btnLineBack";
this.btnLineBack.Size = new System.Drawing.Size(92, 34);
this.btnLineBack.TabIndex = 299;
this.btnLineBack.Text = "线体反转";
this.btnLineBack.UseVisualStyleBackColor = false;
this.btnLineBack.Click += new System.EventHandler(this.btnLineBack_Click);
//
// FrmIOStatus
//
......@@ -547,6 +561,7 @@
private System.Windows.Forms.Button btnDoorStop;
private System.Windows.Forms.Button btnNGlineStop;
private System.Windows.Forms.Button btnNgLine;
private System.Windows.Forms.Button btnLineBack;
}
}
......@@ -296,13 +296,15 @@ namespace OnlineStore.ACPackingStore
private void button4_Click(object sender, EventArgs e)
{
BtnMove(button4, "线体正转", "线体反转", IO_Type.Line_Run, IO_Type.Line_BackRun);
//BtnMove(button4, "线体正转", "线体反转", IO_Type.Line_Run, IO_Type.Line_BackRun);
boxBean.LineRun();
}
private void btnStopMove_Click(object sender, EventArgs e)
{
boxBean.IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
boxBean.IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
//boxBean.IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
//boxBean.IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
boxBean.LineStop();
}
private void btnStoreOn_Click(object sender, EventArgs e)
......@@ -358,5 +360,10 @@ namespace OnlineStore.ACPackingStore
{
boxBean.IOMove(IO_Type.NGLine_Run, IO_VALUE.LOW);
}
private void btnLineBack_Click(object sender, EventArgs e)
{
boxBean.LineBackRun();
}
}
}
......@@ -18,13 +18,11 @@ namespace OnlineStore.DeviceLibrary
/// 流水线自动料仓-流水线类
/// </summary>
public partial class PackingStoreBean : KTK_Store
{
{
/// <summary>
/// 灯闪烁定时器
/// </summary>
private System.Timers.Timer ledProcessTimer = null;
private System.Timers.Timer ledProcessTimer = null;
public Dictionary<int, AC_BOX_Config> BoxConfigMap { get; set; }
public Dictionary<int, AC_BOX_Bean> BoxMap = new Dictionary<int, AC_BOX_Bean>();
......@@ -62,12 +60,10 @@ namespace OnlineStore.DeviceLibrary
//增加站号名称
AgvClient.NodeList.Add(config.AgvNodeName);
AddDeviceName(ioList, config.DIODeviceNameList);
BoxMap.Add(config.DeviceID, equip);
BoxConfigMap.Add(config.DeviceID, config);
rfidList.Add(config.RFID_IP);
}
IOManager.Init();
......@@ -86,14 +82,11 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.Alarm_HddLed, IO_VALUE.LOW);
IOMove(IO_Type.AutoRun_HddLed, IO_VALUE.LOW);
IOMove(IO_Type.RunSign_HddLed, IO_VALUE.LOW);
mainTimer.Enabled = true;
mainTimer.Enabled = true;
canStart = true;
});
}
private void AddDeviceName(List<string> targetList, List<string> list)
{
foreach (string str in list)
......@@ -106,21 +99,16 @@ namespace OnlineStore.DeviceLibrary
}
public void InitTimer()
{
ledProcessTimer = new System.Timers.Timer();
ledProcessTimer.Interval = 1000;
ledProcessTimer.Elapsed += LedProcess;
ledProcessTimer.AutoReset = true;
ledProcessTimer.Enabled = false;
ledProcessTimer.Enabled = false;
}
private void IoCheckTimerProcess(object sender, ElapsedEventArgs e)
{
{
}
#endregion
public override bool StartRun(bool isDebug = false)
......@@ -204,8 +192,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(Name + "收到复位信号," + equip.Name + " 正常无报警,不需要复位");
}
}
}
}
mainTimer.Enabled = true;
}
......@@ -250,10 +237,8 @@ namespace OnlineStore.DeviceLibrary
if (box.storeRunStatus > runs)
{
runs = box.storeRunStatus;
}
}
}
}
//黄灯
if (runs.Equals(StoreRunStatus.HomeMoving) || runs.Equals(StoreRunStatus.Reset))
......@@ -267,24 +252,18 @@ namespace OnlineStore.DeviceLibrary
{
IOMove(IO_Type.RunSign_HddLed, IO_VALUE.HIGH);
}
}
}
else
{
if (IsDoValue(IO_Type.RunSign_HddLed, IO_VALUE.HIGH))
{
IOMove(IO_Type.RunSign_HddLed, IO_VALUE.LOW);
}
}
}
if (alarmType.Equals(StoreAlarmType.None).Equals(false) || isNoAirCheck || isInSuddenDown )
{
isNeedAlarmLed = true;
}
}
//忙碌中,判断是否有移栽在出入库执行,绿灯闪烁
if (isInOut)
{
......@@ -331,64 +310,16 @@ namespace OnlineStore.DeviceLibrary
{
return IOValue(ioType).Equals(ioValue);
}
#endregion
#endregion
/// <summary>
/// 定时处理,监听信号,监听IO
/// </summary>
protected override void timersTimer_Elapsed(object sender, ElapsedEventArgs e)
{
//try
//{
// DateTime time = DateTime.Now;
// if (storeRunStatus.Equals(StoreRunStatus.Wait))
// {
// //取新的Io状态
// IO_VALUE fuweiValue = IOValue(IO_Type.Reset_BTN);
// IO_VALUE lastFuwei = DILastValueMap[IO_Type.Reset_BTN];
// addLastDI(IO_Type.Reset_BTN, fuweiValue);
// bool isAutoStart = ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun) == 1;
// //收到复位信号后启动
// if (isAutoStart && fuweiValue.Equals(IO_VALUE.HIGH) && lastFuwei.Equals(IO_VALUE.LOW))
// {
// //没有启动时收到复位按钮,相当于启动按钮
// LogUtil.info( Name + "没有启动时收到复位按钮,相当于启动按钮,开始调用启动方法!");
// bool isOk = StartRun();
// if (!isOk)
// {
// LogUtil.error("启动失败,等待下次启动");
// mainTimer.Enabled = true;
// }
// }
// return;
// }
// //判断急停
// else if (this.storeRunStatus >= StoreRunStatus.HomeMoving)
// {
// foreach (AC_BOX_Bean box in this.BoxMap.Values)
// {
// if (!box.IsDebug)
// {
// box.TimerProcess();
// }
// }
// }
//}
//catch (Exception ex)
//{
// LogUtil.error(Name + "主定时器出错:" + ex.ToString());
//}
//Thread.Sleep(1);
BusyMoveProcess();
}
{
BusyMoveProcess();
}
public override void StopMove()
{
{
foreach (AC_BOX_Bean equip in this.BoxMap.Values)
{
// if (!equip.IsDebug)
......@@ -396,8 +327,7 @@ namespace OnlineStore.DeviceLibrary
equip.StopMove();
}
}
MoveInfo.EndMove();
MoveInfo.EndMove();
}
protected override void ResetProcess()
......
......@@ -323,6 +323,26 @@ namespace OnlineStore.DeviceLibrary
}
return "";
}
public static string ProcessCode(int LastWidth,int LastHeight,List<string> LastScanCodes)
{
string message = "";
string spiltStr = "##";
string codeSize = LastWidth + "x" + LastHeight;
foreach (string str in LastScanCodes)
{
if (str.Trim().Equals(""))
{
continue;
}
string code = "=1+0x0-" + codeSize + "=" + str.Trim();
if (!String.IsNullOrEmpty(code))
{
message = message + code + spiltStr;
}
}
return message;
}
}
public class ServerData
{
......
......@@ -68,6 +68,7 @@
<ItemGroup>
<Compile Include="ACPackingStore\AC_BOX_Bean.cs" />
<Compile Include="ACPackingStore\AC_BOX_Bean_Partial.cs" />
<Compile Include="ACPackingStore\AC_BOX_Bean_Shelf.cs" />
<Compile Include="ACPackingStore\EnteryDoorBean.cs" />
<Compile Include="ACPackingStore\HumitureBean.cs" />
<Compile Include="ACPackingStore\PackingStoreBean.cs" />
......
......@@ -423,17 +423,29 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
BS_03_DoorOpen = 4003,
/// <summary>
/// 通知AGV准备空车
/// </summary>
BS_04_ReadyEmpty=4004,
/// <summary>
/// 送出空料架:线体反转
/// </summary>
BS_04_LineBack= 4004,
BS_05_LineBackRun= 4005,
/// <summary>
/// 送出空料架:等待取料工位无信号,入料口有信号
/// </summary>
BS_05_WaitInLineSingle = 4005,
BS_06_WaitInLineSingle = 4006,
/// <summary>
/// 送出空料架:再转动3000时间
/// </summary>
BS_07_WaitTime = 4007,
/// <summary>
/// 送出空料架:等待AGV离开后关闭仓门
/// </summary>
BS_08_WaitAGVLeave = 4008,
/// <summary>
/// 送出空料架:再转动300时间
/// 送出空料架:关闭仓门
/// </summary>
BS_06_WaitTime = 4006,
BS_09_CloseDoor = 4009,
///// <summary>
///// 送出空料架:停止转动
///// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!