public void get_moshi() //读取主轴设置的操作模式,ok { short[] array = new short[] { 1, 2, 3 }; short ret = Fanuc.cnc_rdopmode(Fanuc.h, out array[0]); if (ret == 0) { for (int i = 0; i < array.Length; i++) { listBox9.Items.Add("操作模式" + array[i]); } } else { MessageBox.Show(ret + ""); } }