Files

277 lines
6.5 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Windows.Forms;
namespace AGVSystem.Cls
{
public class AgvInfo
{
public Label agv_id = new Label();
/// <summary>
/// 设备编号
/// </summary>
public int Agv_ID
{
get { return Convert.ToInt16( agv_id.Text); }
set { agv_id.Text = value.ToString(); }
}
/// <summary>
/// 设备序号
/// </summary>
public int Internal_ID;
/// <summary>
/// 设备联网状态
/// </summary>
public bool bPlcLinked = false;
/// <summary>
/// 设备IP
/// </summary>
public string IP;
/// <summary>
/// 联网端口
/// </summary>
public int Port;
/// <summary>
/// AGV类型
/// </summary>
public int Type;
/// <summary>
/// 设备上下线 true:上线,false:下线
/// </summary>
public bool Enable;
/// <summary>
/// 控制PLC型号
/// 1smart200
/// 2:欧姆龙 hostlink
/// 3:欧姆龙 fins
/// 4:单片机
/// </summary>
public int Control_PLC = 1;
/// <summary>
/// 管控线体编号
/// </summary>
public int AssemblyLine;
/// <summary>
/// 设备所属线体名称
/// </summary>
public string AssemblyName;
public Label location_display = new Label();
/// <summary>
/// 设备位置显示标记
/// </summary>
public int Location_Display
{
get {return Convert.ToInt16(location_display.Text); }
set {location_display.Text =value.ToString(); }
}
public int Rfid_Value = 0;
/// <summary>
/// 设备路径显示标记
/// </summary>
public int Path_Display = 0;
/// <summary>
/// 设备放行点标记
/// </summary>
public int Cross_Location_Go = 0;
/// <summary>
/// agv放行信息
/// </summary>
public string go_info = "";
/// <summary>
/// 设备运动目标编号
/// </summary>
public int Cross_Path_Id = 0;
/// <summary>
/// 设备报警代码
/// </summary>
public string Warn_ID = "0";
public Label warn_info = new Label();
/// <summary>
/// 设备报警信息
/// </summary>
public string Warn_info
{
get { return warn_info.Text; }
set { warn_info.Text = value; }
}
/// <summary>
/// 设备报警等级
/// 1:正常
/// 2:报警
/// 3:故障
/// 4:掉网
/// </summary>
public int Warn_Level = 0;
/// <summary>
/// 设备位置显示地图编号
/// </summary>
public int Area;
public Socket Soc;
/// <summary>
/// Agv行驶里程
/// </summary>
public double Mileage = 0;
/// <summary>
/// 读取地标的时间点
/// </summary>
public DateTime Read_dt;
/// <summary>
/// AGV运动状态
/// 定义:1-运动、2-停止、0-未启动
/// </summary>
public byte Run_Status;
/// <summary>
/// 运动方向
/// 定义:1-前进/2-后退
/// </summary>
public byte Run_Direction = 0;
/// <summary>
/// 前进放行
/// 定义:1-直行/2-左转/3-右转
/// </summary>
public byte Go_Direction = 1;
/// <summary>
/// 设备运动速度
/// </summary>
public byte Run_Speed = 0;
/// <summary>
/// 设备电压
/// </summary>
public float Voltage = 0;
/// <summary>
/// 设备电量剩余百分比
/// </summary>
public float Voltage_precent = 0;
/// <summary>
/// 障碍物设置模式
/// </summary>
public byte Bank_Model = 0;
/// <summary>
/// 任务编号
/// </summary>
public int Task_ID = 0;
public int Task_Temp = 0;
public Label task_descrption = new Label();
/// <summary>
/// 任务描述
/// </summary>
public String Task_Descrption
{
get {return task_descrption.Text; }
set
{
task_descrption.Text = value;
}
}
/// <summary>
/// 作业线体编号
/// </summary>
public int WorkType = 0;
public Label have_goods = new Label();
/// <summary>
/// AGV 是否有货
/// </summary>
public bool Have_Goods
{
get { return have_goods.Text=="有货"?true:false; }
set { have_goods.Text = value == false ? "" : "有货"; }
}
public Channel[] Up_Channel ;
public Channel[] Down_Channel ;
////设备绑定的物料ID
//public string Material_ID2 = "";
////上层2料道是否有料
//public byte Up_Loc2 = 0;//是否有料
//public int Task_Up_Loc2 = 0;//目标地址
//public int Machine_Up_ID2 = 0;//对应设备编号
//public byte Up_Loc2_Doing = 0;
////下层1料道是否有料
//public byte Down_Loc1 = 0;
//public int Task_Down_Loc1 = 0;
//public int Machine_Down_ID1 = 0;
//public byte Down_Loc1_Doing = 0;
}
public class Channel
{
//绑定的物料ID
public string Material_ID = "";
//料道是否有料
public byte Goods_Satus = 0;
//物料数量
public int Goods_Qty = 0;
//Channel上的BOX ID1
public int Box_ID1 = 0;
//Channel上的BOX ID2
public int Box_ID2 = 0;
//货物对应的工位ID
public int Channel_Task_ID = 0;
//货物对应的设备ID
public int Machine_ID = 0;
//动作执行状态 1:正在上/下料 0:非上/下料状态
public byte Do_Status = 0;
public byte Do_Up_Status = 0;
public byte Do_Down_Status = 0;
public byte Do_HgQty_Status = 0;//下滑竿标记
public byte Do_Bxg_Status = 0;//上保险杆标记
//mes指令ID
public Int64 Mes_Task_ID = 0;
}
}