| | |
| | | private JTextField tf_AlmState; //设备告警
|
| | | private JTextField tf_GBTestMode; //相数模式(1-单相 3-三相)
|
| | | private JTextField tf_SlaveNum; //从机数量
|
| | | private JTextField tf_PageType; //从机数量
|
| | |
|
| | | private JTextField tf_JiFangNum_wt; //机房编号
|
| | | private JTextField tf_DeviceNum_wt; //设备编号
|
| | |
| | | private JButton btn_wt_start; //启动
|
| | | private JButton btn_wt_pause; //暂停
|
| | | private JButton btn_wt_stop; //ֹͣ
|
| | | private JButton btn_wt_exit; //ֹͣ
|
| | |
|
| | | private JTextField tf_JiFangNum_zd; //机房编号
|
| | | private JTextField tf_DeviceNum_zd; //设备编号
|
| | |
| | | private JButton btn_zd_start; //启动
|
| | | private JButton btn_zd_pause; //暂停
|
| | | private JButton btn_zd_stop; //ֹͣ
|
| | | private JButton btn_zd_exit; //ֹͣ
|
| | |
|
| | | private JTextField tf_JiFangNum_bd; //机房编号
|
| | | private JTextField tf_DeviceNum_bd; //设备编号
|
| | |
| | | private JButton btn_bd_start; //启动
|
| | | private JButton btn_bd_pause; //暂停
|
| | | private JButton btn_bd_stop; //ֹͣ
|
| | | private JButton btn_bd_exit; //退出
|
| | |
|
| | | private JTextField tf_JiFangNum_st; //机房编号
|
| | | private JTextField tf_DeviceNum_st; //设备编号
|
| | |
| | | private JButton btn_st_start; //启动
|
| | | private JButton btn_st_pause; //暂停
|
| | | private JButton btn_st_stop; //ֹͣ
|
| | | private JButton btn_st_exit; //退出
|
| | |
|
| | | private JTextField tf_JiFangNum_xb; //机房编号
|
| | | private JTextField tf_DeviceNum_xb; //设备编号
|
| | |
| | | private JButton btn_xb_start; //启动
|
| | | private JButton btn_xb_pause; //暂停
|
| | | private JButton btn_xb_stop; //ֹͣ
|
| | | private JButton btn_xb_exit; //退出
|
| | |
|
| | |
|
| | |
|
| | |
| | |
|
| | | tf_GBTestMode = new JTextField();
|
| | | tf_GBTestMode.setColumns(10);
|
| | | tf_GBTestMode.setFont(new Font("宋体", Font.PLAIN, 10));
|
| | | tf_GBTestMode.setForeground(Color.RED);
|
| | | //tf_AlmState.setText("从机状态异常停止");
|
| | | panel_179.add(tf_GBTestMode);
|
| | | panel_179.add(tf_GBTestMode);
|
| | |
|
| | | JPanel panel_180 = new JPanel();
|
| | | panel_180.setBorder(new TitledBorder(null, "从机数量", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | |
| | |
|
| | | tf_SlaveNum = new JTextField();
|
| | | tf_SlaveNum.setColumns(10);
|
| | | tf_SlaveNum.setFont(new Font("宋体", Font.PLAIN, 10));
|
| | | tf_SlaveNum.setForeground(Color.RED);
|
| | | //tf_AlmState.setText("从机状态异常停止");
|
| | | panel_180.add(tf_SlaveNum);
|
| | | |
| | | JPanel panel_181 = new JPanel();
|
| | | panel_181.setBorder(new TitledBorder(null, "当前界面", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_181);
|
| | | panel_181.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_PageType = new JTextField();
|
| | | tf_PageType.setColumns(10);
|
| | | panel_181.add(tf_PageType);
|
| | |
|
| | |
|
| | | JPanel panel_130 = new JPanel();
|
| | |
| | | panel_136.setLayout(new BorderLayout(0, 0));
|
| | |
|
| | | tf_CurrHigh_wt = new JTextField();
|
| | | tf_CurrHigh_wt.setDocument(new LimitedDocument(3, "0123456789"));
|
| | | tf_CurrHigh_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_136.add(tf_CurrHigh_wt);
|
| | | tf_CurrHigh_wt.setColumns(10);
|
| | |
|
| | |
| | | tf_Power1_wt.setColumns(10);
|
| | |
|
| | | JPanel panel_139 = new JPanel();
|
| | | panel_139.setBorder(new TitledBorder(null, "测试时间1(S)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_139.setBorder(new TitledBorder(null, "测试时间1(M)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_139);
|
| | | panel_139.setLayout(new BorderLayout(0, 0));
|
| | |
|
| | |
| | | tf_Power2_wt.setColumns(10);
|
| | |
|
| | | JPanel panel_141 = new JPanel();
|
| | | panel_141.setBorder(new TitledBorder(null, "测试时间2(S)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_141.setBorder(new TitledBorder(null, "测试时间2(M)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_141);
|
| | | panel_141.setLayout(new BorderLayout(0, 0));
|
| | |
|
| | |
| | | tf_Power3_wt.setColumns(10);
|
| | |
|
| | | JPanel panel_143 = new JPanel();
|
| | | panel_143.setBorder(new TitledBorder(null, "测试时间3(S)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_143.setBorder(new TitledBorder(null, "测试时间3(M)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_143);
|
| | | panel_143.setLayout(new BorderLayout(0, 0));
|
| | |
|
| | |
| | | tf_Power4_wt.setColumns(10);
|
| | |
|
| | | JPanel panel_145 = new JPanel();
|
| | | panel_145.setBorder(new TitledBorder(null, "测试时间4(S)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_145.setBorder(new TitledBorder(null, "测试时间4(M)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_145);
|
| | | panel_145.setLayout(new BorderLayout(0, 0));
|
| | |
|
| | |
| | | tf_Power5_wt.setColumns(10);
|
| | |
|
| | | JPanel panel_147 = new JPanel();
|
| | | panel_147.setBorder(new TitledBorder(null, "测试时间5(S)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_147.setBorder(new TitledBorder(null, "测试时间5(M)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_147);
|
| | | panel_147.setLayout(new BorderLayout(0, 0));
|
| | |
|
| | |
| | | tf_Power6_wt.setColumns(10);
|
| | |
|
| | | JPanel panel_149 = new JPanel();
|
| | | panel_149.setBorder(new TitledBorder(null, "测试时间6(S)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_149.setBorder(new TitledBorder(null, "测试时间6(M)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_149);
|
| | | panel_149.setLayout(new BorderLayout(0, 0));
|
| | |
|
| | |
| | | tf_Power7_wt.setColumns(10);
|
| | |
|
| | | JPanel panel_151 = new JPanel();
|
| | | panel_151.setBorder(new TitledBorder(null, "测试时间7(S)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_151.setBorder(new TitledBorder(null, "测试时间7(M)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_151);
|
| | | panel_151.setLayout(new BorderLayout(0, 0));
|
| | |
|
| | |
| | | tf_Power8_wt.setColumns(10);
|
| | |
|
| | | JPanel panel_153 = new JPanel();
|
| | | panel_153.setBorder(new TitledBorder(null, "测试时间8(S)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_153.setBorder(new TitledBorder(null, "测试时间8(M)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_153);
|
| | | panel_153.setLayout(new BorderLayout(0, 0));
|
| | |
|
| | |
| | | tf_Power9_wt.setColumns(10);
|
| | |
|
| | | JPanel panel_155 = new JPanel();
|
| | | panel_155.setBorder(new TitledBorder(null, "测试时间9(S)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_155.setBorder(new TitledBorder(null, "测试时间9(M)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_155);
|
| | | panel_155.setLayout(new BorderLayout(0, 0));
|
| | |
|
| | |
| | | tf_Power10_wt.setColumns(10);
|
| | |
|
| | | JPanel panel_81 = new JPanel();
|
| | | panel_81.setBorder(new TitledBorder(null, "测试时间10(S)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_81.setBorder(new TitledBorder(null, "测试时间10(M)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_81);
|
| | | panel_81.setLayout(new BorderLayout(0, 0));
|
| | |
|
| | |
| | | tmp_param.TestTime[9] = Integer.parseInt(tf_TestTime10_wt.getText()); //测试时间段(0-5999min)
|
| | | tmp_param.ParamType = IAC_TestParam.ParamType_WT;
|
| | |
|
| | | if(tmp_param.WTPowerCount < 1 || tmp_param.WTPowerCount > 10) {
|
| | | JOptionPane.showMessageDialog(null, "功率段数超出范围(1-10)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.VolLowLimit < 1 || tmp_param.VolLowLimit > 220) {
|
| | | JOptionPane.showMessageDialog(null, "电压下限超出范围(1-220)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.CurrHigh < 1 || tmp_param.CurrHigh > 525) {
|
| | | JOptionPane.showMessageDialog(null, "电压下限超出范围(1-525)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.VolHigh < 1 || tmp_param.VolHigh > 255) {
|
| | | JOptionPane.showMessageDialog(null, "电压下限超出范围(1-255)");
|
| | | return;
|
| | | }
|
| | | int max = 600;int Type_Mechine = 300;
|
| | | if(ModelSingle == Comm_ICA.m_RealData.getGBTestMode()) {
|
| | | if(0 == Comm_ICA.m_RealData.getSlaveNum()) {
|
| | |
| | | max = Type_Mechine * (Comm_ICA.m_RealData.getSlaveNum() + 1);
|
| | | }
|
| | | }
|
| | | float curr_high = (float)max*1000/220;
|
| | | |
| | | |
| | | if(tmp_param.WTPowerCount < 1 || tmp_param.WTPowerCount > 10) {
|
| | | JOptionPane.showMessageDialog(null, "功率段数超出范围(1-10)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.VolLowLimit < 0 || tmp_param.VolLowLimit > 220) {
|
| | | JOptionPane.showMessageDialog(null, "电压下限超出范围(0-220)");
|
| | | return;
|
| | | }
|
| | | // if(tmp_param.CurrHigh < 1 || tmp_param.CurrHigh > 525) {
|
| | | // JOptionPane.showMessageDialog(null, "电流上限超出范围(1-525)");
|
| | | // return;
|
| | | // }
|
| | | if(tmp_param.CurrHigh < 1 || tmp_param.CurrHigh > curr_high) {
|
| | | JOptionPane.showMessageDialog(null, "电流上限超出范围(1-" + curr_high + ")");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.VolHigh < 0 || tmp_param.VolHigh > 255) {
|
| | | JOptionPane.showMessageDialog(null, "电压上 限超出范围(0-255)");
|
| | | return;
|
| | | }
|
| | | |
| | | if(tmp_param.Power1[0] <0 || tmp_param.Power1[0] > max) {
|
| | | JOptionPane.showMessageDialog(null, "功率1超出范围(0-" + max + ")");
|
| | | return;
|
| | |
| | | JOptionPane.showMessageDialog(null, "请先读取测试参数!");
|
| | | return;
|
| | | }
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_WTTest_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | if(!(Comm_ICA.m_RealData.getPageType() == IAC_RealData.PageType_Home || Comm_ICA.m_RealData.getPageType() == IAC_RealData.PageType_WTtest)) {
|
| | | JOptionPane.showMessageDialog(null, "请先点击退出界面按钮!");
|
| | | return;
|
| | | }
|
| | | if(JOptionPane.NO_OPTION == JOptionPane.showConfirmDialog(null, "确定各相序接线正确?", |
| | | "操作确认", JOptionPane.YES_NO_OPTION)) {
|
| | | return;
|
| | | }
|
| | | if(Comm_ICA.m_RealData.getPHv() != 0) {
|
| | | if(JOptionPane.NO_OPTION == JOptionPane.showConfirmDialog(null, "未接线或相序错误,是否继续?", |
| | | "操作确认", JOptionPane.YES_NO_OPTION)) {
|
| | | return;
|
| | | }
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_WTTest_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | }else { |
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_WTTest_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | }
|
| | | |
| | | }
|
| | | });
|
| | | btn_wt_start.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | |
| | | });
|
| | | btn_wt_stop.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_156.add(btn_wt_stop);
|
| | | |
| | | btn_wt_exit = new JButton("退出界面");
|
| | | btn_wt_exit.setEnabled(false);
|
| | | btn_wt_exit.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_ClosePage_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | }
|
| | | });
|
| | | btn_wt_exit.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_156.add(btn_wt_exit);
|
| | |
|
| | | JPanel panel_157 = new JPanel();
|
| | | panel_zd.add(panel_157,BorderLayout.NORTH);
|
| | |
| | | }
|
| | |
|
| | | if(tmp_param.STDPower < 0 || tmp_param.STDPower > max) {
|
| | | JOptionPane.showMessageDialog(null, "额定功率超出范围(1-" + max + ")");
|
| | | JOptionPane.showMessageDialog(null, "额定功率超出范围(0-" + max + ")");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.TimeCount < 5 || tmp_param.TimeCount > 9999) {
|
| | | JOptionPane.showMessageDialog(null, "测试间隔超出范围(5-9999)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.ZDPowerCount < 2 || tmp_param.ZDPowerCount > 5) {
|
| | | JOptionPane.showMessageDialog(null, "负载段数超出范围(2-5)");
|
| | | if(tmp_param.ZDPowerCount < 1 || tmp_param.ZDPowerCount > 5) {
|
| | | JOptionPane.showMessageDialog(null, "负载段数超出范围(1-5)");
|
| | | return;
|
| | | }
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_MULTY, IAC_ComBase.CMD_SetTestParam_Addr, tmp_param.getByteBuffer());
|
| | |
| | | JOptionPane.showMessageDialog(null, "请先读取测试参数!");
|
| | | return;
|
| | | }
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_ZDTest_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | if(!(Comm_ICA.m_RealData.getPageType() == IAC_RealData.PageType_Home || Comm_ICA.m_RealData.getPageType() == IAC_RealData.PageType_ZDtest)) {
|
| | | JOptionPane.showMessageDialog(null, "请先点击退出界面按钮!");
|
| | | return;
|
| | | }
|
| | | |
| | | if(JOptionPane.NO_OPTION == JOptionPane.showConfirmDialog(null, "确定各相序接线正确?", |
| | | "操作确认", JOptionPane.YES_NO_OPTION)) {
|
| | | return;
|
| | | }
|
| | | if(Comm_ICA.m_RealData.getPHv() != 0) {
|
| | | if(JOptionPane.NO_OPTION == JOptionPane.showConfirmDialog(null, "未接线或相序错误,是否继续?", |
| | | "操作确认", JOptionPane.YES_NO_OPTION)) {
|
| | | return;
|
| | | }
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_ZDTest_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | }else { |
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_ZDTest_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | }
|
| | | |
| | | |
| | | }
|
| | | });
|
| | | btn_zd_start.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | |
| | | });
|
| | | btn_zd_stop.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_163.add(btn_zd_stop);
|
| | | |
| | | btn_zd_exit = new JButton("退出界面");
|
| | | btn_zd_exit.setEnabled(false);
|
| | | btn_zd_exit.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_ClosePage_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | }
|
| | | });
|
| | | btn_zd_exit.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_163.add(btn_zd_exit);
|
| | |
|
| | | JPanel panel_164= new JPanel();
|
| | | panel_bd.add(panel_164,BorderLayout.NORTH);
|
| | |
| | | JOptionPane.showMessageDialog(null, "测试间隔超出范围(5-9999)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.ZDPowerCount < 2 || tmp_param.ZDPowerCount > 5) {
|
| | | JOptionPane.showMessageDialog(null, "负载段数超出范围(2-5)");
|
| | | if(tmp_param.ZDPowerCount < 1 || tmp_param.ZDPowerCount > 5) {
|
| | | JOptionPane.showMessageDialog(null, "负载段数超出范围(1-5)");
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | JOptionPane.showMessageDialog(null, "请先读取测试参数!");
|
| | | return;
|
| | | }
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_BDTest_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | if(!(Comm_ICA.m_RealData.getPageType() == IAC_RealData.PageType_Home || Comm_ICA.m_RealData.getPageType() == IAC_RealData.PageType_BDtest)) {
|
| | | JOptionPane.showMessageDialog(null, "请先点击退出界面按钮!");
|
| | | return;
|
| | | }
|
| | | |
| | | if(JOptionPane.NO_OPTION == JOptionPane.showConfirmDialog(null, "确定各相序接线正确?", |
| | | "操作确认", JOptionPane.YES_NO_OPTION)) {
|
| | | return;
|
| | | }
|
| | | if(Comm_ICA.m_RealData.getPHv() != 0) {
|
| | | if(JOptionPane.NO_OPTION == JOptionPane.showConfirmDialog(null, "未接线或相序错误,是否继续?", |
| | | "操作确认", JOptionPane.YES_NO_OPTION)) {
|
| | | return;
|
| | | }
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_BDTest_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | }else { |
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_BDTest_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | }
|
| | | |
| | | |
| | | }
|
| | | });
|
| | | btn_bd_start.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | |
| | | });
|
| | | btn_bd_stop.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_270.add(btn_bd_stop);
|
| | | |
| | | btn_bd_exit = new JButton("退出界面");
|
| | | btn_bd_exit.setEnabled(false);
|
| | | btn_bd_exit.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_ClosePage_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | }
|
| | | });
|
| | | btn_bd_exit.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_270.add(btn_bd_exit);
|
| | |
|
| | | JPanel panel_271= new JPanel();
|
| | | panel_st.add(panel_271,BorderLayout.NORTH);
|
| | |
| | | JOptionPane.showMessageDialog(null, "额定功率超出范围(0-" + max + ")");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.TimeCount < 5 || tmp_param.TimeCount > 5999) {
|
| | | JOptionPane.showMessageDialog(null, "测试间隔超出范围(5-5999)");
|
| | | if(tmp_param.TimeCount < 5 || tmp_param.TimeCount > 9999) {
|
| | | JOptionPane.showMessageDialog(null, "测试间隔超出范围(5-9999)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.PowerPercent < 0 || tmp_param.PowerPercent > 100) {
|
| | |
| | | JOptionPane.showMessageDialog(null, "请先读取测试参数!");
|
| | | return;
|
| | | }
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_STTest_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | |
| | | if(!(Comm_ICA.m_RealData.getPageType() == IAC_RealData.PageType_Home || Comm_ICA.m_RealData.getPageType() == IAC_RealData.PageType_STtest)) {
|
| | | JOptionPane.showMessageDialog(null, "请先点击退出界面按钮!");
|
| | | return;
|
| | | }
|
| | | |
| | | if(JOptionPane.NO_OPTION == JOptionPane.showConfirmDialog(null, "确定各相序接线正确?", |
| | | "操作确认", JOptionPane.YES_NO_OPTION)) {
|
| | | return;
|
| | | }
|
| | | if(Comm_ICA.m_RealData.getPHv() != 0) {
|
| | | if(JOptionPane.NO_OPTION == JOptionPane.showConfirmDialog(null, "未接线或相序错误,是否继续?", |
| | | "操作确认", JOptionPane.YES_NO_OPTION)) {
|
| | | return;
|
| | | }
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_STTest_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | }else { |
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_STTest_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | }
|
| | | |
| | | }
|
| | | });
|
| | | btn_st_start.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | |
| | | });
|
| | | btn_st_stop.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_277.add(btn_st_stop);
|
| | | |
| | | btn_st_exit = new JButton("退出界面");
|
| | | btn_st_exit.setEnabled(false);
|
| | | btn_st_exit.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_ClosePage_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | }
|
| | | });
|
| | | btn_st_exit.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_277.add(btn_st_exit);
|
| | |
|
| | | JPanel panel_278= new JPanel();
|
| | | panel_xb.add(panel_278,BorderLayout.NORTH);
|
| | |
| | | JOptionPane.showMessageDialog(null, "请先读取测试参数!");
|
| | | return;
|
| | | }
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_XBTest_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | if(!(Comm_ICA.m_RealData.getPageType() == IAC_RealData.PageType_Home || Comm_ICA.m_RealData.getPageType() == IAC_RealData.PageType_XBtest)) {
|
| | | JOptionPane.showMessageDialog(null, "请先点击退出界面按钮!");
|
| | | return;
|
| | | }
|
| | | if(JOptionPane.NO_OPTION == JOptionPane.showConfirmDialog(null, "确定各相序接线正确?", |
| | | "操作确认", JOptionPane.YES_NO_OPTION)) {
|
| | | return;
|
| | | }
|
| | | if(Comm_ICA.m_RealData.getPHv() != 0) {
|
| | | if(JOptionPane.NO_OPTION == JOptionPane.showConfirmDialog(null, "未接线或相序错误,是否继续?", |
| | | "操作确认", JOptionPane.YES_NO_OPTION)) {
|
| | | return;
|
| | | }
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_XBTest_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | }else { |
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_XBTest_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | }
|
| | | |
| | | |
| | | }
|
| | | });
|
| | | btn_xb_start.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | |
| | | btn_xb_stop.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_283.add(btn_xb_stop);
|
| | |
|
| | | |
| | | btn_xb_exit = new JButton("退出界面");
|
| | | btn_xb_exit.setEnabled(false);
|
| | | btn_xb_exit.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_ClosePage_Addr, IAC_Cmd.createControlByteBuffer(0x0001&0xFFFF));
|
| | | }
|
| | | });
|
| | | btn_xb_exit.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_283.add(btn_xb_exit);
|
| | |
|
| | |
|
| | |
|
| | |
| | | btn_xb_start.setEnabled(state); //启动
|
| | | btn_xb_pause.setEnabled(state); //暂停
|
| | | btn_xb_stop.setEnabled(state); //ֹͣ
|
| | | |
| | | btn_wt_exit.setEnabled(state); |
| | | btn_zd_exit.setEnabled(state);
|
| | | btn_bd_exit.setEnabled(state);
|
| | | btn_st_exit.setEnabled(state);
|
| | | btn_xb_exit.setEnabled(state);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | |
|
| | | tf_GBTestMode.setText(String.format("%d", tmp_real.getGBTestMode()));
|
| | | tf_SlaveNum.setText(String.format("%d", tmp_real.getSlaveNum()));
|
| | | |
| | | |
| | |
|
| | | tf_PageType.setText(String.format("%s", tmp_real.getPageTypeStr()));
|
| | |
|
| | | tf_op_inf.setText(String.format("%s",Comm_ICA.op_result));
|
| | |
|
| | |
| | | if(IAC_RealData.Stopped == tmp_real.getSysWorkState()) {
|
| | | setButttonState(true);
|
| | |
|
| | | if(tmp_real.getAlmState() > 8) {
|
| | | |
| | | btn_wt_start.setEnabled(false); //启动
|
| | | btn_zd_start.setEnabled(false); //启动
|
| | | btn_bd_start.setEnabled(false); //启动
|
| | | btn_st_start.setEnabled(false); //启动
|
| | | btn_xb_start.setEnabled(false); //启动
|
| | | }
|
| | | //告警情况下不允许启动测试
|
| | | // if(tmp_real.getAlmState() > 8) {
|
| | | // |
| | | // btn_wt_start.setEnabled(false); //启动
|
| | | // btn_zd_start.setEnabled(false); //启动
|
| | | // btn_bd_start.setEnabled(false); //启动
|
| | | // btn_st_start.setEnabled(false); //启动
|
| | | // btn_xb_start.setEnabled(false); //启动
|
| | | // }
|
| | |
|
| | | btn_wt_pause.setEnabled(false); //暂停
|
| | | btn_wt_stop.setEnabled(false); //ֹͣ
|
| | |
| | | }else if(IAC_RealData.XBtesting == tmp_real.getSysWorkState()) {
|
| | | setButttonState(false);
|
| | |
|
| | | btn_st_read.setEnabled(true); //读取
|
| | | btn_st_write.setEnabled(true); //设置
|
| | | btn_xb_read.setEnabled(true); //读取
|
| | | btn_xb_write.setEnabled(true); //设置
|
| | | btn_xb_pause.setEnabled(true); //暂停
|
| | | btn_st_stop.setEnabled(true); //ֹͣ
|
| | | btn_xb_stop.setEnabled(true); //ֹͣ
|
| | | }else if(IAC_RealData.XBPause == tmp_real.getSysWorkState()) {
|
| | | setButttonState(false);
|
| | |
|
| | | btn_st_read.setEnabled(true); //读取
|
| | | btn_st_write.setEnabled(true); //设置
|
| | | btn_xb_read.setEnabled(true); //读取
|
| | | btn_xb_write.setEnabled(true); //设置
|
| | | btn_xb_start.setEnabled(true); //启动
|
| | | btn_st_stop.setEnabled(true); //ֹͣ
|
| | | btn_xb_stop.setEnabled(true); //ֹͣ
|
| | | }
|
| | | }
|
| | |
|