private void btCfgR_Click(object sender, EventArgs e) { string errInfo; JFDevCellInfo ci = CheckAxisDevInfo(_axisNames[3], out errInfo); if (null == ci) { MessageBox.Show("R轴:\"" + _axisNames[3] + "\" 未能显示参数配置窗口,ErrorInfo:" + errInfo); return; } IJFDevice_MotionDaq dev = JFHubCenter.Instance.InitorManager.GetInitor(ci.DeviceID) as IJFDevice_MotionDaq; IJFModule_Motion md = dev.GetMc(ci.ModuleIndex); FormAxisTest fm = new FormAxisTest(); fm.SetAxisInfo(md, ci.ChannelIndex, _axisNames[3]); fm.ShowDialog(); }
/// <summary> /// 显示轴配置/调试窗口 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btCfg_Click(object sender, EventArgs e) { FormAxisTest fm = new FormAxisTest(); JFDevCellInfo ci = JFHubCenter.Instance.MDCellNameMgr.GetAxisCellInfo(_axisName); if (null == ci) { gbAxisName.Text += " 无通道信息"; ucAxisTest.SetAxis(null, 0); cbMode.Enabled = false; btCfg.Enabled = false; return; } IJFDevice_MotionDaq dev = JFHubCenter.Instance.InitorManager.GetInitor(ci.DeviceID) as IJFDevice_MotionDaq; //if(null == dev) //{ // gbAxisName.Text += " 无设备:" + ci.DeviceID; // ucAxisTest.SetAxis(null, 0); // cbMode.Enabled = false; // btCfg.Enabled = false; // return; //} //if(!dev.IsDeviceOpen) //{ // gbAxisName.Text += " 设备未打开" ; // ucAxisTest.SetAxis(null, 0); // cbMode.Enabled = false; // btCfg.Enabled = false; // return; //} //if(dev.McCount <= ci.ModuleIndex) //{ // gbAxisName.Text += " 模块Idx = :" + ci.ModuleIndex + " 超限"; // ucAxisTest.SetAxis(null, 0); // cbMode.Enabled = false; // btCfg.Enabled = false; // return; //} IJFModule_Motion md = dev.GetMc(ci.ModuleIndex); fm.SetAxisInfo(md, ci.ChannelIndex, _axisName); fm.ShowDialog(); }