Exemplo n.º 1
0
        public void get_alarm_info() //获取报警信息
        {
            short a   = 1;           //1:表示有消息;0:无消息
            short b   = 5;           //b表示警报的类型,比如5:电机温度过热
            short c   = 8;
            short ret = Fanuc.cnc_rdalminfo(Fanuc.h, a, b, c, odbalm_1);

            if (ret == 0)
            {
                listBox1.Items.Add("警报:" + odbalm_1.msg1.alm_no);//表示
            }
            else
            {
                MessageBox.Show(ret + " ");
            }
        }