MES系統(tǒng)是一套面向制造企業(yè)車間執(zhí)行層的生產(chǎn)信息化管理系統(tǒng)。為企業(yè)提供包括制造數(shù)據(jù)管理、計(jì)劃排成管理、生產(chǎn)調(diào)度管理、庫存管理、質(zhì)量管理、人力資源管理、工作中心/設(shè)備管理、工具工裝管理、采購管理、成本管理、項(xiàng)目看板管理、生產(chǎn)過程控制、底層數(shù)據(jù)集成分析、上層數(shù)據(jù)集成分解等管理模塊,為企業(yè)打造一個(gè)扎實(shí)、可靠、全面、可行的制造協(xié)同管理平臺(tái)
創(chuàng)新互聯(lián)是一家專注于網(wǎng)站建設(shè)、做網(wǎng)站與策劃設(shè)計(jì),瀾滄網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)做網(wǎng)站,專注于網(wǎng)站建設(shè)十年,網(wǎng)設(shè)計(jì)領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:瀾滄等地區(qū)。瀾滄做網(wǎng)站價(jià)格咨詢:028-86922220系統(tǒng)架構(gòu)項(xiàng)目代碼using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zhaoxi.MES.Frame.Models;
namespace Zhaoxi.MES.Frame.ViewModels
{
public class DeviceViewModel
{
public bool MonitorState { get; set; }
public ListDeviceList { get; set; }
public DeviceViewModel()
{
DeviceList = new List();
App.MqttMessageReceived += App_MqttMessageReceived;
DeviceItemModel dim = new DeviceItemModel();
// 網(wǎng)絡(luò)圖片
dim.Image = "pack://application:,,,/Zhaoxi.MES.Frame;component/Assets/Images/Device/d_1.png";
dim.LightType = Controls.LightState.Fault;
dim.Title = "加工中心";
dim.Properties.Add(new DevicePropertyItemModel { PropName = "運(yùn)行狀態(tài)", PropValue = "故障" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "工作模式", PropValue = "AUTO" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "進(jìn)給倍率", PropValue = "0" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "主軸轉(zhuǎn)速", PropValue = "0" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "主軸負(fù)載", PropValue = "0 r/min" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "程序編號(hào)", PropValue = "7014" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "機(jī)床坐標(biāo)-X", PropValue = "-500 mm" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "機(jī)床坐標(biāo)-Y", PropValue = "-120.002 mm" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "機(jī)床坐標(biāo)-Z", PropValue = "-1.525 mm" });
DeviceList.Add(dim);
dim = new DeviceItemModel();
dim.Image = "pack://application:,,,/Zhaoxi.MES.Frame;component/Assets/Images/Device/d_2.png";
dim.LightType = Controls.LightState.Warning;
dim.Title = "電火花";
dim.Properties.Add(new DevicePropertyItemModel { PropName = "L編號(hào)", PropValue = "31" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "N編號(hào)", PropValue = "0" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "B編號(hào)", PropValue = "0" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "停止編號(hào)", PropValue = "0" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "程序錯(cuò)誤", PropValue = "0" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "運(yùn)行錯(cuò)誤", PropValue = "0" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "順序錯(cuò)誤", PropValue = "0" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "啟動(dòng)ON時(shí)間", PropValue = "0時(shí):0分:0秒" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "加工ON時(shí)間", PropValue = "0時(shí):0分:0秒" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "E條件編號(hào)", PropValue = "909002" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "設(shè)備機(jī)械坐標(biāo)", PropValue = "暫無" });
DeviceList.Add(dim);
dim = new DeviceItemModel();
dim.Image = "pack://application:,,,/Zhaoxi.MES.Frame;component/Assets/Images/Device/d_3.png";
dim.LightType = Controls.LightState.Run;
dim.Title = "機(jī)器臂";
dim.Properties.Add(new DevicePropertyItemModel { PropName = "運(yùn)行狀態(tài)", PropValue = "運(yùn)行" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "工作模式", PropValue = "手動(dòng)" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "關(guān)節(jié)軸J1", PropValue = "-97.979°" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "關(guān)節(jié)軸J2", PropValue = "-31.493°" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "關(guān)節(jié)軸J3", PropValue = "-24.517°" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "關(guān)節(jié)軸J4", PropValue = "-0.032°" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "關(guān)節(jié)軸J5", PropValue = "-34.038°" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "關(guān)節(jié)軸J6", PropValue = "-8.532°" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "關(guān)節(jié)軸J7", PropValue = "3182.790°" });
DeviceList.Add(dim);
dim = new DeviceItemModel();
dim.Image = "pack://application:,,,/Zhaoxi.MES.Frame;component/Assets/Images/Device/d_4.png";
dim.LightType = Controls.LightState.None;
dim.Title = "三坐標(biāo)";
dim.Properties.Add(new DevicePropertyItemModel { PropName = "運(yùn)行狀態(tài)", PropValue = "運(yùn)行" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "工作模式", PropValue = "手動(dòng)" });
DeviceList.Add(dim);
dim = new DeviceItemModel();
dim.Image = "pack://application:,,,/Zhaoxi.MES.Frame;component/Assets/Images/Device/d_5.png";
dim.LightType = Controls.LightState.Run;
dim.Title = "線切割";
dim.Properties.Add(new DevicePropertyItemModel { PropName = "運(yùn)行狀態(tài)", PropValue = "運(yùn)行" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "工作模式", PropValue = "自動(dòng)" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "停止編號(hào)", PropValue = "0" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "程序錯(cuò)誤", PropValue = "0" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "運(yùn)行錯(cuò)誤", PropValue = "0" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "順序錯(cuò)誤", PropValue = "0" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "啟動(dòng)設(shè)定為ON的時(shí)間", PropValue = "0時(shí):0分:0秒" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "加工設(shè)定為ON的時(shí)間", PropValue = "0時(shí):0分:0秒" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "加工條件(E條件)編號(hào)", PropValue = "909002" });
dim.Properties.Add(new DevicePropertyItemModel { PropName = "設(shè)備機(jī)械坐標(biāo)", PropValue = "暫無" });
DeviceList.Add(dim);
}
// 如果小伙伴對(duì)事件委托不理解 加強(qiáng) 一下C#基礎(chǔ)
private void App_MqttMessageReceived(object? sender, string e)
{
// 演示
DeviceList[0].Properties[3].PropValue = e;
//Debug.WriteLine(e);
// 真實(shí)對(duì)接 作業(yè)
//e 就是一個(gè)Json字符串 反序列化 -》 對(duì)象
}
}
}
using System;
using System.Collections.Generic;
using System.DirectoryServices.ActiveDirectory;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zhaoxi.MES.Frame.Models;
using Zhaoxi.MES.Frame.Base;
using System.Collections.ObjectModel;
using System.Reflection;
namespace Zhaoxi.MES.Frame.ViewModels
{
public class MainViewModel:NotifyBase
{
// 菜單 集合
public ListTreeList { get; set; }
// 頁面 集合
public ObservableCollectionPages { get; set; }
= new ObservableCollection();
public MainViewModel()
{
#region 菜單初始化
TreeList = new List();
{
MenuItemModel tim = new MenuItemModel();
tim.Header = "工藝設(shè)計(jì)";
// XAML里使用
tim.IconCode = "\ue610"; // 字體圖標(biāo)編碼,阿里的Iconfont平臺(tái)打包的圖標(biāo)庫
TreeList.Add(tim);
tim.Children.Add(new MenuItemModel
{
Header = "加工工藝",
TargetView = "BlankPage",
OpenViewCommand = new Command(OpenView)
});
tim.Children.Add(new MenuItemModel
{
Header = "EBOM",
TargetView = "BlankPage",
OpenViewCommand = new Command(OpenView)
});
tim.Children.Add(new MenuItemModel
{
Header = "設(shè)備看板",
TargetView = "DevicePage",
OpenViewCommand = new Command(OpenView)
});
tim.Children.Add(new MenuItemModel
{
Header = "PBOM",
TargetView = "PBomPage",
OpenViewCommand = new Command(OpenView)
});
MenuItemModel subMenu = new MenuItemModel();
subMenu.Header = "二級(jí)菜單";
subMenu.Children.Add(
new MenuItemModel
{
Header = "三級(jí)菜單"
}
);
tim.Children.Add(subMenu);
}
#endregion
#region 測(cè)試 頁面初始
// 所有數(shù)據(jù)集合都可以 VM中進(jìn)行控件 (增加和刪除)
//Pages = new ObservableCollection();
//Pages.Add("AAAA");
//Pages.Add("BBBB");
//Pages.Add("CCCC");
//Pages.Add("DDDD");
#endregion
}
private void OpenView(MenuItemModel menu)
{
// 兩個(gè)問題:
// 1、每點(diǎn)擊一次都會(huì)有一個(gè)新的頁面! 解決方案:從集合中判斷是否存在
// 2、新打開一個(gè)頁面后,不能馬上顯示
//MenuItemModel mim = menu as MenuItemModel;
// 需要進(jìn)行頁面的打開
//Pages.Add("EEEE");
var page = Pages.ToList().FirstOrDefault(p =>p.Header == menu.Header);
if (page == null)
{
Type type = Assembly.GetExecutingAssembly().
GetType("Zhaoxi.MES.Frame.Views.Pages." + menu.TargetView);
object p = Activator.CreateInstance(type);
Pages.Add(new PageItemModel
{
Header = menu.Header,
PageView = p,
IsSelected = true,
CloseTabCommand = new Command(ClosePage)
});
}
else
page.IsSelected = true;
}
private void ClosePage(PageItemModel menu)
{
Pages.Remove(menu);
}
}
}
你是否還在尋找穩(wěn)定的海外服務(wù)器提供商?創(chuàng)新互聯(lián)www.cdcxhl.cn海外機(jī)房具備T級(jí)流量清洗系統(tǒng)配攻擊溯源,準(zhǔn)確流量調(diào)度確保服務(wù)器高可用性,企業(yè)級(jí)服務(wù)器適合批量采購,新人活動(dòng)首月15元起,快前往官網(wǎng)查看詳情吧
分享名稱:智能制造MES系統(tǒng)框架-創(chuàng)新互聯(lián)
文章源于:http://jinyejixie.com/article4/jggoe.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供外貿(mào)網(wǎng)站建設(shè)、品牌網(wǎng)站建設(shè)、標(biāo)簽優(yōu)化、網(wǎng)站導(dǎo)航、品牌網(wǎng)站設(shè)計(jì)、網(wǎng)站改版
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容