using OpcBasic;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Web;
using System.Web.Http;
using MesWork;
using System.Collections.Concurrent;
using DoWhatPlc;
using Newtonsoft.Json.Linq;
namespace MesWorkWebApp
{
public partial class PLC1Controller : ApiController
{
///
/// MES保存完数据(必须MIS)(X102.2)(20)
///
///
///
[HttpGet]
public void Write_MesReadOver(string opName, bool tagValue)
{
PlcLinkForm.Write_MesReadOver(opName, tagValue);
}
///
/// 加工时间保存完数据 DBX102.1 (54)
///
///
///
[HttpGet]
public void Write_MachineTime_ReadOver(string opName, bool tagValue)
{
PlcLinkForm.Write_MachineTime_ReadOver(opName, tagValue);
}
///
/// 工位三种状态:在线、离线、屏蔽(0,1,2)(DBB116)(79)
///
///
///
[HttpGet]
public void Write_OnLineState(string opName, int tagValue)
{
PlcLinkForm.Write_OnLineState(opName, tagValue);
}
///
/// 托盘编号(PLC)(80)
///
///
///
[HttpGet]
public static void Write_PalletCode(string opName, int tagValue)
{
PlcLinkForm.Write_PalletCode(opName, tagValue);
}
///
/// MES向PLC传递机型(5)
///
///
///
[HttpGet]
public void Write_EngineTypeGetOver_MES(string opName, bool tagValue)
{
PlcLinkForm.Write_EngineTypeGetOver_MES(opName, tagValue);
}
///
/// 工作完成(7)
///
///
///
[HttpGet]
public void Write_MaterialVerifyOver(string opName, bool tagValue)
{
PlcLinkForm.Write_MaterialVerifyOver(opName, tagValue);
}
///
/// 合格方式放行(51)
///
///
///
[HttpGet]
public void Write_ConfirmOkGo(string opName, bool tagValue)
{
PlcLinkForm.Write_ConfirmOkGo(opName, tagValue);
}
///
/// 允许拧紧(66)
///
///
///
[HttpGet]
public void Write_FixAllow(string opName, bool tagValue)
{
PlcLinkForm.Write_FixAllow(opName, tagValue);
}
///
/// 拧紧结束(67)
///
///
///
[HttpGet]
public void Write_FixOver(string opName, bool tagValue)
{
PlcLinkForm.Write_FixOver(opName, tagValue);
}
///
///返修上线,在上线工位,MES依据工件情况,设定为返修件,PLC见到MES设定为1后,将返修标志写入到DBX0.2为1
///MES设定完返修返修上线后,MES清空该信号
///DBX3.7(72)
///
///
///
[HttpGet]
public void Write_RepairUpline_MES(string opName, bool tagValue)
{
PlcLinkForm.Write_RepairUpline_MES(opName, tagValue);
}
///
/// 匹配完成(68)
///
///
///
[HttpGet]
public void Write_MatchingCompleted(string opName, bool tagValue)
{
PlcLinkForm.Write_MatchingCompleted(opName, tagValue);
}
///
/// 不合格放行(8)
///
///
///
[HttpGet]
public void Write_FalseGO(string opName, bool tagValue)
{
PlcLinkForm.Write_FalseGO(opName, tagValue);
}
///
/// 匹配结果(69)
///
///
///
[HttpGet]
public void Write_Match(string opName, bool tagValue)
{
PlcLinkForm.Write_Match(opName, tagValue);
}
///
/// 变量类型代码=73,机型代码。DBB404~405 机型标志
///
///
///
[HttpGet]
public void Write_EngineTypeID_MES(string opName, int tagValue)
{
PlcLinkForm.Write_EngineTypeID_MES(opName, tagValue);
}
///
/// 变量类型代码=74,零件编号。DBB406~445 发动机编号
///
///
///
[HttpGet]
public void Write_EngineID_MES(string opName, string tagValue)
{
PlcLinkForm.Write_EngineID_MES(opName, tagValue);
}
///
/// 变量类型代码=75,零件机型。DBB446~485 发动机机型
///
///
///
[HttpGet]
public void Write_EngineType_MES(string opName, string tagValue)
{
PlcLinkForm.Write_EngineType_MES(opName, tagValue);
}
///
/// 拧紧序号(77)
///
///
///
[HttpGet]
public void Write_ProcessCode(string opName, int tagValue)
{
PlcLinkForm.Write_ProcessCode(opName, tagValue);
}
///
/// 套筒号(88)
///
///
///
[HttpGet]
public void Write_BoltCode(string opName, int tagValue)
{
PlcLinkForm.Write_BoltCode(opName, tagValue);
}
///
/// 空托盘放行(DBX2.2)(6)
///
///
///
[HttpGet]
public void Write_PartPalletGoOver(string opName, int tagValue)
{
PlcLinkForm.Write_PartPalletGoOver(opName, tagValue);
}
///
/// 自动手动申请工件编号,0是自动方式;1:手动方式。切换时,(DBX2.1)(71)
///
///
///
[HttpGet]
public void Write_IsAutoGetEngineID(string opName, int tagValue)
{
PlcLinkForm.Write_IsAutoGetEngineID(opName, tagValue);
}
///
/// 正常拧紧时选择(DBX100.3)(81)
///
///
///
[HttpGet]
public void Write_Normal(string opName, int tagValue)
{
PlcLinkForm.Write_Normal(opName, tagValue);
}
///
/// 备用拧紧时选择(DBX100.4)(82)
///
///
///
[HttpGet]
public void Write_UnNormal(string opName, int tagValue)
{
PlcLinkForm.Write_UnNormal(opName, tagValue);
}
///
/// 变量类型代码=52,复位设备(MES)DBX0.6
/// 通知PLC复位设备
///
///
///
[HttpGet]
public void Write_ResetDevice(string opName, bool tagValue)
{
PlcLinkForm.Write_ResetDevice(opName, tagValue);
}
///
///托盘状态(22)
///
///
///
[HttpGet]
public void Write_PalletInfo(string opName, int tagValue)
{
PlcLinkForm.Write_PalletInfo(opName, tagValue);
}
///
/// 返修标志(93)
///
///
///
[HttpGet]
public void Write_RepairStatusMES(string opName, int tagValue)
{
PlcLinkForm.Write_RepairStatusMES(opName, tagValue);
}
///
/// MES通知PLC修改托盘状态成功
///
///
///
[HttpGet]
public void Write_UpdatePalletOK(string opName, bool tagValue)
{
PlcLinkForm.Write_UpdatePalletOK(opName, tagValue);
}
}
}