| | |
| | | *
|
| | | */
|
| | | public class iac_600kw_page extends JPanel {
|
| | | public static final int ModelSingle = 1; //单向
|
| | | public static final int ModelThree = 3; //单向
|
| | | |
| | | |
| | | public static int LANG_TYPE_CN = 0;
|
| | | public static int LANG_TYPE_EN = 1;
|
| | | public static int LANG_TYPE = LANG_TYPE_CN;
|
| | |
| | | private JTextField tf_JbxbIc; //基波谐波电流C
|
| | |
|
| | | private JTextField SysWorkState; //工作状态
|
| | | private JTextField tf_AlmState; //工作状态
|
| | | private JTextField tf_AlmState; //设备告警
|
| | | private JTextField tf_GBTestMode; //相数模式(1-单相 3-三相)
|
| | | private JTextField tf_SlaveNum; //从机数量
|
| | |
|
| | | private JTextField tf_JiFangNum_wt; //机房编号
|
| | | private JTextField tf_DeviceNum_wt; //设备编号
|
| | |
| | | //tf_AlmState.setText("从机状态异常停止");
|
| | | panel_178.add(tf_AlmState);
|
| | |
|
| | | JPanel panel_179 = new JPanel();
|
| | | panel_179.setBorder(new TitledBorder(null, "相位模式", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_179);
|
| | | panel_179.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | 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);
|
| | | |
| | | JPanel panel_180 = new JPanel();
|
| | | panel_180.setBorder(new TitledBorder(null, "从机数量", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_180);
|
| | | panel_180.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | 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_130 = new JPanel();
|
| | | panel_101.add(panel_130,BorderLayout.CENTER);
|
| | |
| | | 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/3;
|
| | | }else {
|
| | | max = Type_Mechine/3 *(Comm_ICA.m_RealData.getSlaveNum() + 1);
|
| | | }
|
| | | }else {
|
| | | if(0 == Comm_ICA.m_RealData.getSlaveNum()) {
|
| | | max = Type_Mechine;
|
| | | }else {
|
| | | max = Type_Mechine * (Comm_ICA.m_RealData.getSlaveNum() + 1);
|
| | | }
|
| | | }
|
| | | if(tmp_param.Power1[0] <0 || tmp_param.Power1[0] > max) {
|
| | | JOptionPane.showMessageDialog(null, "功率1超出范围(0-" + max + ")");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.Power1[1] <0 || tmp_param.Power1[1] > max) {
|
| | | JOptionPane.showMessageDialog(null, "功率2超出范围(0-" + max + ")");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.Power1[2] <0 || tmp_param.Power1[2] > max) {
|
| | | JOptionPane.showMessageDialog(null, "功率3超出范围(0-" + max + ")");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.Power1[3] <0 || tmp_param.Power1[3] > max) {
|
| | | JOptionPane.showMessageDialog(null, "功率4超出范围(0-" + max + ")");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.Power1[4] <0 || tmp_param.Power1[4] > max) {
|
| | | JOptionPane.showMessageDialog(null, "功率5超出范围(0-" + max + ")");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.Power1[5] <0 || tmp_param.Power1[5] > max) {
|
| | | JOptionPane.showMessageDialog(null, "功率6超出范围(0-" + max + ")");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.Power1[6] <0 || tmp_param.Power1[6] > max) {
|
| | | JOptionPane.showMessageDialog(null, "功率7超出范围(0-" + max + ")");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.Power1[7] <0 || tmp_param.Power1[7] > max) {
|
| | | JOptionPane.showMessageDialog(null, "功率8超出范围(0-" + max + ")");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.Power1[8] <0 || tmp_param.Power1[8] > max) {
|
| | | JOptionPane.showMessageDialog(null, "功率9超出范围(0-" + max + ")");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.Power1[9] <0 || tmp_param.Power1[9] > max) {
|
| | | JOptionPane.showMessageDialog(null, "功率10超出范围(0-" + max + ")");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.TestTime[0] <0 || tmp_param.TestTime[0] > 5999) {
|
| | | JOptionPane.showMessageDialog(null, "测试时间1超出范围(0-5999)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.TestTime[1] <0 || tmp_param.TestTime[1] > 5999) {
|
| | | JOptionPane.showMessageDialog(null, "测试时间2超出范围(0-5999)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.TestTime[2] <0 || tmp_param.TestTime[2] > 5999) {
|
| | | JOptionPane.showMessageDialog(null, "测试时间3超出范围(0-5999)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.TestTime[3] <0 || tmp_param.TestTime[3] > 5999) {
|
| | | JOptionPane.showMessageDialog(null, "测试时间4超出范围(0-5999)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.TestTime[4] <0 || tmp_param.TestTime[4] > 5999) {
|
| | | JOptionPane.showMessageDialog(null, "测试时间5超出范围(0-5999)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.TestTime[5] <0 || tmp_param.TestTime[5] > 5999) {
|
| | | JOptionPane.showMessageDialog(null, "测试时间6超出范围(0-5999)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.TestTime[6] <0 || tmp_param.TestTime[6] > 5999) {
|
| | | JOptionPane.showMessageDialog(null, "测试时间7超出范围(0-5999)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.TestTime[7] <0 || tmp_param.TestTime[7] > 5999) {
|
| | | JOptionPane.showMessageDialog(null, "测试时间8超出范围(0-5999)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.TestTime[8] <0 || tmp_param.TestTime[8] > 5999) {
|
| | | JOptionPane.showMessageDialog(null, "测试时间9超出范围(0-5999)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.TestTime[9] <0 || tmp_param.TestTime[9] > 5999) {
|
| | | JOptionPane.showMessageDialog(null, "测试时间10超出范围(0-5999)");
|
| | | return;
|
| | | }
|
| | | |
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_MULTY, IAC_ComBase.CMD_SetTestParam_Addr, tmp_param.getByteBuffer());
|
| | | } catch (NumberFormatException e) {
|
| | | JOptionPane.showMessageDialog(null, "请输入合法的测试参数!");
|
| | |
| | | //tmp_param.PowerPercent; //负载率(0-100%)
|
| | | tmp_param.ParamType = IAC_TestParam.ParamType_Other; //设置参数类型 0-稳态测试 1-其他
|
| | |
|
| | | int max = 600;int Type_Mechine = 300;
|
| | | if(ModelSingle == Comm_ICA.m_RealData.getGBTestMode()) {
|
| | | if(0 == Comm_ICA.m_RealData.getSlaveNum()) {
|
| | | max = Type_Mechine/3;
|
| | | }else {
|
| | | max = Type_Mechine/3 *(Comm_ICA.m_RealData.getSlaveNum() + 1);
|
| | | }
|
| | | }else {
|
| | | if(0 == Comm_ICA.m_RealData.getSlaveNum()) {
|
| | | max = Type_Mechine;
|
| | | }else {
|
| | | max = Type_Mechine * (Comm_ICA.m_RealData.getSlaveNum() + 1);
|
| | | }
|
| | | }
|
| | | |
| | | if(tmp_param.STDPower < 0 || tmp_param.STDPower > max) {
|
| | | JOptionPane.showMessageDialog(null, "额定功率超出范围(1-" + 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)");
|
| | | return;
|
| | | }
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_MULTY, IAC_ComBase.CMD_SetTestParam_Addr, tmp_param.getByteBuffer());
|
| | | } catch (NumberFormatException e) {
|
| | | JOptionPane.showMessageDialog(null, "请输入合法的测试参数!");
|
| | |
| | | tmp_param.ZDPowerCount = Integer.parseInt(tf_PowerCount_bd.getText()); //功率段数(2-5)
|
| | | //tmp_param.PowerPercent; //负载率(0-100%)
|
| | | tmp_param.ParamType = IAC_TestParam.ParamType_Other; //设置参数类型 0-稳态测试 1-其他
|
| | | |
| | | int max = 600;int Type_Mechine = 300;
|
| | | if(ModelSingle == Comm_ICA.m_RealData.getGBTestMode()) {
|
| | | if(0 == Comm_ICA.m_RealData.getSlaveNum()) {
|
| | | max = Type_Mechine/3;
|
| | | }else {
|
| | | max = Type_Mechine/3 *(Comm_ICA.m_RealData.getSlaveNum() + 1);
|
| | | }
|
| | | }else {
|
| | | if(0 == Comm_ICA.m_RealData.getSlaveNum()) {
|
| | | max = Type_Mechine;
|
| | | }else {
|
| | | max = Type_Mechine * (Comm_ICA.m_RealData.getSlaveNum() + 1);
|
| | | }
|
| | | }
|
| | | |
| | | if(tmp_param.STDPower < 0 || tmp_param.STDPower > 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)");
|
| | | return;
|
| | | }
|
| | |
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_MULTY, IAC_ComBase.CMD_SetTestParam_Addr, tmp_param.getByteBuffer());
|
| | | } catch (NumberFormatException e) {
|
| | |
| | | tmp_param.PowerPercent = Integer.parseInt(tf_PowerPercent_st.getText()); //负载率(0-100%)
|
| | | tmp_param.ParamType = IAC_TestParam.ParamType_Other; //设置参数类型 0-稳态测试 1-其他
|
| | |
|
| | | int max = 600;int Type_Mechine = 300;
|
| | | if(ModelSingle == Comm_ICA.m_RealData.getGBTestMode()) {
|
| | | if(0 == Comm_ICA.m_RealData.getSlaveNum()) {
|
| | | max = Type_Mechine/3;
|
| | | }else {
|
| | | max = Type_Mechine/3 *(Comm_ICA.m_RealData.getSlaveNum() + 1);
|
| | | }
|
| | | }else {
|
| | | if(0 == Comm_ICA.m_RealData.getSlaveNum()) {
|
| | | max = Type_Mechine;
|
| | | }else {
|
| | | max = Type_Mechine * (Comm_ICA.m_RealData.getSlaveNum() + 1);
|
| | | }
|
| | | }
|
| | | |
| | | if(tmp_param.STDPower < 0 || tmp_param.STDPower > max) {
|
| | | JOptionPane.showMessageDialog(null, "额定功率超出范围(0-" + max + ")");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.TimeCount < 5 || tmp_param.TimeCount > 5999) {
|
| | | JOptionPane.showMessageDialog(null, "测试间隔超出范围(5-5999)");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.PowerPercent < 0 || tmp_param.PowerPercent > 100) {
|
| | | JOptionPane.showMessageDialog(null, "负载率超出范围(0-100)");
|
| | | return;
|
| | | }
|
| | | |
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_MULTY, IAC_ComBase.CMD_SetTestParam_Addr, tmp_param.getByteBuffer());
|
| | | } catch (NumberFormatException e) {
|
| | | JOptionPane.showMessageDialog(null, "请输入合法的测试参数!");
|
| | |
| | | //tmp_param.ZDPowerCount = Integer.parseInt(tf_PowerCount_bd.getText()); //功率段数(2-5)
|
| | | tmp_param.PowerPercent = Integer.parseInt(tf_PowerPercent_xb.getText()); //负载率(0-100%)
|
| | | tmp_param.ParamType = IAC_TestParam.ParamType_Other; //设置参数类型 0-稳态测试 1-其他
|
| | | |
| | | int max = 600;int Type_Mechine = 300;
|
| | | if(ModelSingle == Comm_ICA.m_RealData.getGBTestMode()) {
|
| | | if(0 == Comm_ICA.m_RealData.getSlaveNum()) {
|
| | | max = Type_Mechine/3;
|
| | | }else {
|
| | | max = Type_Mechine/3 *(Comm_ICA.m_RealData.getSlaveNum() + 1);
|
| | | }
|
| | | }else {
|
| | | if(0 == Comm_ICA.m_RealData.getSlaveNum()) {
|
| | | max = Type_Mechine;
|
| | | }else {
|
| | | max = Type_Mechine * (Comm_ICA.m_RealData.getSlaveNum() + 1);
|
| | | }
|
| | | }
|
| | | |
| | | if(tmp_param.STDPower < 0 || tmp_param.STDPower > max) {
|
| | | JOptionPane.showMessageDialog(null, "额定功率超出范围(0-" + max + ")");
|
| | | return;
|
| | | }
|
| | | if(tmp_param.PowerPercent < 0 || tmp_param.PowerPercent > 100) {
|
| | | JOptionPane.showMessageDialog(null, "负载率超出范围(0-100)");
|
| | | return;
|
| | | }
|
| | |
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_MULTY, IAC_ComBase.CMD_SetTestParam_Addr, tmp_param.getByteBuffer());
|
| | | } catch (NumberFormatException e) {
|
| | |
| | |
|
| | | SysWorkState.setText(String.format("%s", tmp_real.getSysWorkStateStr()));
|
| | | tf_AlmState.setText(String.format("%s", tmp_real.getAlmStateStr()));
|
| | |
|
| | | tf_GBTestMode.setText(String.format("%d", tmp_real.getGBTestMode()));
|
| | | tf_SlaveNum.setText(String.format("%d", tmp_real.getSlaveNum()));
|
| | |
|
| | |
|
| | |
|