新闻中心

EEPW首页 > 模拟技术 > 设计应用 > 什么是上位机_上位机软件介绍

什么是上位机_上位机软件介绍

作者:时间:2012-09-05来源:网络收藏

{
byte[] frame = new byte[5];
frame[0] = 0x05;
Array.Copy(Zuohao, 0, frame, 1, 2);
frame[3] = mingling;
byte temp = 0;
foreach (byte item in frame)
temp += item;
frame[4] = (byte)(0 - temp);
byte[] frametosend = PPP.Encode(frame);
Console.WriteLine(BitConverter.ToString(frametosend));
try { stream.Write(frametosend, 0, frametosend.Length); }
catch (Exception ex) { }
}
}
/// summary>
/// 向ARM发送
/// /summary>
/// param name=Zuohao>座号 2字节/param>
/// param name=mingling>命令字加ASC码 n字节/param>
public void WriteToArm(byte[] Zuohao, byte[] minglingandASC)
{
if (connection == Indicator.Connected)//在与ARM保持连接的情况下可写
{
byte[] frame = new byte[4+minglingandASC.Length];
frame[0] = (byte)frame.Length;
Array.Copy(Zuohao, 0, frame, 1, 2);
Array.Copy(minglingandASC,0,frame,3,minglingandASC.Length);
byte temp = 0;
foreach (byte item in frame)
temp += item;
frame[frame.Length-1] = (byte)(0 - temp);
byte[] frametosend = PPP.Encode(frame);
Console.WriteLine(BitConverter.ToString(frametosend));
try { stream.Write(frametosend, 0, frametosend.Length); }
catch (Exception ex) { }
}
}

本文引用地址:http://www.eepw.com.cn/article/185790.htm

另外数据收发还需要协议,和嵌入式网关通信的指令和协议定制如下:



因此数据量较少,协议也就比较简单,此协议在发送接收时用PPP封装。显示部分使用C#编写的运行于Windows .Net Framework 上的窗体应用程序,根据实际需求,对每个实验台状态的显示使用ListView控件实现,当出现异常情况,或实验台出现警告、求助信号时,ListView的相应字段文字会通过改变颜色来提醒监视人员,监视人员还可以通过一个文字发送窗体来向LED屏发送要显示的文字。总之界面清晰直观,简便易用。



上一页 1 2 下一页

关键词: 上位机 软件介绍

评论


相关推荐

技术专区

关闭