public void monitor_info()//所监控的控制信号 { // short ret = Fanuc.cnc_rdspdlalm(flibhndl, m);//警报 short ret2 = Fanuc.cnc_rdctrldi(Fanuc.h, spdi); //控制输入信号? short ret3 = Fanuc.cnc_rdctrldo(Fanuc.h, pdo); //控制输出信号 if (ret2 == 0 && ret3 == 0) { listBox9.Items.Add("控制输出信号:" + Convert.ToInt16(pdo.do1.sgnl1) + ":" + pdo.do1.sgnl2 + ";" + pdo.do1.sgnl3 + ";" + pdo.do1.sgnl4); listBox9.Items.Add("控制输入信号" + " " + spdi.di1.sgnl1); } else { MessageBox.Show(ret2 + ""); } }