|
|
using Module.Plc.ModbusTcp.Model;
|
|
|
using RS.Model;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
namespace Module.Plc.ModbusTcp.Tool
|
|
|
{
|
|
|
public class Common
|
|
|
{
|
|
|
#region
|
|
|
public static bool opening = false;
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// 报警消除
|
|
|
/// </summary>
|
|
|
public static bool arm = false;
|
|
|
/// <summary>
|
|
|
/// 全部初始化
|
|
|
/// </summary>
|
|
|
public static bool allInitialize { get; set; }
|
|
|
/// <summary>
|
|
|
/// BRT初始化
|
|
|
/// </summary>
|
|
|
public static bool brtInitialize { get; set; }
|
|
|
/// <summary>
|
|
|
/// CA初始化
|
|
|
/// </summary>
|
|
|
public static bool caInitialize { get; set; }
|
|
|
/// <summary>
|
|
|
/// SCR1初始化
|
|
|
/// </summary>
|
|
|
public static bool scr1Initialize { get; set; }
|
|
|
/// <summary>
|
|
|
/// SCR2初始化
|
|
|
/// </summary>
|
|
|
public static bool scr2Initialize { get; set; }
|
|
|
/// <summary>
|
|
|
/// SCR3初始化
|
|
|
/// </summary>
|
|
|
public static bool scr3Initialize { get; set; }
|
|
|
/// <summary>
|
|
|
/// SCR4初始化
|
|
|
/// </summary>
|
|
|
public static bool scr4Initialize { get; set; }
|
|
|
#endregion
|
|
|
|
|
|
public static RecipeContent recipeContent1 = new RecipeContent();
|
|
|
public static string ip = "192.168.1.5";
|
|
|
public static string fristFunctionButtons = "操作";
|
|
|
public static string twoFunctionButtons = "主页";
|
|
|
/// <summary>
|
|
|
/// CS1配方是否允许下拉
|
|
|
/// </summary>
|
|
|
public static bool CS1Combox = false;
|
|
|
/// <summary>
|
|
|
/// CS2配方是否允许下拉
|
|
|
/// </summary>
|
|
|
public static bool CS2Combox = false;
|
|
|
/// <summary>
|
|
|
/// CS1配方是否请求下发
|
|
|
/// </summary>
|
|
|
public static bool CS1RecipeLoad = false;
|
|
|
/// <summary>
|
|
|
/// CS2配方是否请求下发
|
|
|
/// </summary>
|
|
|
public static bool CS2RecipeLoad = false;
|
|
|
|
|
|
public static bool CS1RecipeLoadFinish = false;
|
|
|
public static bool CS2RecipeLoadFinish = false;
|
|
|
|
|
|
|
|
|
public static int scr = 0;
|
|
|
public static int unitPageState = 1;
|
|
|
/// <summary>
|
|
|
/// 打开那个界面后判断采集那个界面
|
|
|
/// </summary>
|
|
|
/// <param name="str"></param>
|
|
|
public void GetUnitPageState(int str)
|
|
|
{
|
|
|
unitPageState = str;
|
|
|
}
|
|
|
|
|
|
public void GetNowFristPage(string str)
|
|
|
{
|
|
|
fristFunctionButtons = str;
|
|
|
}
|
|
|
public void GetNowTwoPage(string str)
|
|
|
{
|
|
|
twoFunctionButtons = str;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 随机生成4位数
|
|
|
/// </summary>
|
|
|
/// <param name="s"></param>
|
|
|
/// <param name="rm"></param>
|
|
|
/// <returns></returns>
|
|
|
public static string random(string s, Random rm)
|
|
|
{
|
|
|
for (int i = 0; i < 4; i++)
|
|
|
{
|
|
|
int k = rm.Next();
|
|
|
|
|
|
char j = (char)('0' + (char)(k % 10));
|
|
|
|
|
|
s += j.ToString();
|
|
|
}
|
|
|
return s;
|
|
|
}
|
|
|
|
|
|
|
|
|
/// <summary>主轴</summary>
|
|
|
public static CommonClass commonClass_scr1_mainShaft = new CommonClass();
|
|
|
/// <summary>顶针</summary>
|
|
|
public static CommonClass commonClass_scr1_thimble = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 擦洗臂上下
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr1_scrubUpDown = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 擦洗臂左右
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr1_scrubLeftRight = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 冲洗臂
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr1_flush = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 阀控制
|
|
|
/// </summary>
|
|
|
public static ValveControl commonClass_scr1_valve = new ValveControl();
|
|
|
/// <summary>
|
|
|
/// 工位单次动作
|
|
|
/// </summary>
|
|
|
public static StationOperation commonClass_scr1_movement = new StationOperation();
|
|
|
|
|
|
/// <summary>
|
|
|
/// 主轴
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr2_mainShaft = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 顶针
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr2_thimble = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 擦洗臂上下
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr2_scrubUpDown = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 擦洗臂左右
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr2_scrubLeftRight = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 冲洗臂
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr2_flush = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 阀控制
|
|
|
/// </summary>
|
|
|
public static ValveControl commonClass_scr2_valve = new ValveControl();
|
|
|
/// <summary>
|
|
|
/// 工位单次动作
|
|
|
/// </summary>
|
|
|
public static StationOperation commonClass_scr2_movement = new StationOperation();
|
|
|
|
|
|
/// <summary>
|
|
|
/// 主轴
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr3_mainShaft = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 顶针
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr3_thimble = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 擦洗臂上下
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr3_scrubUpDown = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 擦洗臂左右
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr3_scrubLeftRight = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 冲洗臂
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr3_flush = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 阀控制
|
|
|
/// </summary>
|
|
|
public static ValveControl commonClass_scr3_valve = new ValveControl();
|
|
|
/// <summary>
|
|
|
/// 工位单次动作
|
|
|
/// </summary>
|
|
|
public static StationOperation commonClass_scr3_movement = new StationOperation();
|
|
|
|
|
|
/// <summary>
|
|
|
/// 主轴
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr4_mainShaft = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 顶针
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr4_thimble = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 擦洗臂上下
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr4_scrubUpDown = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 擦洗臂左右
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr4_scrubLeftRight = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 冲洗臂
|
|
|
/// </summary>
|
|
|
public static CommonClass commonClass_scr4_flush = new CommonClass();
|
|
|
/// <summary>
|
|
|
/// 阀控制
|
|
|
/// </summary>
|
|
|
public static ValveControl commonClass_scr4_valve = new ValveControl();
|
|
|
/// <summary>
|
|
|
/// 工位单次动作
|
|
|
/// </summary>
|
|
|
public static StationOperation commonClass_scr4_movement = new StationOperation();
|
|
|
/// <summary>
|
|
|
/// 翻转
|
|
|
/// </summary>
|
|
|
public static Overturn overturn_scr1 = new Overturn();
|
|
|
/// <summary>
|
|
|
/// 工位操作
|
|
|
/// </summary>
|
|
|
public static StationOperation stationOperation_scr1 = new StationOperation();
|
|
|
/// <summary>
|
|
|
/// 工位信息
|
|
|
/// </summary>
|
|
|
public static StationInfo stationInfo_scr1 = new StationInfo();
|
|
|
/// <summary>
|
|
|
/// 翻转
|
|
|
/// </summary>
|
|
|
public static Overturn overturn_scr2 = new Overturn();
|
|
|
public static StationOperation stationOperation_scr2 = new StationOperation();
|
|
|
public static StationInfo stationInfo_scr2 = new StationInfo();
|
|
|
/// <summary>
|
|
|
/// 翻转
|
|
|
/// </summary>
|
|
|
public static Overturn overturn_scr3 = new Overturn();
|
|
|
public static StationOperation stationOperation_scr3 = new StationOperation();
|
|
|
public static StationInfo stationInfo_scr3 = new StationInfo();
|
|
|
/// <summary>
|
|
|
/// 翻转
|
|
|
/// </summary>
|
|
|
public static Overturn overturn_scr4 = new Overturn();
|
|
|
/// <summary>
|
|
|
/// 工位操作
|
|
|
/// </summary>
|
|
|
public static StationOperation stationOperation_scr4 = new StationOperation();
|
|
|
/// <summary>
|
|
|
/// 工位信息
|
|
|
/// </summary>
|
|
|
public static StationInfo stationInfo_scr4 = new StationInfo();
|
|
|
|
|
|
/// <summary>
|
|
|
/// CS工位 CS1,CS2
|
|
|
/// </summary>
|
|
|
public static StationCS stationCS1 = new StationCS();
|
|
|
/// <summary>
|
|
|
/// CS工位 CS1,CS2
|
|
|
/// </summary>
|
|
|
public static StationCS stationCS2 = new StationCS();
|
|
|
/// <summary>
|
|
|
/// CA工位
|
|
|
/// </summary>
|
|
|
public static StationCA stationCA = new StationCA();
|
|
|
|
|
|
/// <summary>
|
|
|
/// 机器人
|
|
|
/// </summary>
|
|
|
public static StationRobot stationRobot = new StationRobot();
|
|
|
/// <summary>
|
|
|
/// 设备系统
|
|
|
/// </summary>
|
|
|
public static EquipmentSystem equipmentSystem = new EquipmentSystem();
|
|
|
|
|
|
/// <summary>
|
|
|
/// 输入信号
|
|
|
/// </summary>
|
|
|
public static InputSingal inputSingal = new InputSingal();
|
|
|
/// <summary>
|
|
|
/// 输出信号
|
|
|
/// </summary>
|
|
|
public static OutputSingal outputSingal = new OutputSingal();
|
|
|
/// <summary>
|
|
|
/// 报警日志列表
|
|
|
/// </summary>
|
|
|
public static List<OperateAlarmLog> operateAlarmLogs = new List<OperateAlarmLog>();
|
|
|
}
|
|
|
}
|