MES系统通过采集OPC温湿度数据以及生产计划数据,按照设定频率进行数据刷新并投放到LED中,同时实现对LED屏幕操作控制。
public NetLedForm()
{
InitializeComponent();
}
#region 定义全局变量
ArrayList array = new ArrayList();
BusinessLogic.OpcAccessLogic opclogic = null;
BusinessLogic.CommonLogic logic = null;
//0为计划模式 1为标语模式 2 为混合模式 3简洁模式
int userSelectType99 = 2;
//贮柜信息
string mutiled = "";
string[] led = null;
DataTable temphumidt = null;
private int temphumicount = 0;
private string tempstr = "";
private string humistr = "";
private bool opcconnect = false;
#endregion
#region 窗体载入
private void NetLedForm_Load(object sender, EventArgs e)
{
// opclogic = (BusinessLogic.OpcAccessLogic)(Activator.GetObject(typeof(BusinessLogic.OpcAccessLogic), "tcp://" + getValue("OpcIp", "ServerIp") + ":8605/OpcAccessLogic"));
LBL_Mode.Text = "混合模式";
//在内存中建立一个存储温度和湿度的表
temphumidt = new DataTable();
DataColumn temphumiledno = new DataColumn();
temphumiledno.ColumnName = "Led屏";
temphumiledno.DataType = typeof(string);
temphumidt.Columns.Add(temphumiledno);
DataColumn tempcolumn = new DataColumn();
tempcolumn.ColumnName = "温度";
tempcolumn.DataType = typeof(string);
temphumidt.Columns.Add(tempcolumn);
DataColumn humicolumn = new DataColumn();
humicolumn.ColumnName = "湿度";
humicolumn.DataType = typeof(string);
temphumidt.Columns.Add(humicolumn);
mutiled = getValue(&#