Commit 6a9b44ec LN

1

1 个父辈 25fc7d60
正在显示 51 个修改的文件 包含 28 行增加1384 行删除
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
......@@ -19,20 +19,15 @@ namespace OnlineStore.ACPackingStore
public partial class FrmAxisDebug : FrmBase
{
//private KTK_LA_BoxBean store;
private ConfigMoveAxis middle = null;
private ConfigMoveAxis updown = null;
//private ConfigMoveAxis compress = null;
private ConfigMoveAxis inout = null;
private ConfigMoveAxis comp = null;
//private int compress_Slv = 0;
private BoxBean boxBean = null;
// public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public FrmAxisDebug(BoxBean boxBean)
{
middle = boxBean.Config.Middle_Axis;
updown = boxBean.Config.UpDown_Axis;
//compress_Slv = boxBean.Config.CompressAxis_Slv;
comp = boxBean.Config.Comp_Axis;
inout = boxBean.Config.InOut_Axis;
......@@ -56,16 +51,10 @@ namespace OnlineStore.ACPackingStore
txtComSpeed.Text = (comp.TargetSpeed/5).ToString();
timer1.Start();
}
/// <summary>
/// 判断进出轴是否在P1点
/// </summary>
private bool InOutIsIsP1()
{
int InOutDefaultPosition = ConfigAppSettings.GetIntValue(Setting_Init.InOutDefaultPosition);
//if (InOutDefaultPosition > 3000 || InOutDefaultPosition.Equals(0))
//{
// InOutDefaultPosition = 3000;
//}
int currValue = ACServerManager.GetActualtPosition(inout.DeviceName, inout.GetAxisValue());
if (currValue <= InOutDefaultPosition)
{
......
此文件的差异太大,无法显示。
......@@ -49,7 +49,7 @@ namespace OnlineStore.ACPackingStore
}
this.groupBox3.Text = "设备[" + BoxBean.CID + "]状态";
this.Text = BoxBean.Name;
axisMoveControl1.LoadData( BoxBean.moveAxisList.ToArray());
axisMoveControl1.LoadData( new AxisBean[] { });
ACBoxPosition ktkPosition = null;
if (BoxBean.PositionNumList.Count > 0)
{
......@@ -58,7 +58,6 @@ namespace OnlineStore.ACPackingStore
ktkPosition = CSVPositionReader<ACBoxPosition>.GetPositon(cmbPosition.Text);
//BoxBean.PositionNumList = positionNumList;
}
ShelfPosition shelrfP = null;
txtMiddleP1.Text = BoxBean.Config.MiddleAxis_P1.ToString();
......@@ -118,7 +117,7 @@ namespace OnlineStore.ACPackingStore
chbDebug.Checked = BoxBean.IsDebug;
LoadOk = true;
}
lblTemp.Text = BoxBean.humBean.currTempStr;
// lblTemp.Text = BoxBean.humBean.currTempStr;
lblWarnMsg.Text = BoxBean.GetWarnMsg();
lblMoveInfo.Text = BoxBean.GetMoveStr();
......@@ -344,7 +343,7 @@ namespace OnlineStore.ACPackingStore
string positionConfigFile = appPath + ConfigAppSettings.GetValue(Setting_Init.Store_Position_Config);
if (!File.Exists(positionConfigFile))
{
string nameStr = BoxBean.DeviceID.ToString();
string nameStr = BoxBean.ID.ToString();
positionConfigFile = positionConfigFile.Replace(".csv", "_" + nameStr + ".csv");
}
bool result = CSVPositionReader<ACBoxPosition>.SavePostion(positionConfigFile, ktkPosition);
......@@ -721,9 +720,9 @@ namespace OnlineStore.ACPackingStore
private void btnSelTemp_Click(object sender, EventArgs e)
{
HumitureParam param = BoxBean.humBean.QueryData();
txtTemp.Text = param.Temperate.ToString();
txtHum.Text = param.Humidity.ToString();
// HumitureParam param = BoxBean.humBean.QueryData();
// txtTemp.Text = param.Temperate.ToString();
// txtHum.Text = param.Humidity.ToString();
}
internal void DebugStatus(bool isDebug)
......@@ -804,7 +803,7 @@ namespace OnlineStore.ACPackingStore
ioIP = BoxBean.Config.DIList[IO_Type.Compress_Check].IO_IP;
ioIndex = BoxBean.Config.DIList[IO_Type.Compress_Check].GetIOAddr();
}
FrmPositionTool frm = new FrmPositionTool(PortName, slvAddr, ioIP, ioIndex, Text, BoxBean.DeviceID);
FrmPositionTool frm = new FrmPositionTool(PortName, slvAddr, ioIP, ioIndex, Text, BoxBean.ID);
frm.ShowDialog();
}
......@@ -828,18 +827,5 @@ namespace OnlineStore.ACPackingStore
}
/// <summary>
/// 忽略料叉信号,使出库继续运行
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnClearcurState_Click(object sender, EventArgs e)
{
if (BoxBean.MoveInfo.MoveStep.Equals(StoreMoveStep.SO_07_CheckComSig))
{
BoxBean.IsIgnoreComSig = true;
BoxBean.MoveInfo.EndStepWait();
}
}
}
}
......@@ -36,7 +36,7 @@ namespace OnlineStore.ACPackingStore
InitializeComponent();
this.boxBean = store;
this.StoreId = store.DeviceID;
this.StoreId = store.ID;
LoadIOList();
}
......@@ -296,15 +296,10 @@ namespace OnlineStore.ACPackingStore
private void button4_Click(object sender, EventArgs e)
{
//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.LineStop();
}
private void btnStoreOn_Click(object sender, EventArgs e)
......@@ -319,7 +314,6 @@ namespace OnlineStore.ACPackingStore
private void btnCloseCyDo_Click(object sender, EventArgs e)
{
boxBean.DoorBean.Stop();
boxBean.IOMove(IO_Type.EntranceDoor_Open, IO_VALUE.LOW);
boxBean.IOMove(IO_Type.EntranceDoor_Close, IO_VALUE.LOW);
boxBean.IOMove(IO_Type.TopCylinder_Down, IO_VALUE.LOW);
......@@ -330,26 +324,6 @@ namespace OnlineStore.ACPackingStore
// boxBean.IOMove(IO_Type.LocationCylinder_Up, IO_VALUE.LOW);
}
private void btnOpenDoor_Click(object sender, EventArgs e)
{
// boxBean.CylinderMove(null, IO_Type.EntranceDoor_Close, IO_Type.EntranceDoor_Open);
if (!boxBean.DoorBean.StartOpen(null))
{
MessageBox.Show("打开移门失败");
}
}
private void btnCloseDoor_Click(object sender, EventArgs e)
{
if (!boxBean.DoorBean.StartClose(null))
{
MessageBox.Show("关闭移门失败");
}
// boxBean.CylinderMove(null, IO_Type.EntranceDoor_Open, IO_Type.EntranceDoor_Close);
}
private void btnDoorStop_Click(object sender, EventArgs e)
{
boxBean.DoorBean.Stop();
}
private void btnNgLine_Click(object sender, EventArgs e)
{
......@@ -363,7 +337,6 @@ namespace OnlineStore.ACPackingStore
private void btnLineBack_Click(object sender, EventArgs e)
{
boxBean.LineBackRun();
}
}
}
namespace OnlineStore.ACPackingStore
{
partial class FrmRFIPEdit
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmRFIPEdit));
this.label1 = new System.Windows.Forms.Label();
this.btnBack = new System.Windows.Forms.Button();
this.txtIP = new System.Windows.Forms.TextBox();
this.comboxType = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.lblResult = new System.Windows.Forms.Label();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label1.Location = new System.Drawing.Point(83, 46);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(107, 20);
this.label1.TabIndex = 0;
this.label1.Text = "请选择读卡器:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnBack
//
this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnBack.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBack.Location = new System.Drawing.Point(259, 183);
this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(120, 45);
this.btnBack.TabIndex = 274;
this.btnBack.Text = "退出";
this.btnBack.UseVisualStyleBackColor = false;
this.btnBack.Click += new System.EventHandler(this.btnBack_Click);
//
// txtIP
//
this.txtIP.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtIP.Location = new System.Drawing.Point(195, 88);
this.txtIP.Name = "txtIP";
this.txtIP.Size = new System.Drawing.Size(233, 26);
this.txtIP.TabIndex = 276;
//
// comboxType
//
this.comboxType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboxType.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.comboxType.FormattingEnabled = true;
this.comboxType.Location = new System.Drawing.Point(195, 43);
this.comboxType.Name = "comboxType";
this.comboxType.Size = new System.Drawing.Size(233, 28);
this.comboxType.TabIndex = 277;
this.comboxType.SelectedIndexChanged += new System.EventHandler(this.comboxType_SelectedIndexChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label2.Location = new System.Drawing.Point(111, 90);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(78, 20);
this.label2.TabIndex = 278;
this.label2.Text = "读卡器IP:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// button1
//
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button1.Location = new System.Drawing.Point(115, 183);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(120, 45);
this.button1.TabIndex = 281;
this.button1.Text = "读取测试";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.lblResult);
this.groupBox2.Controls.Add(this.comboxType);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.button1);
this.groupBox2.Controls.Add(this.txtIP);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Controls.Add(this.btnBack);
this.groupBox2.Location = new System.Drawing.Point(22, 12);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(505, 249);
this.groupBox2.TabIndex = 291;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "读取RFID";
//
// lblResult
//
this.lblResult.AutoSize = true;
this.lblResult.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblResult.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblResult.Location = new System.Drawing.Point(195, 131);
this.lblResult.Name = "lblResult";
this.lblResult.Size = new System.Drawing.Size(79, 20);
this.lblResult.TabIndex = 284;
this.lblResult.Text = "读取到数据";
this.lblResult.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// FrmRFIPEdit
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(560, 285);
this.Controls.Add(this.groupBox2);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmRFIPEdit";
this.Text = "托盘编码";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmRFIPEdit_FormClosed);
this.Load += new System.EventHandler(this.FrmPwd_Load);
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnBack;
private System.Windows.Forms.TextBox txtIP;
private System.Windows.Forms.ComboBox comboxType;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label lblResult;
}
}
\ 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.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.ACPackingStore
{
internal partial class FrmRFIPEdit : FrmBase
{
internal FrmRFIPEdit()
{
InitializeComponent();
}
private Dictionary<string, string> rfMap = new Dictionary<string, string>();
private void FrmPwd_Load(object sender, EventArgs e)
{
comboxType.Items.Clear();
foreach (AC_BOX_Bean b in StoreManager.Store.BoxMap.Values)
{
string key = b.Name + "-托盘RF";
string value = b.Config.RFID_IP;
rfMap.Add(key, value);
comboxType.Items.Add(key);
}
comboxType.SelectedIndex = 0;
//comType.SelectedIndex = 0;
List<string> List = new List<string>();
List = new List<string>(rfMap.Values);
if (StoreManager.Store.storeRunStatus <= StoreRunStatus.Wait)
{
RFIDManager.Open(List.ToArray());
}
}
private void btnBack_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
private void button1_Click(object sender, EventArgs e)
{
string ip = txtIP.Text;
RFIDData data = RFIDManager.ReadRFID(ip);
string resul = "";
if (data != null)
{
resul = data.NumStr();
//numNum.Value = data.Num;
//int selIndex = data.RFType - 64;
//if (selIndex >= 0 && selIndex <= comboxType.Items.Count)
//{
// comboxType.SelectedIndex = selIndex;
//}
}
lblResult.Text = resul;
MessageBox.Show("读取到数据:" + resul);
}
private void comboxType_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboxType.SelectedIndex >= 0)
{
string V = rfMap[comboxType.Text];
if (!txtIP.Text.Equals(V))
{
txtIP.Text = V;
}
}
}
private void FrmRFIPEdit_FormClosed(object sender, FormClosedEventArgs e)
{
if (StoreManager.Store.storeRunStatus <= StoreRunStatus.Wait)
{
// RFIDManager.Close();
}
}
}
}
此文件的差异太大,无法显示。
......@@ -272,7 +272,7 @@ namespace OnlineStore.ACPackingStore
停止所有料仓TToolStripMenuItem_Click(null, null);
}
RFIDManager.Close();
//RFIDManager.Close();
}
private void btnClearLog_Click(object sender, EventArgs e)
{
......
......@@ -85,7 +85,6 @@
<Compile Include="device\halcon\CodeManager.cs" />
<Compile Include="device\IO\AIOBOX\AIOBOXManager.cs" />
<Compile Include="device\IO\IOManager.cs" />
<Compile Include="device\RFIDManager.cs" />
<Compile Include="store\AutoInoutInfo.cs" />
<Compile Include="store\LineMoveP.cs" />
<Compile Include="store\LineAlarm.cs">
......

namespace Asa.IOModule
{
/// <summary>
/// IO模块寄存器
/// </summary>
public class Reg
{
/// <summary>
/// 标识
/// </summary>
public int ID;
/// <summary>
/// 文本,仅用于显示
/// </summary>
public string Text;
/// <summary>
/// 寄存器地址
/// </summary>
public Box_Addr Address;
/// <summary>
/// 当前的状态
/// </summary>
public Box_Sta Status;
/// <summary>
/// 寄存器,文本空,状态OFF
/// </summary>
/// <param name="address">地址</param>
public Reg(Box_Addr address) : this(0, "", address, Box_Sta.Off)
{
}
/// <summary>
/// 寄存器,状态OFF
/// </summary>
/// <param name="text">文本</param>
/// <param name="addr">地址</param>
public Reg(string text, Box_Addr addr) : this(0, text, addr, Box_Sta.Off)
{
}
/// <summary>
/// 寄存器,状态OFF
/// </summary>
/// <param name="id">标志</param>
/// <param name="text">文本</param>
/// <param name="addr">地址</param>
public Reg(int id, string text, Box_Addr addr) : this(id, text, addr, Box_Sta.Off)
{
}
/// <summary>
/// 寄存器
/// </summary>
/// <param name="text">文本</param>
/// <param name="addr">地址</param>
/// <param name="status">状态</param>
public Reg(string text, Box_Addr addr, Box_Sta status) : this(0, text, addr, status)
{
}
/// <summary>
/// 寄存器
/// </summary>
/// <param name="id">标志</param>
/// <param name="text">文本</param>
/// <param name="address">地址</param>
/// <param name="status">状态</param>
public Reg(int id, string text, Box_Addr address, Box_Sta status)
{
ID = id;
Text = text;
Address = address;
Status = status;
}
}
/// <summary>
/// IO模块寄存器地址
/// </summary>
public enum Box_Addr : int
{
/// <summary>
/// 输入点,DI01
/// </summary>
DI_1,
/// <summary>
/// 输入点,DI02
/// </summary>
DI_2,
/// <summary>
/// 输入点,DI03
/// </summary>
DI_3,
/// <summary>
/// 输入点,DI04
/// </summary>
DI_4,
/// <summary>
/// 输入点,DI05
/// </summary>
DI_5,
/// <summary>
/// 输入点,DI06
/// </summary>
DI_6,
/// <summary>
/// 输入点,DI07
/// </summary>
DI_7,
/// <summary>
/// 输入点,DI08
/// </summary>
DI_8,
/// <summary>
/// 输入点,DI09
/// </summary>
DI_9,
/// <summary>
/// 输入点,DI10
/// </summary>
DI_10,
/// <summary>
/// 输入点,DI11
/// </summary>
DI_11,
/// <summary>
/// 输入点,DI12
/// </summary>
DI_12,
/// <summary>
/// 输入点,DI13
/// </summary>
DI_13,
/// <summary>
/// 输入点,DI14
/// </summary>
DI_14,
/// <summary>
/// 输入点,DI15
/// </summary>
DI_15,
/// <summary>
/// 输入点,DI16
/// </summary>
DI_16,
/// <summary>
/// 输出点,DO01
/// </summary>
DO_1,
/// <summary>
/// 输出点,DO02
/// </summary>
DO_2,
/// <summary>
/// 输出点,DO03
/// </summary>
DO_3,
/// <summary>
/// 输出点,DO04
/// </summary>
DO_4,
/// <summary>
/// 输出点,DO05
/// </summary>
DO_5,
/// <summary>
/// 输出点,DO06
/// </summary>
DO_6,
/// <summary>
/// 输出点,DO07
/// </summary>
DO_7,
/// <summary>
/// 输出点,DO08
/// </summary>
DO_8,
/// <summary>
/// 输出点,DO09
/// </summary>
DO_9,
/// <summary>
/// 输出点,DO10
/// </summary>
DO_10,
/// <summary>
/// 输出点,DO11
/// </summary>
DO_11,
/// <summary>
/// 输出点,DO12
/// </summary>
DO_12,
/// <summary>
/// 输出点,DO13
/// </summary>
DO_13,
/// <summary>
/// 输出点,DO14
/// </summary>
DO_14,
/// <summary>
/// 输出点,DO15
/// </summary>
DO_15,
/// <summary>
/// 输出点,DO16
/// </summary>
DO_16,
/// <summary>
/// 无
/// </summary>
NONE = 255
}
/// <summary>
/// IO模块类型
/// </summary>
public enum Box_Type : int
{
/// <summary>
/// 16位,8DI + 8DO
/// </summary>
DIO_16,
/// <summary>
/// 32位,16DI + 16DO
/// </summary>
DIO_32,
/// <summary>
/// 16位DO
/// </summary>
DO_16
}
/// <summary>
/// IO模块寄存器状态
/// </summary>
public enum Box_Sta : int
{
/// <summary>
/// 断开,关闭,低电平
/// </summary>
Off = 0,
/// <summary>
/// 闭合,打开,高电平
/// </summary>
On = 255
}
}
\ No newline at end of file
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace OnlineStore.DeviceLibrary
{
public abstract class IOManager
{
public static IOManager instance = null;
#region KNDIO
public static void IOMove(string ioType, IO_VALUE ioValue)
{
if (StoreManager.Config.DOList.ContainsKey(ioType))
{
ConfigIO configIo = StoreManager.Config.DOList[ioType];
//DateTime time = DateTime.Now;
instance.WriteSingleDO(configIo.DeviceName, configIo.SlaveID, configIo.GetIOAddr(), ioValue);
//TimeSpan span = DateTime.Now - time;
//if (span.TotalMilliseconds > 100)
//{
// LogUtil.error("IOMove [" + ioType + "] ["+ioValue+"]耗时" + span.TotalMilliseconds);
//}
Thread.Sleep(60);
}
else
{
LogUtil.error("没有DO=" + ioType);
}
}
public static IO_VALUE IOValue(string ioType)
{
IO_VALUE ioValue = IO_VALUE.LOW;
if (StoreManager.Config.DILIst.ContainsKey(ioType))
{
ConfigIO configIo = StoreManager.Config.DILIst[ioType];
ioValue = instance.GetDIValue(configIo.DeviceName, configIo.SlaveID, configIo.GetIOAddr());
//UpdateDoValue(ioType, ioValue);
}
else if (StoreManager.Config.DOList.ContainsKey(ioType))
{
ConfigIO configIo = StoreManager.Config.DOList[ioType];
ioValue = instance.GetDOValue(configIo.DeviceName, configIo.SlaveID, configIo.GetIOAddr());
}
else
{
LogUtil.error("没有DO=" + ioType);
}
return ioValue;
}
public static IO_VALUE DOValue(string ioType)
{
IO_VALUE ioValue = IO_VALUE.LOW;
if (StoreManager.Config.DOList.ContainsKey(ioType))
{
ConfigIO configIo = StoreManager.Config.DOList[ioType];
ioValue = instance.GetDOValue(configIo.DeviceName, configIo.SlaveID, configIo.GetIOAddr());
}
else
{
LogUtil.error("没有DO=" + ioType);
}
return ioValue;
}
#endregion
public static void Init()
{
bool isAIOBox = ConfigAppSettings.GetIntValue(Setting_Init.UseAIOBOX).Equals(1);
if (isAIOBox)
{
instance = new AIOBOXManager();
}
else
{
instance = new KNDManager();
}
}
protected static ushort GetDILength(string ioIp)
{
try
{
return StoreManager.Config.GetDILength(ioIp);
}
catch (Exception ex)
{
}
return 16;
}
protected static ushort GetDOLength(string ioIp)
{
try
{
return StoreManager.Config.GetDOLength(ioIp);
}
catch (Exception ex)
{
}
return 16;
}
public abstract void ConnectionIOList(List<string> dIODeviceNameList);
public abstract void ReadAllDI(string deviceName, byte slaveId);
public abstract void ReadAllDO(string deviceName, byte slaveId);
public abstract void WriteSingleDO(string deviceName, byte slaveId, ushort index, IO_VALUE value, int time);
public abstract void WriteSingleDO(string deviceName, byte slaveId, ushort index, IO_VALUE value);
public abstract IO_VALUE GetDIValue(string deviceName, byte slaveID, ushort v);
public abstract IO_VALUE GetDOValue(string deviceName, byte slaveID, ushort v);
public abstract IO_VALUE GetIOValue(ConfigIO configIO);
public abstract void CloseAllDO();
public abstract void CloseAllConnection();
}
}
using DeviceLib;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OnlineStore.DeviceLibrary
{
/// <summary>
/// 批量上下料 轴,检测料盘检测信号处理
/// </summary>
public class BatchAxisController
{
private static bool IsStop = false;
private static System.Timers.Timer checkTimer = null;
private static string TargetIoType = IO_Type.TrayCheck_LoadMaterial;
private static IO_VALUE TargetIoValue = IO_VALUE.HIGH;
public static bool StartCheck(string targetIo, IO_VALUE value = IO_VALUE.HIGH)
{
if (checkTimer == null)
{
checkTimer = new System.Timers.Timer();
checkTimer.AutoReset = true;
checkTimer.Interval += 30;
checkTimer.Elapsed += CheckTimer_Elapsed;
checkTimer.Enabled = false;
}
TargetIoValue = value;
TargetIoType = targetIo;
checkTimer.Start();
return true;
}
public static bool StopCheck()
{
if (!(checkTimer == null))
{
checkTimer.Stop();
}
return true;
}
private static bool IsInProcess = false;
private static DateTime preTime = DateTime.Now;
private static void CheckTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
if (IsInProcess) { return; }
IsInProcess = true;
bool result = false;
if (IOManager.IOValue(TargetIoType).Equals(TargetIoValue))
{
LogUtil.info("批量上料轴,检测到 " + TargetIoType + "="+TargetIoValue+",可以停止运动");
result = true;
}
//else if (IOManager.IOValue(IO_Type.BatchAxis_Limit).Equals(IO_VALUE.HIGH))
//{
// LogUtil.info("批量上料轴,检测到正极限信号,可以停止运动");
// result = true;
//}
if (result)
{
//AutoAxisIsMove = 0;
LogUtil.debug("批量上料轴, 停止运动");
ACServerManager.SuddenStop(StoreManager.Config.Batch_Axis.DeviceName, StoreManager.Config.Batch_Axis.GetAxisValue());
StopCheck();
}
preTime = DateTime.Now;
IsInProcess = false;
}
}
}
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Timers;
namespace OnlineStore.DeviceLibrary
{
/// <summary>
/// 压紧机构计量检测信号处理
/// </summary>
public class MeteringSignal
{
public static int ComAxisChangeValue = ConfigAppSettings.GetIntValue(Setting_Init.ComAxisChangeValue);
/// <summary>
/// 信号变化次数
/// </summary>
public static int SignalChangeCount=0;
public static int TargetChangeCount = 0;
public static IO_VALUE PreSignalValue = IO_VALUE.LOW;
private static System.Timers.Timer timer = null;
public static void StartCheck(int targetPositon, int currPosition)
{
int chazhi = Math.Abs(targetPositon - currPosition);
int count = chazhi / ComAxisChangeValue;
if (count > 0 && chazhi > ComAxisChangeValue)
{
StartCheck(count);
}
}
private static void StartCheck(int targetCount)
{
TargetChangeCount = targetCount;
if (timer == null)
{
timer = new System.Timers.Timer();
timer.Interval = 20;
timer.AutoReset = true;
timer.Elapsed += Timer_Elapsed;
timer.Enabled = false;
}
LogUtil.debug("开始压紧轴计量检测,预计变化" + TargetChangeCount + "次");
IsInProcess = false;
PreSignalValue = IO_VALUE.LOW;
SignalChangeCount = 0;
timer.Start();
}
public static void StopCheck()
{
if (timer==null)
{ return; }
timer.Stop();
TargetChangeCount = 0;
SignalChangeCount = 0;
}
private static bool IsInProcess = false;
protected static void Timer_Elapsed(object sender, ElapsedEventArgs e)
{
if (IsInProcess) { return; }
IsInProcess = true;
IO_VALUE value = IOManager.IOValue(IO_Type.CompressAxis_Check);
if (value.Equals(IO_VALUE.HIGH) && PreSignalValue.Equals(IO_VALUE.LOW))
{
SignalChangeCount++;
LogUtil.info("MeteringSignal检测到信号变化,已经变化" + SignalChangeCount + "次(目标次数"+ TargetChangeCount + ")");
}
PreSignalValue = value;
if (TargetChangeCount <= SignalChangeCount)
{
timer.Stop();
}
IsInProcess = false;
}
}
}
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Asa.RFID.RFIDAuto;
namespace Asa.RFID
{
public class RFIDAutoReader
{
public static readonly ILog LOGGER = LogManager.GetLogger("TheRFID");
private static Dictionary<string, RFIDAuto> rfidMap = new Dictionary<string, RFIDAuto>();
/// <summary>
/// 打开所有
/// </summary>
/// <param name="ipArr"></param>
/// <param name="OnReceive"></param>
/// <param name="ip"></param>
public static void Open(Received_Event OnReceive, params string[] ipArr)
{
foreach (var ip in ipArr)
{
if (rfidMap.ContainsKey(ip))
{
rfidMap[ip].StartAutoScan(OnReceive);
}
else
{
RFIDAuto rfid = new RFIDAuto(ip);
rfid.StartAutoScan(OnReceive);
rfidMap.Add(ip, rfid);
}
}
}
/// <summary>
/// 获取最后读到的标签并清理
/// </summary>
/// <param name="ip"></param>
/// <returns></returns>
public static byte[] ReadAndClear(string ip)
{
if (rfidMap.ContainsKey(ip))
{
return rfidMap[ip].ReadAndClear();
}
return null;
}
/// <summary>
/// 获取最后读到的标签
/// </summary>
/// <param name="ip"></param>
/// <returns></returns>
public static byte[] Read(string ip)
{
if (rfidMap.ContainsKey(ip))
{
return rfidMap[ip].Read();
}
return null;
}
/// <summary>
/// 关闭所有
/// </summary>
public static void CloseAll()
{
foreach (var rfid in rfidMap.Values)
{
rfid.StopAutoScan();
}
}
}
}

using Asa.RFID;
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary
{
public class RFIDManager
{
private static bool IsOpen = false;
public static void Open(string[] iparray)
{
if (IsOpen)
{
LogUtil.info("RFIDManager.Open , IsOpen = true , return ");
return;
}
Task.Factory.StartNew(delegate
{
LogUtil.info("RFIDManager.Open , set IsOpen = true");
IsOpen = true;
try
{
RFIDAutoReader.Open(null, iparray);
}
catch (Exception ex)
{
LogUtil.error("Open 出错:" + ex.ToString());
}
});
}
public static RFIDData ReadRFID(string ip, bool isClear = false)
{
try
{
if (String.IsNullOrEmpty(ip).Equals(false))
{
byte[] bdata = null;
if (isClear)
{
bdata = RFIDAutoReader.ReadAndClear(ip);
}
else
{
bdata = RFIDAutoReader.Read(ip);
}
if (bdata == null)
{
LogUtil.error("RFID [ " + ip + " ] 读到数据=null");
}
RFIDData data = new RFIDData(bdata);
return data;
}
}
catch (Exception ex)
{
//LogUtil.error("ReadRFID["+ip+"]出错:" + ex.ToString());
}
return new RFIDData();
}
public static void Close()
{
Task.Factory.StartNew(delegate
{
IsOpen = false;
LogUtil.info("RFIDManager.Close ,set IsOpen= false");
try
{
RFIDAutoReader.CloseAll();
}
catch (Exception ex)
{
LogUtil.error("关闭RFID出错:" + ex.ToString());
}
});
}
}
public class RFIDData
{
/// <summary>
/// RFID类型,区分是料架还是托盘,托盘E=69,包装料料架A=65,料串=B
/// </summary>
public char RFType = '0';
public int Num = 0;
public RFIDData(int num = 0, int t = 0)
{
if (t < 65)
{
RFType = '0';
}
else
{
this.RFType = (char)t;
}
this.Num = num;
}
public RFIDData(byte[] data)
{
try
{
if (data != null && data.Length > 2)
{
if (data[1] < 65)
{
RFType = '0';
}
else
{
RFType = (char)data[1];
}
Num = (int)(data[2]);
}
}
catch (Exception ex)
{
LogUtil.error("RFIP 数据【" + data + "】 获取编码失败");
}
}
public byte[] ToData()
{
return new byte[] { (byte)RFType, (byte)Num };
}
public string NumStr()
{
return "" + RFType + "" + Num.ToString() + "";
}
}
}
using Asa.RFID;
using OnlineStore.Common;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public class RFIDManager
{
private static ReadAll readAll = new ReadAll("TheRFID");
private static bool IsOpen = false;
private static ConcurrentDictionary<string, string> LastRfidMap = new ConcurrentDictionary<string, string>();
public static void Open(string[] iparray)
{
if (IsOpen)
{
return;
}
try
{
// readAll.Received += ReadAll_Received;
// readAll.Log += ReadAll_Log;
readAll.Start();
IsOpen = true;
}
catch (Exception ex)
{
LogUtil.error("Open 出错:" + ex.ToString());
}
}
private static void ReadAll_Log(string ip, string log)
{
LogUtil.LOGGER.Info("RFID : [" + ip + "] " + log);
}
public static RFIDData ReadRFID(string ip, bool isClear = false)
{
try
{
if (String.IsNullOrEmpty(ip).Equals(false))
{
string outValue = readAll.Read(ip);
if (isClear)
{
readAll.Clear(ip);
}
if (outValue.Equals("000"))
{
// LogUtil.error("ReadRFID[" + ip + "]=" + outValue);
}
RFIDData data = new RFIDData(outValue);
return data;
}
}
catch (Exception ex)
{
LogUtil.error("ReadRFID[" + ip + "] [" + isClear + "] 出错:" + ex.ToString());
}
return new RFIDData();
}
public static void Close()
{
try
{
readAll.Stop();
}
catch (Exception ex)
{
LogUtil.error("关闭RFID出错:" + ex.ToString());
}
}
}
public class RFIDData
{
public string StrData = "";
public RFIDData(string data = "00")
{
if (String.IsNullOrEmpty(data))
{
data = "00";
}
this.StrData = data;
}
public string NumStr()
{
return StrData;
}
internal static bool IsRealRfid(string shelfRfid)
{
//判断料架号是否是真实的料架号
if (shelfRfid.StartsWith("C") || shelfRfid.StartsWith("D"))
{
int num = -1;
try
{
num = Convert.ToInt32(shelfRfid.Substring(1, shelfRfid.Length - 1));
}
catch (Exception ex)
{
}
if (num > 0)
{
return true;
}
}
return false;
}
}
}
......@@ -67,9 +67,9 @@ namespace OnlineStore.DeviceLibrary
//添加调试
IsDebug = config.IsInDebug.Equals(1);
Name = (" BOX_" + config.Id + " ").ToUpper();
this.DeviceID = config.Id; ;
this.ID = config.Id; ;
this.Config = config;
DoorBean = new EnteryDoorBean(DeviceID);
DoorBean = new EnteryDoorBean(ID);
//温湿度
humBean = new HumitureBean(config.Humiture_Port, Name);
// humBean.Init();
......@@ -79,20 +79,12 @@ namespace OnlineStore.DeviceLibrary
PositionNumList = new List<string>();
foreach (ACBoxPosition position in positionList)
{
if (position.StoreId.Equals(DeviceID) && ACBoxPosition.CheckPosition(position, Config))
if (position.StoreId.Equals(ID) && ACBoxPosition.CheckPosition(position, Config))
{
PositionNumList.Add(position.PositionNum);
}
}
List<ShelfPosition> sPlist = CSVPositionReader<ShelfPosition>.getPositionList();
ShelfPosList = new List<string>();
foreach (ShelfPosition p in sPlist)
{
if (p.StoreId.Equals(DeviceID))
{
ShelfPosList.Add(p.PositionNum);
}
}
mainTimer.Enabled = false;
int isAuto = ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun);
if (isAuto == 1)
......
......@@ -340,10 +340,6 @@ namespace OnlineStore.DeviceLibrary
private void UpdateShelfId()
{
//读取RFID
RFIDData data = RFIDManager.ReadRFID(Config.RFID_IP, true);
CurrShelfID = data.NumStr();
LogUtil.info(Name + "更新当前料架号CurrShelfID=【" + CurrShelfID + "】,LastRfidID=【" + GetLastRfid() + "】");
}
......
......@@ -77,7 +77,7 @@ namespace OnlineStore.DeviceLibrary
{
if (MoveInfo.MoveParam.ShelfPosID.Equals(""))
{
MoveInfo.MoveParam.UpdateShelfPosId(ShelfPosList[0]);
// MoveInfo.MoveParam.UpdateShelfPosId(ShelfPosList[0]);
InOutStoreLog("出库 " + MoveInfo.SLog + ": ShelfPosID未设置,默认ShelfPosID=" + MoveInfo.MoveParam.ShelfPosID);
}
}
......@@ -129,7 +129,7 @@ namespace OnlineStore.DeviceLibrary
{
if (MoveInfo.MoveParam.ShelfPosID.Equals(""))
{
MoveInfo.MoveParam.UpdateShelfPosId(ShelfPosList[0]);
// MoveInfo.MoveParam.UpdateShelfPosId(ShelfPosList[0]);
InOutStoreLog("出库 " + MoveInfo.SLog + ": ShelfPosID未设置,默认ShelfPosID=" + MoveInfo.MoveParam.ShelfPosID);
}
// LastRfidID = MoveInfo.MoveParam.rfid;
......@@ -337,7 +337,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(StoreMoveStep.BS_09_WaitTime);
InOutStoreLog(moveName + MoveInfo.SLog + ":再转动1000 , 等待入料口无信号,清理RFID");
RFIDManager.ReadRFID(Config.RFID_IP, true);
// RFIDManager.ReadRFID(Config.RFID_IP, true);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineIn_Check, IO_VALUE.LOW));
}
......@@ -568,7 +568,7 @@ namespace OnlineStore.DeviceLibrary
if (humBean.NeedGetTem())
{
lineOperation.op = 5;
LogUtil.error(Name + "没有湿度预警范围,需要从服务器获取,发送OP=" + lineOperation.op, DeviceID + 105);
LogUtil.error(Name + "没有湿度预警范围,需要从服务器获取,发送OP=" + lineOperation.op, ID + 105);
}
string server = ConfigAppSettings.GetValue(Setting_Init.http_server);
Operation resultOperation = HttpHelper.Post(StoreManager.GetPostApi(server), lineOperation, false);
......
......@@ -46,9 +46,9 @@ namespace OnlineStore.DeviceLibrary
InitTimer();
baseConfig = lineConfig;
this.Config = lineConfig;
this.DeviceID = lineConfig.Id;
this.ID = lineConfig.Id;
MoveInfo = new StoreMoveInfo(DeviceID);
MoveInfo = new StoreMoveInfo(ID );
Name = (" Store_" + Config.CID + " ").ToUpper();
List<string> ioList = new List<string>();
......@@ -138,7 +138,7 @@ namespace OnlineStore.DeviceLibrary
StartTime = DateTime.Now;
//AgvClient.SetCancelState(false);
RFIDManager.Open(rfidList.ToArray());
//RFIDManager.Open(rfidList.ToArray());
mainTimer.Enabled = false;
isInSuddenDown = false;
......
......@@ -111,24 +111,6 @@ namespace OnlineStore.DeviceLibrary
}
string shelfConfig = appPath + ConfigAppSettings.GetValue(Setting_Init.Shelf_Position_Config);
//if (File.Exists(shelfConfig))
//{
// CSVPositionReader<ShelfPosition>.AddCSVFile(shelfConfig);
//}
if (count > 1 || (!File.Exists(shelfConfig)))
{
for (int i = 1; i <= count; i++)
{
string nameStr = i.ToString().PadLeft(1, '0');
string fileN = shelfConfig.Replace(".csv", "_" + nameStr + ".csv");
CSVPositionReader<ShelfPosition>.AddCSVFile(fileN, i);
}
}
else
{
CSVPositionReader<ShelfPosition>.AddCSVFile(shelfConfig);
}
Store = new DUOStoreBean(Config, storeConfig);
}
}
......@@ -195,12 +177,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(box.Name + "GetPositon[" + param.PosID + "]=null,没有库位不能执行出入库");
return false;
}
ShelfPosition sp = CSVPositionReader<ShelfPosition>.GetPositon(param.ShelfPosID);
if (sp == null && needCheckShelf)
{
LogUtil.error(box.Name + "GetPositon[" + param.ShelfPosID + "]=null,没有库位不能执行出入库");
return false;
}
if (String.IsNullOrEmpty(param.PlateH))
{
param.PlateH = position.BagHigh.ToString();
......@@ -209,13 +186,7 @@ namespace OnlineStore.DeviceLibrary
{
param.PlateW = position.BagWidth.ToString();
}
if (sp != null)
{
p.InOut_P101 = sp.InoutAxis_P101;
p.UpDown_LP101 = sp.UpDownAxis_LP101;
p.UpDown_HP102 = sp.UpDownAxis_HP102;
p.Middle_P101 = sp.MiddleAxis_P101;
}
p.ComPress_P1 = box.Config.CompAxis_P1_Position;
p.InOut_P1 = box.Config.InOutAxis_P1_Position;
......
......@@ -153,21 +153,7 @@ namespace OnlineStore.DeviceLibrary
return "["+rfid+"][" + PosID + "][" + ShelfPosID + "][" + PlateW + "x" + PlateH + "][" + WareCode + "]";
}
internal void UpdateShelfPosId(string pId)
{
this.ShelfPosID = pId;
ShelfPosition sp = CSVPositionReader<ShelfPosition>.GetPositon(ShelfPosID);
if (sp == null)
{
LogUtil.error( "GetPositon[" + ShelfPosID + "]=null,没有库位不能执行出入库");
}
MoveP.InOut_P101 = sp.InoutAxis_P101;
MoveP.UpDown_LP101 = sp.UpDownAxis_LP101;
MoveP.UpDown_HP102 = sp.UpDownAxis_HP102;
MoveP.Middle_P101 = sp.MiddleAxis_P101;
}
internal void UpdatePosId(string message, string posId, string plateW, string plateH,int comP2,int comP3)
{
......@@ -198,16 +184,8 @@ namespace OnlineStore.DeviceLibrary
WareCode = wareNo;
this.ShelfPosID = ShelfPosID;
this.rfid = rfid;
ShelfPosition sp = CSVPositionReader<ShelfPosition>.GetPositon(ShelfPosID);
if (sp == null)
{
LogUtil.error("GetPositon[" + ShelfPosID + "]=null,没有库位不能执行出入库");
}
MoveP.InOut_P101 = sp.InoutAxis_P101;
MoveP.UpDown_LP101 = sp.UpDownAxis_LP101;
MoveP.UpDown_HP102 = sp.UpDownAxis_HP102;
MoveP.Middle_P101 = sp.MiddleAxis_P101;
PosID = posId;
ACBoxPosition position = CSVPositionReader<ACBoxPosition>.GetPositon(posId);
......
......@@ -33,7 +33,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
protected static Color storeMoveColor = Color.Blue;
public string Name { get; set; }
public int DeviceID { get; set; }
public int ID { get; set; }
public BaseConfig baseConfig = null;
/// <summary>
/// 料仓状态
......@@ -196,7 +196,7 @@ namespace OnlineStore.DeviceLibrary
break;
default: break;
}
alarmInfo = new AlarmInfo(DeviceID, aType, alarmDetial, alarmMsg, inoutStatus);
alarmInfo = new AlarmInfo(ID, aType, alarmDetial, alarmMsg, inoutStatus);
}
/// <summary>
......@@ -325,7 +325,7 @@ namespace OnlineStore.DeviceLibrary
{
if (!isInit)
{
MoveInfo = new StoreMoveInfo(DeviceID);
MoveInfo = new StoreMoveInfo(ID);
mainTimer = new System.Timers.Timer();
mainTimer.Enabled = false;
......
......@@ -163,7 +163,7 @@ namespace OnlineStore.DeviceLibrary
currShelfPosId = ShelfPositionList[currShelfIndex];
//设置取料位置
MoveParam.UpdateShelfPosId(currShelfPosId);
// MoveParam.UpdateShelfPosId(currShelfPosId);
return true;
}
/// <summary>
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OnlineStore.LoadCSVLibrary
{
public class CSVResourceControl
{
public delegate string GetStrDelegate(string id, string defaultStr);
public static event GetStrDelegate GetStrEvent;
public delegate string GetStringDelegate(string id, string defaultStr, params object[] param);
public static event GetStringDelegate GetStringEvent;
public static string GetString(string id, string defaultStr)
{
string result = GetStrEvent?.Invoke(id, defaultStr);
return result;
}
public static string GetString(string id, string defaultStr, params object[] param)
{
string result = GetStringEvent?.Invoke(id, defaultStr, param);
return result;
}
}
}
......@@ -48,7 +48,6 @@
<ItemGroup>
<Compile Include="CSVExection.cs" />
<Compile Include="position\ACBoxPosition.cs" />
<Compile Include="position\ShelfPosition.cs" />
<Compile Include="storeConfig\ConfigItemBase.cs" />
<Compile Include="storeConfig\ConfigProAttribute.cs" />
<Compile Include="storeConfig\config\Store_Config.cs" />
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OnlineStore.LoadCSVLibrary
{
public class ShelfPosition:PostionBase
{
/// <summary>
/// 旋转轴位置P101
/// </summary>
[CSVAttribute("旋转轴位置P101")]
public int MiddleAxis_P101{ get; set; }
/// <summary>
/// 升降轴低点P101
/// </summary>
[CSVAttribute("升降轴低点P101")]
public int UpDownAxis_LP101 { get; set; }
/// <summary>
/// 升降轴高点P102
/// /// </summary>
[CSVAttribute("升降轴高点P102")]
public int UpDownAxis_HP102{ get; set; }
/// <summary>
/// 进出轴位置P101
/// </summary>
[CSVAttribute("进出轴位置P101")]
public int InoutAxis_P101 { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OnlineStore.LoadCSVLibrary
{
public class StorePostionBase
{
/// <summary>
/// 位置
/// </summary>
[CSVAttribute("位置", "PositionNum")]
public string PositionNum { get; set; }
/// <summary>
/// 优先级
/// </summary>
[CSVAttribute("优先级","Priority")]
public int Priority { get; set; }
/// <summary>
/// 高
/// </summary>
[CSVAttribute("高度", "Height")]
public int BagHeight { get; set; }
/// <summary>
/// 宽
/// </summary>
[CSVAttribute("宽度", "Width")]
public int BagWidth { get; set; }
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!