ushort length = 48;
b = 0;
char[] c = new char[(int)length];
ret = Focas1.cnc_rdexecprog(this.h, ref length, out b, c);
bool flag23 = ret == 0;
if (flag23)
{
this.dangqianyunxingneirong.Text = new string(c);
}
b = -1;
num = 11;
Focas1.ODBALMMSG2 odbalmmsg2 = new Focas1.ODBALMMSG2();
ret = Focas1.cnc_rdalmmsg2(this.h, b, ref num, odbalmmsg2);
string alarmmsg = "";
Type type3 = odbalmmsg2.GetType();
bool flag24 = ret == 0;
if (flag24)
{
for (int i = 1; i < 9; i++)
{
string str2 = "msg" + i.ToString();
object obj = type3.GetField(str2).GetValue(odbalmmsg2);
Type type4 = obj.GetType();
bool flag25 = type4.GetField("alm_msg").GetValue(obj).ToString() != "";
if (flag25)
{
string msg = Form1.getalmgrp((short)type4.GetField("type").GetValue(obj)).ToString() + type4.GetField("alm_no").GetValue(obj).ToString() + type4.GetField("alm_msg").GetValue(obj).ToString();
alarmmsg = alarmmsg + msg + "/";
}
}
this.dangqianbaojing.Text = alarmmsg;
}
Focas1.ODBM odb = new Focas1.ODBM();
ret = Focas1.cnc_rdmacro(this.h, 4120, 10, odb);
bool flag26 = ret == 0;
if (flag26)
{
this.dangqiandaoju.Text = ((double)odb.mcr_val * Math.Pow(10.0, (double)(-(double)odb.dec_val))).ToString();
}
bool flag27 = Form1.Get_Func_Type(this.h) == "T";
if (flag27)
{
this.daobubianhao.Text = ((int)(Form1.Get_Func_Mode(this.h, "T") % 100)).ToString();
}
else
{
bool flag28 = Form1.Get_Func_Type(this.h) == "M";
if (flag28)
{
this.daobubianhao.Text = Form1.Get_Func_Mode(this.h, "H").ToString();
}
}
Linux跨平台免授权CNC数控数据采集协议,TCP协议(Fanuc、三菱、西门子、海德汉、马扎克、兄弟、哈斯、广数、凯恩帝knd)设备联网,cnc采集,数控跨平台,支持Linux系统
最新推荐文章于 2024-06-04 16:27:15 发布