New file |
| | |
| | | package com.dev.ica_600kw;
|
| | |
|
| | | import java.awt.BorderLayout;
|
| | | import java.awt.Dimension;
|
| | | import java.awt.FlowLayout;
|
| | | import java.awt.Font;
|
| | | import java.awt.GridLayout;
|
| | | import java.awt.event.ActionEvent;
|
| | | import java.awt.event.ActionListener;
|
| | | import java.nio.ByteBuffer;
|
| | |
|
| | | import javax.swing.DefaultComboBoxModel;
|
| | | import javax.swing.JButton;
|
| | | import javax.swing.JComboBox;
|
| | | import javax.swing.JOptionPane;
|
| | | import javax.swing.JPanel;
|
| | | import javax.swing.JTabbedPane;
|
| | | import javax.swing.JTextField;
|
| | | import javax.swing.border.TitledBorder;
|
| | |
|
| | | import org.apache.logging.log4j.LogManager;
|
| | | import org.apache.logging.log4j.Logger;
|
| | |
|
| | | import com.dev.modbus.MyModBusRtu;
|
| | | import com.dev.simpower.dev.Power_ComBase;
|
| | |
|
| | | import main.page_debug_inf;
|
| | | import user_app_form.LimitedDocument;
|
| | |
|
| | | /**
|
| | | * 极简化电源界面
|
| | | * @author DELL
|
| | | *
|
| | | */
|
| | | public class iac_600kw_page extends JPanel {
|
| | | public static int LANG_TYPE_CN = 0;
|
| | | public static int LANG_TYPE_EN = 1;
|
| | | public static int LANG_TYPE = LANG_TYPE_CN;
|
| | | |
| | | public SPCommIAC_600KW Comm_ICA = null;
|
| | | |
| | | private JTabbedPane tabbedPane;
|
| | | |
| | | |
| | | private JPanel panel_baseinfo; //主界面
|
| | | private page_debug_inf panel_debug; //调试信息
|
| | | |
| | | private JTextField tf_Ua; //A相电压
|
| | | private JTextField tf_Ub; //B相电压
|
| | | private JTextField tf_Uc; //C相电压
|
| | | |
| | | private JTextField tf_Uab; //AB线电压
|
| | | private JTextField tf_Ubc; //BC线电压
|
| | | private JTextField tf_Uca; //CA线电压
|
| | |
|
| | | private JTextField tf_Ia; //A相电流
|
| | | private JTextField tf_Ib; //B相电流
|
| | | private JTextField tf_Ic; //C相电流
|
| | | |
| | | private JTextField tf_Fre; //交流频率
|
| | |
|
| | | private JTextField tf_Ft; //功率因数
|
| | | |
| | | private JTextField tf_FTa; //
|
| | | private JTextField tf_FTb; //
|
| | | private JTextField tf_FTc; //
|
| | | |
| | | private JTextField tf_Pa; //
|
| | | private JTextField tf_Pb; //
|
| | | private JTextField tf_Pc; //
|
| | | |
| | | private JTextField tf_P; //有功功率
|
| | |
|
| | | private JTextField tf_Qa; //
|
| | | private JTextField tf_Qb; //
|
| | | private JTextField tf_Qc; //
|
| | | |
| | | private JTextField tf_Q; //
|
| | | |
| | | private JTextField tf_Sa; //
|
| | | private JTextField tf_Sb; //
|
| | | private JTextField tf_Sc; //
|
| | | private JTextField tf_S; //
|
| | | |
| | | private JTextField tf_Ep; //
|
| | | private JTextField tf_PHv; //
|
| | | private JTextField tf_PHa; //
|
| | | |
| | | private JTextField tf_JbxbUa; //基波谐波电压A
|
| | | private JTextField tf_JbxbUb; //基波谐波电压B
|
| | | private JTextField tf_JbxbUc; //基波谐波电压C
|
| | |
|
| | |
|
| | | private JTextField tf_JbxbIa; //基波谐波电流A
|
| | | private JTextField tf_JbxbIb; //基波谐波电流B
|
| | | private JTextField tf_JbxbIc; //基波谐波电流C
|
| | |
|
| | | private JTextField SysWorkState; //工作状态
|
| | |
|
| | | private JTextField tf_JiFangNum_wt; //机房编号 |
| | | private JTextField tf_DeviceNum_wt; //设备编号 |
| | | private JTextField tf_PowerCount_wt; //功率段数 |
| | | private JTextField tf_VolLowLimit_wt; //电压下限
|
| | | private JTextField tf_Power1_wt; //功率1
|
| | | private JTextField tf_Power2_wt; //功率2
|
| | | private JTextField tf_Power3_wt; //功率3
|
| | | private JTextField tf_Power4_wt; //功率4
|
| | | private JTextField tf_Power5_wt; //功率5
|
| | | private JTextField tf_Power6_wt; //功率6
|
| | | private JTextField tf_Power7_wt; //功率7
|
| | | private JTextField tf_Power8_wt; //功率8
|
| | | private JTextField tf_Power9_wt; //功率9
|
| | | private JTextField tf_Power10_wt; //功率10
|
| | | private JTextField tf_CurrHigh_wt; //电流上限
|
| | | private JTextField tf_VolHigh_wt; //电压上限
|
| | | private JTextField tf_TestTime1_wt; //测试时间1
|
| | | private JTextField tf_TestTime2_wt; //测试时间2
|
| | | private JTextField tf_TestTime3_wt; //测试时间3
|
| | | private JTextField tf_TestTime4_wt; //测试时间4
|
| | | private JTextField tf_TestTime5_wt; //测试时间5
|
| | | private JTextField tf_TestTime6_wt; //测试时间6
|
| | | private JTextField tf_TestTime7_wt; //测试时间7
|
| | | private JTextField tf_TestTime8_wt; //测试时间8
|
| | | private JTextField tf_TestTime9_wt; //测试时间9
|
| | | private JTextField tf_TestTime10_wt; //测试时间10
|
| | | |
| | | private JButton btn_wt_read; //读取
|
| | | private JButton btn_wt_write; //设置
|
| | | private JButton btn_wt_start; //启动
|
| | | private JButton btn_wt_pause; //暂停
|
| | | private JButton btn_wt_stop; //ֹͣ
|
| | | |
| | | private JTextField tf_JiFangNum_zd; //机房编号 |
| | | private JTextField tf_DeviceNum_zd; //设备编号 |
| | | private JTextField tf_STDPower_zd; //额定功率 |
| | | private JTextField tf_TimeCount_zd; //测试间隔 |
| | | private JTextField tf_PowerCount_zd; //负载段数 |
| | | |
| | | private JButton btn_zd_read; //读取
|
| | | private JButton btn_zd_write; //设置
|
| | | private JButton btn_zd_start; //启动
|
| | | private JButton btn_zd_pause; //暂停
|
| | | private JButton btn_zd_stop; //ֹͣ
|
| | | |
| | | private JTextField tf_JiFangNum_bd; //机房编号 |
| | | private JTextField tf_DeviceNum_bd; //设备编号 |
| | | private JTextField tf_STDPower_bd; //额定功率 |
| | | private JTextField tf_TimeCount_bd; //测试间隔 |
| | | private JTextField tf_PowerCount_bd; //负载段数
|
| | | |
| | | private JButton btn_bd_read; //读取
|
| | | private JButton btn_bd_write; //设置
|
| | | private JButton btn_bd_start; //启动
|
| | | private JButton btn_bd_pause; //暂停
|
| | | private JButton btn_bd_stop; //ֹͣ
|
| | | |
| | | private JTextField tf_JiFangNum_st; //机房编号 |
| | | private JTextField tf_DeviceNum_st; //设备编号 |
| | | private JTextField tf_STDPower_st; //额定功率 |
| | | private JTextField tf_TimeCount_st; //测试间隔 |
| | | private JTextField tf_PowerPercent_st; //负载率
|
| | | |
| | | private JButton btn_st_read; //读取
|
| | | private JButton btn_st_write; //设置
|
| | | private JButton btn_st_start; //启动
|
| | | private JButton btn_st_pause; //暂停
|
| | | private JButton btn_st_stop; //ֹͣ
|
| | | |
| | | private JTextField tf_JiFangNum_xb; //机房编号 |
| | | private JTextField tf_DeviceNum_xb; //设备编号 |
| | | private JTextField tf_STDPower_xb; //额定功率 |
| | | private JTextField tf_PowerPercent_xb; //负载率
|
| | | |
| | | private JButton btn_xb_read; //读取
|
| | | private JButton btn_xb_write; //设置
|
| | | private JButton btn_xb_start; //启动
|
| | | private JButton btn_xb_pause; //暂停
|
| | | private JButton btn_xb_stop; //ֹͣ
|
| | | |
| | | |
| | | |
| | | private JComboBox<String> cb_testtype; //测试类型
|
| | | private JButton btn_set_testtype; //设置
|
| | |
|
| | | private JTextField tf_op_inf; //工作状态
|
| | | |
| | | private Logger logger;
|
| | | private JPanel panel_118;
|
| | | private JPanel panel_119;
|
| | | /**
|
| | | * Create the panel.
|
| | | */
|
| | | @SuppressWarnings({ "rawtypes", "unchecked" })
|
| | | public iac_600kw_page() {
|
| | | logger = LogManager.getLogger(iac_600kw_page.class);
|
| | |
|
| | | setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tabbedPane = new JTabbedPane(JTabbedPane.TOP);
|
| | | add(tabbedPane, BorderLayout.CENTER);
|
| | | |
| | | panel_baseinfo = new JPanel(); //电源遥测
|
| | | |
| | | panel_debug = new page_debug_inf(); //调试信息
|
| | | |
| | | |
| | | //tabbedPane.add(panel_baseinfo,"电源遥测");
|
| | | tabbedPane.addTab("设备信息",null/*new ImageIcon(zdhj_page_base.class.getResource("/png_16x16/target.png"))*/, panel_baseinfo, null);
|
| | |
|
| | | // tabbedPane.addTab("调试信息",null, panel_debug, null);
|
| | | tabbedPane.addTab("调试信息",null/*new ImageIcon(zdhj_page_base.class.getResource("/png_16x16/target.png"))*/, panel_debug, null);
|
| | | |
| | | /************************ 电源遥测 ********************************************/
|
| | | panel_baseinfo.setLayout(new BorderLayout()); |
| | | |
| | | JPanel panel_100 = new JPanel();
|
| | | panel_100.setBorder(new TitledBorder(null, "设备状态", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_baseinfo.add(panel_100, BorderLayout.CENTER);
|
| | | panel_100.setLayout(new GridLayout(6, 3, 0, 5));
|
| | | |
| | | JPanel panel_101 = new JPanel();
|
| | | panel_101.setBorder(new TitledBorder(null, "设备遥调遥控", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_baseinfo.add(panel_101, BorderLayout.EAST);
|
| | | panel_101.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | JPanel panel_102 = new JPanel();
|
| | | panel_102.setBorder(new TitledBorder(null, "Ua(V)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | // panel_102.setBorder(new TitledBorder(null, "A相电压", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_102);
|
| | | panel_102.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Ua = new JTextField();
|
| | | panel_102.add(tf_Ua);
|
| | | tf_Ua.setColumns(10);
|
| | | |
| | | JPanel panel_103 = new JPanel();
|
| | | // panel_103.setBorder(new TitledBorder(null, "B相电压", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_103.setBorder(new TitledBorder(null, "Ub(V)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_103);
|
| | | panel_103.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Ub = new JTextField();
|
| | | panel_103.add(tf_Ub);
|
| | | tf_Ub.setColumns(10);
|
| | | |
| | | JPanel panel_104 = new JPanel();
|
| | | panel_104.setBorder(new TitledBorder(null, "Uc(V)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | // panel_104.setBorder(new TitledBorder(null, "C相电压", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_104);
|
| | | panel_104.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Uc = new JTextField();
|
| | | panel_104.add(tf_Uc);
|
| | | tf_Uc.setColumns(10);
|
| | | |
| | | JPanel panel_105 = new JPanel();
|
| | | panel_105.setBorder(new TitledBorder(null, "Fre(Hz)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | // panel_105.setBorder(new TitledBorder(null, "交流频率", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | |
| | | panel_105.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Fre = new JTextField();
|
| | | panel_105.add(tf_Fre);
|
| | | tf_Fre.setColumns(10);
|
| | | |
| | | JPanel panel_106 = new JPanel();
|
| | | panel_106.setBorder(new TitledBorder(null, "Uab(V)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | // panel_106.setBorder(new TitledBorder(null, "AB线电压", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_106);
|
| | | panel_106.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Uab = new JTextField();
|
| | | panel_106.add(tf_Uab);
|
| | | tf_Uab.setColumns(10);
|
| | | |
| | | JPanel panel_107 = new JPanel();
|
| | | panel_107.setBorder(new TitledBorder(null, "Ubc(V)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | // panel_107.setBorder(new TitledBorder(null, "BC线电压", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_107);
|
| | | panel_107.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Ubc = new JTextField();
|
| | | panel_107.add(tf_Ubc);
|
| | | tf_Ubc.setColumns(10);
|
| | | |
| | | JPanel panel_108 = new JPanel();
|
| | | // panel_108.setBorder(new TitledBorder(null, "CA线电压", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_108.setBorder(new TitledBorder(null, "Uca(V)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_108);
|
| | | panel_108.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Uca = new JTextField();
|
| | | panel_108.add(tf_Uca);
|
| | | tf_Uca.setColumns(10);
|
| | | |
| | | JPanel panel_109 = new JPanel();
|
| | | panel_109.setBorder(new TitledBorder(null, "Ft", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | // panel_109.setBorder(new TitledBorder(null, "功率因数", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | |
| | | panel_109.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Ft = new JTextField();
|
| | | panel_109.add(tf_Ft);
|
| | | tf_Ft.setColumns(10);
|
| | | |
| | | JPanel panel_110 = new JPanel();
|
| | | panel_110.setBorder(new TitledBorder(null, "JbxbUa(V)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | // panel_110.setBorder(new TitledBorder(null, "基波谐波电压A", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_110);
|
| | | panel_110.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_JbxbUa = new JTextField();
|
| | | panel_110.add(tf_JbxbUa);
|
| | | tf_JbxbUa.setColumns(10);
|
| | | |
| | | JPanel panel_111 = new JPanel();
|
| | | panel_111.setBorder(new TitledBorder(null, "JbxbUb(V)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | // panel_111.setBorder(new TitledBorder(null, "基波谐波电压B", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_111);
|
| | | panel_111.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_JbxbUb = new JTextField();
|
| | | panel_111.add(tf_JbxbUb);
|
| | | tf_JbxbUb.setColumns(10);
|
| | | |
| | | JPanel panel_112 = new JPanel();
|
| | | panel_112.setBorder(new TitledBorder(null, "JbxbUc(V)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | // panel_112.setBorder(new TitledBorder(null, "基波谐波电压C", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_112);
|
| | | panel_112.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_JbxbUc = new JTextField();
|
| | | panel_112.add(tf_JbxbUc);
|
| | | tf_JbxbUc.setColumns(10);
|
| | | |
| | | JPanel panel_113 = new JPanel();
|
| | | panel_113.setBorder(new TitledBorder(null, "P(kW)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | // panel_113.setBorder(new TitledBorder(null, "有功功率", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | |
| | | panel_113.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_P = new JTextField();
|
| | | panel_113.add(tf_P);
|
| | | tf_P.setColumns(10);
|
| | | |
| | | JPanel panel_114 = new JPanel();
|
| | | panel_114.setBorder(new TitledBorder(null, "JbxbIa(A)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | // panel_114.setBorder(new TitledBorder(null, "基波谐波电流A", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_114);
|
| | | panel_114.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_JbxbIa = new JTextField();
|
| | | panel_114.add(tf_JbxbIa);
|
| | | tf_JbxbIa.setColumns(10);
|
| | | |
| | | JPanel panel_115 = new JPanel();
|
| | | panel_115.setBorder(new TitledBorder(null, "JbxbIb(A)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | // panel_115.setBorder(new TitledBorder(null, "基波谐波电流B", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_115);
|
| | | panel_115.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_JbxbIb = new JTextField();
|
| | | panel_115.add(tf_JbxbIb);
|
| | | tf_JbxbIb.setColumns(10);
|
| | | |
| | | JPanel panel_116 = new JPanel();
|
| | | panel_116.setBorder(new TitledBorder(null, "JbxbIc(A)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | // panel_116.setBorder(new TitledBorder(null, "基波谐波电流C", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_116);
|
| | | panel_116.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_JbxbIc = new JTextField();
|
| | | panel_116.add(tf_JbxbIc);
|
| | | tf_JbxbIc.setColumns(10);
|
| | | |
| | | JPanel panel_117 = new JPanel();
|
| | | panel_117.setBorder(new TitledBorder(null, "工作状态", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | |
| | | panel_117.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | panel_100.add(panel_105);
|
| | | panel_100.add(panel_109);
|
| | | panel_100.add(panel_113);
|
| | | panel_100.add(panel_117);
|
| | | |
| | | SysWorkState = new JTextField();
|
| | | panel_117.add(SysWorkState);
|
| | | SysWorkState.setColumns(10);
|
| | | |
| | | panel_118 = new JPanel();
|
| | | panel_100.add(panel_118);
|
| | | panel_118.setBorder(new TitledBorder(null, "Ia(A)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_118.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Ia = new JTextField();
|
| | | panel_118.add(tf_Ia);
|
| | | tf_Ia.setColumns(10);
|
| | | |
| | | panel_119 = new JPanel();
|
| | | panel_119.setBorder(new TitledBorder(null, "Ib(A)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_119);
|
| | | panel_119.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Ib = new JTextField();
|
| | | tf_Ib.setColumns(10);
|
| | | panel_119.add(tf_Ib);
|
| | | |
| | | JPanel panel_120 = new JPanel();
|
| | | panel_120.setBorder(new TitledBorder(null, "Ic(A)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_120);
|
| | | panel_120.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Ic = new JTextField();
|
| | | tf_Ic.setColumns(10);
|
| | | panel_120.add(tf_Ic);
|
| | | |
| | | JPanel panel_121 = new JPanel();
|
| | | panel_121.setBorder(new TitledBorder(null, "FTa", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_121);
|
| | | panel_121.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_FTa = new JTextField();
|
| | | tf_FTa.setColumns(10);
|
| | | panel_121.add(tf_FTa);
|
| | | |
| | | JPanel panel_122 = new JPanel();
|
| | | panel_122.setBorder(new TitledBorder(null, "FTb", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_122);
|
| | | panel_122.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_FTb = new JTextField();
|
| | | tf_FTb.setColumns(10);
|
| | | panel_122.add(tf_FTb);
|
| | | |
| | | JPanel panel_123 = new JPanel();
|
| | | panel_123.setBorder(new TitledBorder(null, "FTc", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_123);
|
| | | panel_123.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_FTc = new JTextField();
|
| | | tf_FTc.setColumns(10);
|
| | | panel_123.add(tf_FTc);
|
| | | |
| | | JPanel panel_124 = new JPanel();
|
| | | panel_124.setBorder(new TitledBorder(null, "Pa(kW)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_124);
|
| | | panel_124.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Pa = new JTextField();
|
| | | tf_Pa.setColumns(10);
|
| | | panel_124.add(tf_Pa);
|
| | | |
| | | JPanel panel_125 = new JPanel();
|
| | | panel_125.setBorder(new TitledBorder(null, "Pb(kW)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_125);
|
| | | panel_125.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Pb = new JTextField();
|
| | | tf_Pb.setColumns(10);
|
| | | panel_125.add(tf_Pb);
|
| | | |
| | | JPanel panel_126 = new JPanel();
|
| | | panel_126.setBorder(new TitledBorder(null, "Pc(kW)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_126);
|
| | | panel_126.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Pc = new JTextField();
|
| | | tf_Pc.setColumns(10);
|
| | | panel_126.add(tf_Pc);
|
| | | |
| | | JPanel panel_127 = new JPanel();
|
| | | panel_127.setBorder(new TitledBorder(null, "Qa(kVar)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_127);
|
| | | panel_127.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Qa = new JTextField();
|
| | | tf_Qa.setColumns(10);
|
| | | panel_127.add(tf_Qa);
|
| | | |
| | | JPanel panel_128 = new JPanel();
|
| | | panel_128.setBorder(new TitledBorder(null, "Qb(kVar)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_128);
|
| | | panel_128.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Qb = new JTextField();
|
| | | tf_Qb.setColumns(10);
|
| | | panel_128.add(tf_Qb);
|
| | | |
| | | JPanel panel_129 = new JPanel();
|
| | | panel_129.setBorder(new TitledBorder(null, "Qc(kVar)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_129);
|
| | | panel_129.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Qc = new JTextField();
|
| | | tf_Qc.setColumns(10);
|
| | | panel_129.add(tf_Qc);
|
| | | |
| | | JPanel panel_170 = new JPanel();
|
| | | panel_170.setBorder(new TitledBorder(null, "Q(kVar)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_170);
|
| | | panel_170.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Q = new JTextField();
|
| | | tf_Q.setColumns(10);
|
| | | panel_170.add(tf_Q);
|
| | | |
| | | JPanel panel_171 = new JPanel();
|
| | | panel_171.setBorder(new TitledBorder(null, "Sa(KKVA)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_171);
|
| | | panel_171.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Sa = new JTextField();
|
| | | tf_Sa.setColumns(10);
|
| | | panel_171.add(tf_Sa);
|
| | | |
| | | JPanel panel_172 = new JPanel();
|
| | | panel_172.setBorder(new TitledBorder(null, "Sb(KKVA)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_172);
|
| | | panel_172.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Sb = new JTextField();
|
| | | tf_Sb.setColumns(10);
|
| | | panel_172.add(tf_Sb);
|
| | | |
| | | JPanel panel_173 = new JPanel();
|
| | | panel_173.setBorder(new TitledBorder(null, "Sc(KKVA)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_173);
|
| | | panel_173.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Sc = new JTextField();
|
| | | tf_Sc.setColumns(10);
|
| | | panel_173.add(tf_Sc);
|
| | | |
| | | JPanel panel_174 = new JPanel();
|
| | | panel_174.setBorder(new TitledBorder(null, "S(KKVA)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_174);
|
| | | panel_174.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_S = new JTextField();
|
| | | tf_S.setColumns(10);
|
| | | panel_174.add(tf_S);
|
| | | |
| | | JPanel panel_175 = new JPanel();
|
| | | panel_175.setBorder(new TitledBorder(null, "Ep(KWH)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_175);
|
| | | panel_175.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Ep = new JTextField();
|
| | | tf_Ep.setColumns(10);
|
| | | panel_175.add(tf_Ep);
|
| | | |
| | | JPanel panel_176 = new JPanel();
|
| | | panel_176.setBorder(new TitledBorder(null, "PHv", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_176);
|
| | | panel_176.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_PHv = new JTextField();
|
| | | tf_PHv.setColumns(10);
|
| | | panel_176.add(tf_PHv);
|
| | | |
| | | JPanel panel_177 = new JPanel();
|
| | | panel_177.setBorder(new TitledBorder(null, "PHa", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_100.add(panel_177);
|
| | | panel_177.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_PHa = new JTextField();
|
| | | tf_PHa.setColumns(10);
|
| | | panel_177.add(tf_PHa);
|
| | | |
| | | |
| | | JPanel panel_130 = new JPanel(); |
| | | panel_101.add(panel_130,BorderLayout.CENTER);
|
| | | panel_130.setLayout(new BorderLayout());
|
| | | |
| | | JTabbedPane tp_param = new JTabbedPane(JTabbedPane.TOP);
|
| | | panel_130.add(tp_param, BorderLayout.CENTER);
|
| | | |
| | | JPanel panel_wt = new JPanel();
|
| | | JPanel panel_zd = new JPanel();
|
| | | JPanel panel_bd = new JPanel();
|
| | | JPanel panel_st = new JPanel();
|
| | | JPanel panel_xb = new JPanel();
|
| | | |
| | | tp_param.addTab("稳态测试",null/*new ImageIcon(zdhj_page_base.class.getResource("/png_16x16/target.png"))*/, panel_wt, null);
|
| | | tp_param.addTab("整定测试",null/*new ImageIcon(zdhj_page_base.class.getResource("/png_16x16/target.png"))*/, panel_zd, null);
|
| | | tp_param.addTab("波动测试",null/*new ImageIcon(zdhj_page_base.class.getResource("/png_16x16/target.png"))*/, panel_bd, null);
|
| | | tp_param.addTab("瞬态测试",null/*new ImageIcon(zdhj_page_base.class.getResource("/png_16x16/target.png"))*/, panel_st, null);
|
| | | tp_param.addTab("谐波测试",null/*new ImageIcon(zdhj_page_base.class.getResource("/png_16x16/target.png"))*/, panel_xb, null);
|
| | | |
| | | panel_wt.setLayout(new BorderLayout()); |
| | | panel_zd.setLayout(new BorderLayout()); |
| | | panel_bd.setLayout(new BorderLayout()); |
| | | panel_st.setLayout(new BorderLayout()); |
| | | panel_xb.setLayout(new BorderLayout()); |
| | | |
| | | JPanel panel_131 = new JPanel();
|
| | | panel_wt.add(panel_131,BorderLayout.CENTER);
|
| | | panel_131.setLayout(new GridLayout(0,4));
|
| | | |
| | | JPanel panel_132 = new JPanel();
|
| | | panel_132.setBorder(new TitledBorder(null, "机房编号", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_132);
|
| | | panel_132.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_JiFangNum_wt = new JTextField();
|
| | | tf_JiFangNum_wt.setEditable(false);
|
| | | panel_132.add(tf_JiFangNum_wt);
|
| | | tf_JiFangNum_wt.setColumns(10);
|
| | | |
| | | JPanel panel_133 = new JPanel();
|
| | | panel_133.setBorder(new TitledBorder(null, "设备编号", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_133);
|
| | | panel_133.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_DeviceNum_wt = new JTextField();
|
| | | tf_DeviceNum_wt.setEditable(false);
|
| | | panel_133.add(tf_DeviceNum_wt);
|
| | | tf_DeviceNum_wt.setColumns(10);
|
| | | |
| | | JPanel panel_134 = new JPanel();
|
| | | panel_134.setBorder(new TitledBorder(null, "功率段数", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_134);
|
| | | panel_134.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_PowerCount_wt = new JTextField();
|
| | | tf_PowerCount_wt.setDocument(new LimitedDocument(2, "0123456789"));
|
| | | panel_134.add(tf_PowerCount_wt);
|
| | | tf_PowerCount_wt.setColumns(10);
|
| | | |
| | | JPanel panel_135 = new JPanel();
|
| | | panel_135.setBorder(new TitledBorder(null, "电压下限(V)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_135);
|
| | | panel_135.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_VolLowLimit_wt = new JTextField();
|
| | | tf_VolLowLimit_wt.setDocument(new LimitedDocument(3, "0123456789"));
|
| | | panel_135.add(tf_VolLowLimit_wt);
|
| | | tf_VolLowLimit_wt.setColumns(10);
|
| | | |
| | | JPanel panel_136 = new JPanel();
|
| | | panel_136.setBorder(new TitledBorder(null, "电流上限(A)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_136);
|
| | | panel_136.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_CurrHigh_wt = new JTextField();
|
| | | tf_CurrHigh_wt.setDocument(new LimitedDocument(3, "0123456789"));
|
| | | panel_136.add(tf_CurrHigh_wt);
|
| | | tf_CurrHigh_wt.setColumns(10);
|
| | | |
| | | JPanel panel_137 = new JPanel();
|
| | | panel_137.setBorder(new TitledBorder(null, "电压上限(V)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_137);
|
| | | panel_137.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_VolHigh_wt = new JTextField();
|
| | | tf_VolHigh_wt.setDocument(new LimitedDocument(3, "0123456789"));
|
| | | panel_137.add(tf_VolHigh_wt);
|
| | | tf_VolHigh_wt.setColumns(10);
|
| | | |
| | | JPanel panel_138 = new JPanel();
|
| | | panel_138.setBorder(new TitledBorder(null, "功率1(KVA)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_138);
|
| | | panel_138.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Power1_wt = new JTextField();
|
| | | tf_Power1_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_138.add(tf_Power1_wt);
|
| | | 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_131.add(panel_139);
|
| | | panel_139.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_TestTime1_wt = new JTextField();
|
| | | tf_TestTime1_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_139.add(tf_TestTime1_wt);
|
| | | tf_TestTime1_wt.setColumns(10);
|
| | | |
| | | JPanel panel_140 = new JPanel();
|
| | | panel_140.setBorder(new TitledBorder(null, "功率2(KVA)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_140);
|
| | | panel_140.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Power2_wt = new JTextField();
|
| | | tf_Power2_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_140.add(tf_Power2_wt);
|
| | | 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_131.add(panel_141);
|
| | | panel_141.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_TestTime2_wt = new JTextField();
|
| | | tf_TestTime2_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_141.add(tf_TestTime2_wt);
|
| | | tf_TestTime2_wt.setColumns(10);
|
| | | |
| | | JPanel panel_142 = new JPanel();
|
| | | panel_142.setBorder(new TitledBorder(null, "功率3(KVA)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_142);
|
| | | panel_142.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Power3_wt = new JTextField();
|
| | | tf_Power3_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_142.add(tf_Power3_wt);
|
| | | 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_131.add(panel_143);
|
| | | panel_143.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_TestTime3_wt = new JTextField();
|
| | | tf_TestTime3_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_143.add(tf_TestTime3_wt);
|
| | | tf_TestTime3_wt.setColumns(10);
|
| | | |
| | | JPanel panel_144 = new JPanel();
|
| | | panel_144.setBorder(new TitledBorder(null, "功率4(KVA)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_144);
|
| | | panel_144.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Power4_wt = new JTextField();
|
| | | tf_Power4_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_144.add(tf_Power4_wt);
|
| | | 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_131.add(panel_145);
|
| | | panel_145.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_TestTime4_wt = new JTextField();
|
| | | tf_TestTime4_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_145.add(tf_TestTime4_wt);
|
| | | tf_TestTime4_wt.setColumns(10);
|
| | | |
| | | JPanel panel_146 = new JPanel();
|
| | | panel_146.setBorder(new TitledBorder(null, "功率5(KVA)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_146);
|
| | | panel_146.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Power5_wt = new JTextField();
|
| | | tf_Power5_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_146.add(tf_Power5_wt);
|
| | | 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_131.add(panel_147);
|
| | | panel_147.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_TestTime5_wt = new JTextField();
|
| | | tf_TestTime5_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_147.add(tf_TestTime5_wt);
|
| | | tf_TestTime5_wt.setColumns(10);
|
| | | |
| | | JPanel panel_148 = new JPanel();
|
| | | panel_148.setBorder(new TitledBorder(null, "功率6(KVA)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_148);
|
| | | panel_148.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Power6_wt = new JTextField();
|
| | | tf_Power6_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_148.add(tf_Power6_wt);
|
| | | 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_131.add(panel_149);
|
| | | panel_149.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_TestTime6_wt = new JTextField();
|
| | | tf_TestTime6_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_149.add(tf_TestTime6_wt);
|
| | | tf_TestTime6_wt.setColumns(10);
|
| | | |
| | | JPanel panel_150 = new JPanel();
|
| | | panel_150.setBorder(new TitledBorder(null, "功率7(KVA)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_150);
|
| | | panel_150.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Power7_wt = new JTextField();
|
| | | tf_Power7_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_150.add(tf_Power7_wt);
|
| | | 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_131.add(panel_151);
|
| | | panel_151.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_TestTime7_wt = new JTextField();
|
| | | tf_TestTime7_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_151.add(tf_TestTime7_wt);
|
| | | tf_TestTime7_wt.setColumns(10);
|
| | | |
| | | JPanel panel_152 = new JPanel();
|
| | | panel_152.setBorder(new TitledBorder(null, "功率8(KVA)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_152);
|
| | | panel_152.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Power8_wt = new JTextField();
|
| | | tf_Power8_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_152.add(tf_Power8_wt);
|
| | | 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_131.add(panel_153);
|
| | | panel_153.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_TestTime8_wt = new JTextField();
|
| | | tf_TestTime8_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_153.add(tf_TestTime8_wt);
|
| | | tf_TestTime8_wt.setColumns(10);
|
| | | |
| | | JPanel panel_154 = new JPanel();
|
| | | panel_154.setBorder(new TitledBorder(null, "功率9(KVA)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_154);
|
| | | panel_154.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Power9_wt = new JTextField();
|
| | | tf_Power9_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_154.add(tf_Power9_wt);
|
| | | 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_131.add(panel_155);
|
| | | panel_155.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_TestTime9_wt = new JTextField();
|
| | | tf_TestTime9_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_155.add(tf_TestTime9_wt);
|
| | | tf_TestTime9_wt.setColumns(10);
|
| | | |
| | | JPanel panel_80 = new JPanel();
|
| | | panel_80.setBorder(new TitledBorder(null, "功率10(KVA)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_131.add(panel_80);
|
| | | panel_80.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_Power10_wt = new JTextField();
|
| | | tf_Power10_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_80.add(tf_Power10_wt);
|
| | | 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_131.add(panel_81);
|
| | | panel_81.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_TestTime10_wt = new JTextField();
|
| | | tf_TestTime10_wt.setDocument(new LimitedDocument(4, "0123456789"));
|
| | | panel_81.add(tf_TestTime10_wt);
|
| | | tf_TestTime10_wt.setColumns(10);
|
| | | |
| | | |
| | | |
| | | JPanel panel_156 = new JPanel();
|
| | | panel_wt.add(panel_156,BorderLayout.SOUTH);
|
| | | panel_156.setLayout(new FlowLayout(FlowLayout.CENTER,5,5));
|
| | | |
| | | btn_wt_read = new JButton("读取");
|
| | | btn_wt_read.setEnabled(false);
|
| | | btn_wt_read.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_READ, IAC_ComBase.CMD_TestParam_Addr, ByteBuffer.allocate(0)); |
| | | }
|
| | | });
|
| | | btn_wt_read.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_156.add(btn_wt_read);
|
| | | |
| | | btn_wt_write = new JButton("设置");
|
| | | btn_wt_write.setEnabled(false);
|
| | | btn_wt_write.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | if(!Comm_ICA.m_TestParamFromDev.is_ReadParam) {
|
| | | JOptionPane.showMessageDialog(null, "请先读取测试参数!");
|
| | | return;
|
| | | }
|
| | | IAC_TestParam tmp_param = new IAC_TestParam();
|
| | | tmp_param.clone(Comm_ICA.m_TestParamFromDev);
|
| | | |
| | | try {
|
| | | tmp_param.WTPowerCount = Integer.parseInt(tf_PowerCount_wt.getText()); //功率段数[1-10]
|
| | | tmp_param.VolLowLimit = Integer.parseInt(tf_VolLowLimit_wt.getText()); //电压下限[1-220V]
|
| | | tmp_param.Power1[0] = Integer.parseInt(tf_Power1_wt.getText());; //功率段[0-9999KVA]
|
| | | tmp_param.Power1[1] = Integer.parseInt(tf_Power2_wt.getText());; //功率段[0-9999KVA]
|
| | | tmp_param.Power1[2] = Integer.parseInt(tf_Power3_wt.getText());; //功率段[0-9999KVA]
|
| | | tmp_param.Power1[3] = Integer.parseInt(tf_Power4_wt.getText());; //功率段[0-9999KVA]
|
| | | tmp_param.Power1[4] = Integer.parseInt(tf_Power5_wt.getText());; //功率段[0-9999KVA]
|
| | | tmp_param.Power1[5] = Integer.parseInt(tf_Power6_wt.getText());; //功率段[0-9999KVA]
|
| | | tmp_param.Power1[6] = Integer.parseInt(tf_Power7_wt.getText());; //功率段[0-9999KVA]
|
| | | tmp_param.Power1[7] = Integer.parseInt(tf_Power8_wt.getText());; //功率段[0-9999KVA]
|
| | | tmp_param.Power1[8] = Integer.parseInt(tf_Power9_wt.getText());; //功率段[0-9999KVA]
|
| | | tmp_param.Power1[9] = Integer.parseInt(tf_Power10_wt.getText());; //功率段[0-9999KVA]
|
| | | tmp_param.CurrHigh = Float.parseFloat(tf_CurrHigh_wt.getText()); //电流上限(1-525A)
|
| | | tmp_param.VolHigh = Float.parseFloat(tf_VolHigh_wt.getText()); //电压上限(1-255V)
|
| | | tmp_param.TestTime[0] = Integer.parseInt(tf_TestTime1_wt.getText()); //测试时间段(0-5999min)
|
| | | tmp_param.TestTime[1] = Integer.parseInt(tf_TestTime2_wt.getText()); //测试时间段(0-5999min)
|
| | | tmp_param.TestTime[2] = Integer.parseInt(tf_TestTime3_wt.getText()); //测试时间段(0-5999min)
|
| | | tmp_param.TestTime[3] = Integer.parseInt(tf_TestTime4_wt.getText()); //测试时间段(0-5999min)
|
| | | tmp_param.TestTime[4] = Integer.parseInt(tf_TestTime5_wt.getText()); //测试时间段(0-5999min)
|
| | | tmp_param.TestTime[5] = Integer.parseInt(tf_TestTime6_wt.getText()); //测试时间段(0-5999min)
|
| | | tmp_param.TestTime[6] = Integer.parseInt(tf_TestTime7_wt.getText()); //测试时间段(0-5999min)
|
| | | tmp_param.TestTime[7] = Integer.parseInt(tf_TestTime8_wt.getText()); //测试时间段(0-5999min)
|
| | | tmp_param.TestTime[8] = Integer.parseInt(tf_TestTime9_wt.getText()); //测试时间段(0-5999min)
|
| | | tmp_param.TestTime[9] = Integer.parseInt(tf_TestTime10_wt.getText()); //测试时间段(0-5999min)
|
| | | tmp_param.ParamType = IAC_TestParam.ParamType_WT;
|
| | | |
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_MULTY, IAC_ComBase.CMD_SetTestParam_Addr, tmp_param.getByteBuffer());
|
| | | } catch (NumberFormatException e) {
|
| | | JOptionPane.showMessageDialog(null, "请输入合法的测试参数!");
|
| | | return;
|
| | | } |
| | | }
|
| | | });
|
| | | btn_wt_write.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_156.add(btn_wt_write);
|
| | | |
| | | btn_wt_start = new JButton("启动");
|
| | | btn_wt_start.setEnabled(false);
|
| | | btn_wt_start.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | 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));
|
| | | panel_156.add(btn_wt_start);
|
| | | |
| | | btn_wt_pause = new JButton("暂停");
|
| | | btn_wt_pause.setEnabled(false);
|
| | | btn_wt_pause.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_WTTest_Addr, IAC_Cmd.createControlByteBuffer(0x0002&0xFFFF));
|
| | | }
|
| | | });
|
| | | btn_wt_pause.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_156.add(btn_wt_pause);
|
| | | |
| | | btn_wt_stop = new JButton("ֹͣ");
|
| | | btn_wt_stop.setEnabled(false);
|
| | | btn_wt_stop.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_WTTest_Addr, IAC_Cmd.createControlByteBuffer(0x0003&0xFFFF));
|
| | | }
|
| | | });
|
| | | btn_wt_stop.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_156.add(btn_wt_stop);
|
| | | |
| | | JPanel panel_157 = new JPanel();
|
| | | panel_zd.add(panel_157,BorderLayout.NORTH);
|
| | | panel_157.setLayout(new GridLayout(0,4));
|
| | | |
| | | JPanel panel_158 = new JPanel();
|
| | | panel_158.setBorder(new TitledBorder(null, "机房编号", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_157.add(panel_158);
|
| | | panel_158.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_JiFangNum_zd = new JTextField();
|
| | | tf_JiFangNum_zd.setEditable(false);
|
| | | panel_158.add(tf_JiFangNum_zd);
|
| | | tf_JiFangNum_zd.setColumns(10);
|
| | | |
| | | JPanel panel_159 = new JPanel();
|
| | | panel_159.setBorder(new TitledBorder(null, "设备编号", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_157.add(panel_159);
|
| | | panel_159.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_DeviceNum_zd = new JTextField();
|
| | | tf_DeviceNum_zd.setEditable(false);
|
| | | panel_159.add(tf_DeviceNum_zd);
|
| | | tf_DeviceNum_zd.setColumns(10);
|
| | | |
| | | JPanel panel_160 = new JPanel();
|
| | | panel_160.setBorder(new TitledBorder(null, "额定功率(KW)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_157.add(panel_160);
|
| | | panel_160.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_STDPower_zd = new JTextField();
|
| | | panel_160.add(tf_STDPower_zd);
|
| | | tf_STDPower_zd.setColumns(10);
|
| | | |
| | | JPanel panel_161 = new JPanel();
|
| | | panel_161.setBorder(new TitledBorder(null, "测试间隔(S)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_157.add(panel_161);
|
| | | panel_161.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_TimeCount_zd = new JTextField();
|
| | | panel_161.add(tf_TimeCount_zd);
|
| | | tf_TimeCount_zd.setColumns(10);
|
| | | |
| | | JPanel panel_162 = new JPanel();
|
| | | panel_162.setBorder(new TitledBorder(null, "负载段数", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_157.add(panel_162);
|
| | | panel_162.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_PowerCount_zd = new JTextField();
|
| | | panel_162.add(tf_PowerCount_zd);
|
| | | tf_PowerCount_zd.setColumns(10);
|
| | | |
| | | JPanel panel_163 = new JPanel();
|
| | | panel_zd.add(panel_163,BorderLayout.SOUTH);
|
| | | panel_163.setLayout(new FlowLayout(FlowLayout.CENTER,5,5));
|
| | | |
| | | btn_zd_read = new JButton("读取");
|
| | | btn_zd_read.setEnabled(false);
|
| | | btn_zd_read.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_READ, IAC_ComBase.CMD_TestParam_Addr, ByteBuffer.allocate(0)); |
| | | }
|
| | | });
|
| | | btn_zd_read.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_163.add(btn_zd_read);
|
| | | |
| | | btn_zd_write = new JButton("设置");
|
| | | btn_zd_write.setEnabled(false);
|
| | | btn_zd_write.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | if(!Comm_ICA.m_TestParamFromDev.is_ReadParam) {
|
| | | JOptionPane.showMessageDialog(null, "请先读取测试参数!");
|
| | | return;
|
| | | }
|
| | | IAC_TestParam tmp_param = new IAC_TestParam();
|
| | | tmp_param.clone(Comm_ICA.m_TestParamFromDev);
|
| | | |
| | | try {
|
| | | tmp_param.STDPower = Float.parseFloat(tf_STDPower_zd.getText()); //额定功率负载(0-9999KW)
|
| | | tmp_param.TimeCount = Integer.parseInt(tf_TimeCount_zd.getText()); //测试间隔(5-9999S)
|
| | | tmp_param.ZDPowerCount = Integer.parseInt(tf_PowerCount_zd.getText()); //功率段数(2-5)
|
| | | //tmp_param.PowerPercent; //负载率(0-100%)
|
| | | tmp_param.ParamType = IAC_TestParam.ParamType_Other; //设置参数类型 0-稳态测试 1-其他
|
| | | |
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_MULTY, IAC_ComBase.CMD_SetTestParam_Addr, tmp_param.getByteBuffer());
|
| | | } catch (NumberFormatException e) {
|
| | | JOptionPane.showMessageDialog(null, "请输入合法的测试参数!");
|
| | | return;
|
| | | }
|
| | | }
|
| | | });
|
| | | btn_zd_write.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_163.add(btn_zd_write);
|
| | | |
| | | btn_zd_start = new JButton("启动");
|
| | | btn_zd_start.setEnabled(false);
|
| | | btn_zd_start.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | 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));
|
| | | panel_163.add(btn_zd_start);
|
| | | |
| | | btn_zd_pause = new JButton("暂停");
|
| | | btn_zd_pause.setEnabled(false);
|
| | | btn_zd_pause.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_ZDTest_Addr, IAC_Cmd.createControlByteBuffer(0x0002&0xFFFF));
|
| | | }
|
| | | });
|
| | | btn_zd_pause.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_163.add(btn_zd_pause);
|
| | | |
| | | btn_zd_stop = new JButton("ֹͣ");
|
| | | btn_zd_stop.setEnabled(false);
|
| | | btn_zd_stop.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_ZDTest_Addr, IAC_Cmd.createControlByteBuffer(0x0003&0xFFFF));
|
| | | }
|
| | | });
|
| | | btn_zd_stop.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_163.add(btn_zd_stop);
|
| | | |
| | | JPanel panel_164= new JPanel();
|
| | | panel_bd.add(panel_164,BorderLayout.NORTH);
|
| | | panel_164.setLayout(new GridLayout(0,4));
|
| | | |
| | | JPanel panel_165 = new JPanel();
|
| | | panel_165.setBorder(new TitledBorder(null, "机房编号", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_164.add(panel_165);
|
| | | panel_165.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_JiFangNum_bd = new JTextField();
|
| | | tf_JiFangNum_bd.setEditable(false);
|
| | | panel_165.add(tf_JiFangNum_bd);
|
| | | tf_JiFangNum_bd.setColumns(10);
|
| | | |
| | | JPanel panel_166 = new JPanel();
|
| | | panel_166.setBorder(new TitledBorder(null, "设备编号", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_164.add(panel_166);
|
| | | panel_166.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_DeviceNum_bd = new JTextField();
|
| | | tf_DeviceNum_bd.setEditable(false);
|
| | | panel_166.add(tf_DeviceNum_bd);
|
| | | tf_DeviceNum_bd.setColumns(10);
|
| | | |
| | | JPanel panel_167 = new JPanel();
|
| | | panel_167.setBorder(new TitledBorder(null, "额定功率(KW)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_164.add(panel_167);
|
| | | panel_167.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_STDPower_bd = new JTextField();
|
| | | panel_167.add(tf_STDPower_bd);
|
| | | tf_STDPower_bd.setColumns(10);
|
| | | |
| | | JPanel panel_168 = new JPanel();
|
| | | panel_168.setBorder(new TitledBorder(null, "测试间隔(S)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_164.add(panel_168);
|
| | | panel_168.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_TimeCount_bd = new JTextField();
|
| | | panel_168.add(tf_TimeCount_bd);
|
| | | tf_TimeCount_bd.setColumns(10);
|
| | | |
| | | JPanel panel_169 = new JPanel();
|
| | | panel_169.setBorder(new TitledBorder(null, "负载段数", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_164.add(panel_169);
|
| | | panel_169.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_PowerCount_bd = new JTextField();
|
| | | panel_169.add(tf_PowerCount_bd);
|
| | | tf_PowerCount_bd.setColumns(10);
|
| | | |
| | | JPanel panel_270 = new JPanel();
|
| | | panel_bd.add(panel_270,BorderLayout.SOUTH);
|
| | | panel_270.setLayout(new FlowLayout(FlowLayout.CENTER,5,5));
|
| | | |
| | | btn_bd_read = new JButton("读取");
|
| | | btn_bd_read.setEnabled(false);
|
| | | btn_bd_read.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_READ, IAC_ComBase.CMD_TestParam_Addr, ByteBuffer.allocate(0)); |
| | | }
|
| | | });
|
| | | btn_bd_read.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_270.add(btn_bd_read);
|
| | | |
| | | btn_bd_write = new JButton("设置");
|
| | | btn_bd_write.setEnabled(false);
|
| | | btn_bd_write.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | if(!Comm_ICA.m_TestParamFromDev.is_ReadParam) {
|
| | | JOptionPane.showMessageDialog(null, "请先读取测试参数!");
|
| | | return;
|
| | | }
|
| | | IAC_TestParam tmp_param = new IAC_TestParam();
|
| | | tmp_param.clone(Comm_ICA.m_TestParamFromDev);
|
| | | |
| | | try {
|
| | | tmp_param.STDPower = Float.parseFloat(tf_STDPower_bd.getText()); //额定功率负载(0-9999KW)
|
| | | tmp_param.TimeCount = Integer.parseInt(tf_TimeCount_bd.getText()); //测试间隔(5-9999S)
|
| | | 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-其他
|
| | | |
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_MULTY, IAC_ComBase.CMD_SetTestParam_Addr, tmp_param.getByteBuffer());
|
| | | } catch (NumberFormatException e) {
|
| | | JOptionPane.showMessageDialog(null, "请输入合法的测试参数!");
|
| | | return;
|
| | | }
|
| | | }
|
| | | });
|
| | | btn_bd_write.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_270.add(btn_bd_write);
|
| | | |
| | | btn_bd_start = new JButton("启动");
|
| | | btn_bd_start.setEnabled(false);
|
| | | btn_bd_start.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | 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));
|
| | | panel_270.add(btn_bd_start);
|
| | | |
| | | btn_bd_pause = new JButton("暂停");
|
| | | btn_bd_pause.setEnabled(false);
|
| | | btn_bd_pause.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_BDTest_Addr, IAC_Cmd.createControlByteBuffer(0x0002&0xFFFF));
|
| | | }
|
| | | });
|
| | | btn_bd_pause.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_270.add(btn_bd_pause);
|
| | | |
| | | btn_bd_stop = new JButton("ֹͣ");
|
| | | btn_bd_stop.setEnabled(false);
|
| | | btn_bd_stop.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_BDTest_Addr, IAC_Cmd.createControlByteBuffer(0x0003&0xFFFF));
|
| | | }
|
| | | });
|
| | | btn_bd_stop.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_270.add(btn_bd_stop);
|
| | | |
| | | JPanel panel_271= new JPanel();
|
| | | panel_st.add(panel_271,BorderLayout.NORTH);
|
| | | panel_271.setLayout(new GridLayout(0,4));
|
| | | |
| | | JPanel panel_272 = new JPanel();
|
| | | panel_272.setBorder(new TitledBorder(null, "机房编号", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_271.add(panel_272);
|
| | | panel_272.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_JiFangNum_st = new JTextField();
|
| | | tf_JiFangNum_st.setEditable(false);
|
| | | panel_272.add(tf_JiFangNum_st);
|
| | | tf_JiFangNum_st.setColumns(10);
|
| | | |
| | | JPanel panel_273 = new JPanel();
|
| | | panel_273.setBorder(new TitledBorder(null, "设备编号", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_271.add(panel_273);
|
| | | panel_273.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_DeviceNum_st = new JTextField();
|
| | | tf_DeviceNum_st.setEditable(false);
|
| | | panel_273.add(tf_DeviceNum_st);
|
| | | tf_DeviceNum_st.setColumns(10);
|
| | | |
| | | JPanel panel_274 = new JPanel();
|
| | | panel_274.setBorder(new TitledBorder(null, "额定功率(KW)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_271.add(panel_274);
|
| | | panel_274.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_STDPower_st = new JTextField();
|
| | | panel_274.add(tf_STDPower_st);
|
| | | tf_STDPower_st.setColumns(10);
|
| | | |
| | | JPanel panel_275 = new JPanel();
|
| | | panel_275.setBorder(new TitledBorder(null, "测试间隔(S)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_271.add(panel_275);
|
| | | panel_275.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_TimeCount_st = new JTextField();
|
| | | panel_275.add(tf_TimeCount_st);
|
| | | tf_TimeCount_st.setColumns(10);
|
| | | |
| | | JPanel panel_276 = new JPanel();
|
| | | panel_276.setBorder(new TitledBorder(null, "负载率(%)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_271.add(panel_276);
|
| | | panel_276.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_PowerPercent_st = new JTextField();
|
| | | panel_276.add(tf_PowerPercent_st);
|
| | | tf_PowerPercent_st.setColumns(10);
|
| | | |
| | | JPanel panel_277 = new JPanel();
|
| | | panel_st.add(panel_277,BorderLayout.SOUTH);
|
| | | panel_277.setLayout(new FlowLayout(FlowLayout.CENTER,5,5));
|
| | | |
| | | btn_st_read = new JButton("读取");
|
| | | btn_st_read.setEnabled(false);
|
| | | btn_st_read.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_READ, IAC_ComBase.CMD_TestParam_Addr, ByteBuffer.allocate(0)); |
| | | }
|
| | | });
|
| | | btn_st_read.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_277.add(btn_st_read);
|
| | | |
| | | btn_st_write = new JButton("设置");
|
| | | btn_st_write.setEnabled(false);
|
| | | btn_st_write.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | if(!Comm_ICA.m_TestParamFromDev.is_ReadParam) {
|
| | | JOptionPane.showMessageDialog(null, "请先读取测试参数!");
|
| | | return;
|
| | | }
|
| | | IAC_TestParam tmp_param = new IAC_TestParam();
|
| | | tmp_param.clone(Comm_ICA.m_TestParamFromDev);
|
| | | |
| | | try {
|
| | | tmp_param.STDPower = Float.parseFloat(tf_STDPower_st.getText()); //额定功率负载(0-9999KW)
|
| | | tmp_param.TimeCount = Integer.parseInt(tf_TimeCount_st.getText()); //测试间隔(5-9999S)
|
| | | //tmp_param.ZDPowerCount = Integer.parseInt(tf_PowerCount_bd.getText()); //功率段数(2-5)
|
| | | tmp_param.PowerPercent = Integer.parseInt(tf_PowerPercent_st.getText()); //负载率(0-100%)
|
| | | tmp_param.ParamType = IAC_TestParam.ParamType_Other; //设置参数类型 0-稳态测试 1-其他
|
| | | |
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_MULTY, IAC_ComBase.CMD_SetTestParam_Addr, tmp_param.getByteBuffer());
|
| | | } catch (NumberFormatException e) {
|
| | | JOptionPane.showMessageDialog(null, "请输入合法的测试参数!");
|
| | | return;
|
| | | }
|
| | | }
|
| | | });
|
| | | btn_st_write.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_277.add(btn_st_write);
|
| | | |
| | | btn_st_start = new JButton("启动");
|
| | | btn_st_start.setEnabled(false);
|
| | | btn_st_start.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | 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));
|
| | | panel_277.add(btn_st_start);
|
| | | |
| | | btn_st_pause = new JButton("暂停");
|
| | | btn_st_pause.setEnabled(false);
|
| | | btn_st_pause.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_STTest_Addr, IAC_Cmd.createControlByteBuffer(0x0002&0xFFFF));
|
| | | }
|
| | | });
|
| | | btn_st_pause.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_277.add(btn_st_pause);
|
| | | |
| | | btn_st_stop = new JButton("ֹͣ");
|
| | | btn_st_stop.setEnabled(false);
|
| | | btn_st_stop.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_STTest_Addr, IAC_Cmd.createControlByteBuffer(0x0003&0xFFFF));
|
| | | }
|
| | | });
|
| | | btn_st_stop.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_277.add(btn_st_stop);
|
| | | |
| | | JPanel panel_278= new JPanel();
|
| | | panel_xb.add(panel_278,BorderLayout.NORTH);
|
| | | panel_278.setLayout(new GridLayout(0,4));
|
| | | |
| | | JPanel panel_279 = new JPanel();
|
| | | panel_279.setBorder(new TitledBorder(null, "机房编号", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_278.add(panel_279);
|
| | | panel_279.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_JiFangNum_xb = new JTextField();
|
| | | tf_JiFangNum_xb.setEditable(false);
|
| | | panel_279.add(tf_JiFangNum_xb);
|
| | | tf_JiFangNum_xb.setColumns(10);
|
| | | |
| | | JPanel panel_280 = new JPanel();
|
| | | panel_280.setBorder(new TitledBorder(null, "设备编号", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_278.add(panel_280);
|
| | | panel_280.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_DeviceNum_xb = new JTextField();
|
| | | tf_DeviceNum_xb.setEditable(false);
|
| | | panel_280.add(tf_DeviceNum_xb);
|
| | | tf_DeviceNum_xb.setColumns(10);
|
| | | |
| | | JPanel panel_281 = new JPanel();
|
| | | panel_281.setBorder(new TitledBorder(null, "额定功率(KW)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_278.add(panel_281);
|
| | | panel_281.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_STDPower_xb = new JTextField();
|
| | | panel_281.add(tf_STDPower_xb);
|
| | | tf_STDPower_xb.setColumns(10);
|
| | | |
| | | JPanel panel_282 = new JPanel();
|
| | | panel_282.setBorder(new TitledBorder(null, "负载率(%)", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_278.add(panel_282);
|
| | | panel_282.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_PowerPercent_xb = new JTextField();
|
| | | panel_282.add(tf_PowerPercent_xb);
|
| | | tf_PowerPercent_xb.setColumns(10);
|
| | | |
| | | JPanel panel_283 = new JPanel();
|
| | | panel_xb.add(panel_283,BorderLayout.SOUTH);
|
| | | panel_283.setLayout(new FlowLayout(FlowLayout.CENTER,5,5));
|
| | | |
| | | btn_xb_read = new JButton("读取");
|
| | | btn_xb_read.setEnabled(false);
|
| | | btn_xb_read.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_READ, IAC_ComBase.CMD_TestParam_Addr, ByteBuffer.allocate(0)); |
| | | }
|
| | | });
|
| | | btn_xb_read.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_283.add(btn_xb_read);
|
| | | |
| | | btn_xb_write = new JButton("设置");
|
| | | btn_xb_write.setEnabled(false);
|
| | | btn_xb_write.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | if(!Comm_ICA.m_TestParamFromDev.is_ReadParam) {
|
| | | JOptionPane.showMessageDialog(null, "请先读取测试参数!");
|
| | | return;
|
| | | }
|
| | | IAC_TestParam tmp_param = new IAC_TestParam();
|
| | | tmp_param.clone(Comm_ICA.m_TestParamFromDev);
|
| | | |
| | | try {
|
| | | tmp_param.STDPower = Float.parseFloat(tf_STDPower_xb.getText()); //额定功率负载(0-9999KW)
|
| | | //tmp_param.TimeCount = Integer.parseInt(tf_TimeCount_st.getText()); //测试间隔(5-9999S)
|
| | | //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-其他
|
| | | |
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_MULTY, IAC_ComBase.CMD_SetTestParam_Addr, tmp_param.getByteBuffer());
|
| | | } catch (NumberFormatException e) {
|
| | | JOptionPane.showMessageDialog(null, "请输入合法的测试参数!");
|
| | | return;
|
| | | }
|
| | | }
|
| | | });
|
| | | btn_xb_write.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_283.add(btn_xb_write);
|
| | | |
| | | btn_xb_start = new JButton("启动");
|
| | | btn_xb_start.setEnabled(false);
|
| | | btn_xb_start.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | 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));
|
| | | panel_283.add(btn_xb_start);
|
| | | |
| | | btn_xb_pause = new JButton("暂停");
|
| | | btn_xb_pause.setEnabled(false);
|
| | | btn_xb_pause.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_XBTest_Addr, IAC_Cmd.createControlByteBuffer(0x0002&0xFFFF));
|
| | | }
|
| | | });
|
| | | btn_xb_pause.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_283.add(btn_xb_pause);
|
| | | |
| | | btn_xb_stop = new JButton("ֹͣ");
|
| | | btn_xb_stop.setEnabled(false);
|
| | | btn_xb_stop.addActionListener(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent arg0) {
|
| | | Comm_ICA.setCommCmd(MyModBusRtu.CMD_TYPE_WRITE_STD, IAC_ComBase.CMD_XBTest_Addr, IAC_Cmd.createControlByteBuffer(0x0003&0xFFFF));
|
| | | }
|
| | | });
|
| | | btn_xb_stop.setFont(new Font("宋体", Font.PLAIN, 12));
|
| | | panel_283.add(btn_xb_stop);
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | JPanel panel_190 = new JPanel();
|
| | | panel_190.setBorder(new TitledBorder(null, "操作结果", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
| | | panel_baseinfo.add(panel_190,BorderLayout.SOUTH);
|
| | | panel_190.setLayout(new BorderLayout(0, 0));
|
| | | |
| | | tf_op_inf = new JTextField();
|
| | | panel_190.add(tf_op_inf,BorderLayout.CENTER);
|
| | | |
| | | /********************************************************************/
|
| | | |
| | | |
| | | |
| | | |
| | | }
|
| | | |
| | | public boolean openCommPort(int comm_type, String spname_or_ipaddr, |
| | | int bitrate_or_ipport, int dev_addr, Logger log) {
|
| | | boolean res = false;
|
| | | |
| | | Comm_ICA = new SPCommIAC_600KW(dev_addr, bitrate_or_ipport, panel_debug, log);
|
| | | if(true == Comm_ICA.OpenCommPort(comm_type, spname_or_ipaddr, bitrate_or_ipport)) {
|
| | | Thread spcommThread = new Thread(Comm_ICA);
|
| | | spcommThread.start();
|
| | | |
| | | setButttonState(true);
|
| | | |
| | | |
| | | res = true;
|
| | | }
|
| | | |
| | | return res;
|
| | | }
|
| | | |
| | | public void closeCommPort() {
|
| | | if(null != Comm_ICA) {
|
| | | Comm_ICA.CloseCommPort();
|
| | | Comm_ICA = null;
|
| | | |
| | | |
| | | setButttonState(false);
|
| | | }
|
| | | }
|
| | | |
| | | public void setButttonState(boolean state) {
|
| | | btn_wt_read.setEnabled(state); //读取
|
| | | btn_wt_write.setEnabled(state); //设置
|
| | | btn_wt_start.setEnabled(state); //启动
|
| | | btn_wt_pause.setEnabled(state); //暂停
|
| | | btn_wt_stop.setEnabled(state); //ֹͣ
|
| | |
|
| | | btn_zd_read.setEnabled(state); //读取
|
| | | btn_zd_write.setEnabled(state); //设置
|
| | | btn_zd_start.setEnabled(state); //启动
|
| | | btn_zd_pause.setEnabled(state); //暂停
|
| | | btn_zd_stop.setEnabled(state); //ֹͣ
|
| | |
|
| | | btn_bd_read.setEnabled(state); //读取
|
| | | btn_bd_write.setEnabled(state); //设置
|
| | | btn_bd_start.setEnabled(state); //启动
|
| | | btn_bd_pause.setEnabled(state); //暂停
|
| | | btn_bd_stop.setEnabled(state); //ֹͣ
|
| | |
|
| | | btn_st_read.setEnabled(state); //读取
|
| | | btn_st_write.setEnabled(state); //设置
|
| | | btn_st_start.setEnabled(state); //启动
|
| | | btn_st_pause.setEnabled(state); //暂停
|
| | | btn_st_stop.setEnabled(state); //ֹͣ
|
| | |
|
| | | btn_xb_read.setEnabled(state); //读取
|
| | | btn_xb_write.setEnabled(state); //设置
|
| | | btn_xb_start.setEnabled(state); //启动
|
| | | btn_xb_pause.setEnabled(state); //暂停
|
| | | btn_xb_stop.setEnabled(state); //ֹͣ
|
| | | }
|
| | | |
| | | /**
|
| | | * |
| | | */
|
| | | public void updateData() {
|
| | | if(null != Comm_ICA) {
|
| | | if(null != Comm_ICA.m_RealData) {
|
| | | IAC_RealData tmp_real = Comm_ICA.m_RealData;
|
| | | |
| | | tf_Ua.setText(String.format("%1.1f", tmp_real.getUa()));
|
| | | tf_Ub.setText(String.format("%1.1f", tmp_real.getUb()));
|
| | | tf_Uc.setText(String.format("%1.1f", tmp_real.getUc()));
|
| | | |
| | | tf_Uab.setText(String.format("%1.1f", tmp_real.getUab()));
|
| | | tf_Ubc.setText(String.format("%1.1f", tmp_real.getUbc()));
|
| | | tf_Uca.setText(String.format("%1.1f", tmp_real.getUca()));
|
| | |
|
| | | tf_Ia.setText(String.format("%1.1f", tmp_real.getIa()));
|
| | | tf_Ib.setText(String.format("%1.1f", tmp_real.getIb()));
|
| | | tf_Ic.setText(String.format("%1.1f", tmp_real.getIc()));
|
| | |
|
| | | tf_Fre.setText(String.format("%1.1f", tmp_real.getFre()));
|
| | | tf_Ft.setText(String.format("%1.3f", tmp_real.getFT()));
|
| | |
|
| | | tf_FTa.setText(String.format("%1.3f", tmp_real.getFTa()));
|
| | | tf_FTb.setText(String.format("%1.3f", tmp_real.getFTb()));
|
| | | tf_FTc.setText(String.format("%1.3f", tmp_real.getFTc()));
|
| | |
|
| | | tf_Pa.setText(String.format("%1.1f", tmp_real.getPa()));
|
| | | tf_Pb.setText(String.format("%1.1f", tmp_real.getPb()));
|
| | | tf_Pc.setText(String.format("%1.1f", tmp_real.getPc()));
|
| | |
|
| | | tf_P.setText(String.format("%1.1f", tmp_real.getP()));
|
| | |
|
| | | tf_Qa.setText(String.format("%1.1f", tmp_real.getQa()));
|
| | | tf_Qb.setText(String.format("%1.1f", tmp_real.getQb()));
|
| | | tf_Qc.setText(String.format("%1.1f", tmp_real.getQc()));
|
| | |
|
| | | tf_Q.setText(String.format("%1.1f", tmp_real.getQ()));
|
| | |
|
| | | tf_Sa.setText(String.format("%1.1f", tmp_real.getSa()));
|
| | | tf_Sb.setText(String.format("%1.1f", tmp_real.getSb()));
|
| | | tf_Sc.setText(String.format("%1.1f", tmp_real.getSc()));
|
| | | tf_S.setText(String.format("%1.1f", tmp_real.getS()));
|
| | |
|
| | | tf_Ep.setText(String.format("%1.1f", tmp_real.getEp()));
|
| | | tf_PHv.setText(String.format("%1.0f", tmp_real.getPHv()));
|
| | | tf_PHa.setText(String.format("%1.0f", tmp_real.getPHa()));
|
| | | |
| | | tf_JbxbUa.setText(String.format("%1.1f", tmp_real.getJBXBUa()));
|
| | | tf_JbxbUb.setText(String.format("%1.1f", tmp_real.getJBXBUb()));
|
| | | tf_JbxbUc.setText(String.format("%1.1f", tmp_real.getJBXBUc()));
|
| | |
|
| | | tf_JbxbIa.setText(String.format("%1.1f", tmp_real.getJBXBIa()));
|
| | | tf_JbxbIb.setText(String.format("%1.1f", tmp_real.getJBXBIb()));
|
| | | tf_JbxbIc.setText(String.format("%1.1f", tmp_real.getJBXBIc()));
|
| | |
|
| | | SysWorkState.setText(String.format("%s", tmp_real.getSysWorkStateStr()));
|
| | | |
| | | |
| | | |
| | | tf_op_inf.setText(String.format("%s",Comm_ICA.op_result));
|
| | | }
|
| | | |
| | | if(IAC_ComBase.CMD_GetParam_Ack == Comm_ICA.dt_cmd_ack) {
|
| | | IAC_TestParam param = Comm_ICA.m_TestParamFromDev;
|
| | | |
| | | this.tf_JiFangNum_wt.setText(String.format("%d",param.JiFangNum)); //机房编号 |
| | | this.tf_DeviceNum_wt.setText(String.format("%d",param.DeviceNum)); //设备编号 |
| | | this.tf_PowerCount_wt.setText(String.format("%d",param.WTPowerCount)); //功率段数 |
| | | this.tf_VolLowLimit_wt.setText(String.format("%d",param.VolLowLimit)); //电压下限
|
| | | this.tf_Power1_wt.setText(String.format("%d",param.Power1[0])); //功率1
|
| | | this.tf_Power2_wt.setText(String.format("%d",param.Power1[1])); //功率2
|
| | | this.tf_Power3_wt.setText(String.format("%d",param.Power1[2])); //功率3
|
| | | this.tf_Power4_wt.setText(String.format("%d",param.Power1[3])); //功率4
|
| | | this.tf_Power5_wt.setText(String.format("%d",param.Power1[4])); //功率5
|
| | | this.tf_Power6_wt.setText(String.format("%d",param.Power1[5])); //功率6
|
| | | this.tf_Power7_wt.setText(String.format("%d",param.Power1[6])); //功率7
|
| | | this.tf_Power8_wt.setText(String.format("%d",param.Power1[7])); //功率8
|
| | | this.tf_Power9_wt.setText(String.format("%d",param.Power1[8])); //功率9
|
| | | this.tf_Power10_wt.setText(String.format("%d",param.Power1[9])); //功率10
|
| | | this.tf_CurrHigh_wt.setText(String.format("%1.0f",param.CurrHigh)); //电流上限
|
| | | this.tf_VolHigh_wt.setText(String.format("%1.0f",param.VolHigh)); //电压上限
|
| | | this.tf_TestTime1_wt.setText(String.format("%d",param.TestTime[0])); //测试时间1
|
| | | this.tf_TestTime2_wt.setText(String.format("%d",param.TestTime[1])); //测试时间2
|
| | | this.tf_TestTime3_wt.setText(String.format("%d",param.TestTime[2])); //测试时间3
|
| | | this.tf_TestTime4_wt.setText(String.format("%d",param.TestTime[3])); //测试时间4
|
| | | this.tf_TestTime5_wt.setText(String.format("%d",param.TestTime[4])); //测试时间5
|
| | | this.tf_TestTime6_wt.setText(String.format("%d",param.TestTime[5])); //测试时间6
|
| | | this.tf_TestTime7_wt.setText(String.format("%d",param.TestTime[6])); //测试时间7
|
| | | this.tf_TestTime8_wt.setText(String.format("%d",param.TestTime[7])); //测试时间8
|
| | | this.tf_TestTime9_wt.setText(String.format("%d",param.TestTime[8])); //测试时间9
|
| | | this.tf_TestTime10_wt.setText(String.format("%d",param.TestTime[9])); //测试时间10
|
| | |
|
| | |
|
| | | this.tf_JiFangNum_zd.setText(String.format("%d",param.JiFangNum)); //机房编号 |
| | | this.tf_DeviceNum_zd.setText(String.format("%d",param.DeviceNum)); //设备编号 |
| | | this.tf_STDPower_zd.setText(String.format("%1.0f",param.STDPower)); //额定功率 |
| | | this.tf_TimeCount_zd.setText(String.format("%d",param.TimeCount)); //测试间隔 |
| | | this.tf_PowerCount_zd.setText(String.format("%d",param.ZDPowerCount)); //负载段数 |
| | |
|
| | |
|
| | | this.tf_JiFangNum_bd.setText(String.format("%d",param.JiFangNum)); //机房编号 |
| | | this.tf_DeviceNum_bd.setText(String.format("%d",param.DeviceNum)); //设备编号 |
| | | this.tf_STDPower_bd.setText(String.format("%1.0f",param.STDPower)); //额定功率 |
| | | this.tf_TimeCount_bd.setText(String.format("%d",param.TimeCount)); //测试间隔 |
| | | this.tf_PowerCount_bd.setText(String.format("%d",param.ZDPowerCount)); //负载段数
|
| | |
|
| | | this.tf_JiFangNum_st.setText(String.format("%d",param.JiFangNum)); //机房编号 |
| | | this.tf_DeviceNum_st.setText(String.format("%d",param.DeviceNum)); //设备编号 |
| | | this.tf_STDPower_st.setText(String.format("%1.0f",param.STDPower)); //额定功率 |
| | | this.tf_TimeCount_st.setText(String.format("%d",param.TimeCount)); //测试间隔 |
| | | this.tf_PowerPercent_st.setText(String.format("%d",param.PowerPercent)); //负载率
|
| | |
|
| | |
|
| | | this.tf_JiFangNum_xb.setText(String.format("%d",param.JiFangNum)); //机房编号 |
| | | this.tf_DeviceNum_xb.setText(String.format("%d",param.DeviceNum)); //设备编号 |
| | | this.tf_STDPower_xb.setText(String.format("%1.0f",param.STDPower)); //额定功率 |
| | | this.tf_PowerPercent_xb.setText(String.format("%d",param.PowerPercent)); //负载率
|
| | |
|
| | | Comm_ICA.dt_cmd_ack = IAC_ComBase.CMD_Null;
|
| | | }
|
| | | |
| | | |
| | | }
|
| | | }
|
| | | } |