DELL
2024-11-18 2b310347b6f5092dcd0d6fddbdf614b138314974
iac600kw调试工具修改
37个文件已修改
5个文件已添加
390 ■■■■ 已修改文件
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/IAC_Cmd.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/IAC_ComBase.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/IAC_RealData.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/SPCommIAC_600KW.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$1.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$10.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$11.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$12.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$13.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$14.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$15.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$16.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$17.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$18.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$19.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$2.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$20.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$21.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$22.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$23.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$24.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$25.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$26.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$27.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$28.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$29.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$3.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$30.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$4.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$5.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$6.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$7.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$8.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$9.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/modbus/MyModBusRtu.class 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/src/com/dev/ica_600kw/IAC_Cmd.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/src/com/dev/ica_600kw/IAC_ComBase.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/src/com/dev/ica_600kw/IAC_RealData.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/src/com/dev/ica_600kw/SPCommIAC_600KW.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/src/com/dev/ica_600kw/iac_600kw_page.java 290 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/src/com/dev/modbus/MyModBusRtu.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/IAC_Cmd.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/IAC_ComBase.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/IAC_RealData.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/SPCommIAC_600KW.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$1.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$10.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$11.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$12.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$13.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$14.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$15.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$16.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$17.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$18.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$19.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$2.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$20.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$21.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$22.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$23.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$24.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$25.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$26.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$27.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$28.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$29.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$3.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$30.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$4.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$5.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$6.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$7.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$8.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page$9.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/ica_600kw/iac_600kw_page.class
Binary files differ
Device_Simulator_DTS_Tester/bin/com/dev/modbus/MyModBusRtu.class
Binary files differ
Device_Simulator_DTS_Tester/src/com/dev/ica_600kw/IAC_Cmd.java
@@ -30,4 +30,22 @@
        buffer.flip();
        return buffer;
    }
    public static void main(String[] args) {
//        ByteBuffer bf = ByteBuffer.allocate(2);
//        bf.putShort((short)24);
//        bf.flip();
//        ByteBuffer bf1 = ByteBuffer.allocate(bf.capacity());
//        bf1.put(bf);
//
//        bf.position(0);
//        bf1.position(0);
//        System.out.println(bf.getShort());
//        System.out.println(bf1.getShort());
        float ff = 1.0f;
        int d = 1;
        System.out.println((ff==d));
    }
}
Device_Simulator_DTS_Tester/src/com/dev/ica_600kw/IAC_ComBase.java
@@ -9,6 +9,14 @@
    public static final int CMD_Success                        = 0x0001;        //成功
    
    public static final int CMD_Control_Start                = 0x0001;        //启动
    public static final int CMD_Control_Pause                = 0x0002;        //暂停
    public static final int CMD_Control_Stop                = 0x0003;        //ֹͣ
    public static final int CMD_GetParam_Ack                = 0x48;            //成功
    
    public static final int CMD_RealData_Addr                = 0x1000;        //实时数据
Device_Simulator_DTS_Tester/src/com/dev/ica_600kw/IAC_RealData.java
@@ -6,6 +6,15 @@
public class IAC_RealData {
    
    public static final int PageType_Home        =        0;        //首页
    public static final int PageType_WTtest        =        1;        //稳态测试
    public static final int PageType_ZDtest        =        2;        //整定测试
    public static final int PageType_STtest        =        3;        //瞬态测试
    public static final int PageType_BDtest        =        4;        //波动测试
    public static final int PageType_XBtest        =        5;        //谐波测试
    public static final int PageType_SysParam    =        6;        //系统设置
    public static final int Stopped        =        0;
    public static final int WTtesting   =        1;
    public static final int WTPause     =        2;
@@ -18,7 +27,7 @@
    public static final int XBtesting   =        9;
    public static final int XBPause     =        10;
    
    public static final int REG_Count = 39;        //寄存器数量
    public static final int REG_Count = 40;        //寄存器数量
    
    private float Ua;            //a相电压(0.1V)
    private float Ub;            //b相电压(0.1V)
@@ -60,6 +69,7 @@
    private int GBTestMode;        //相数模式(1-单相  3-三相)
    private int SlaveNum;        //从机数量
    private int PageType;        //当前界面0-首页  1-稳态测试     2-整定测试      3-瞬态测试     4-波动测试    5-谐波测试    6-系统设置
    
    public boolean putByteBuffer(ByteBuffer bbf_rx) {
        if(bbf_rx.limit() < REG_Count*2) {
@@ -107,6 +117,7 @@
    
        this.GBTestMode = FBS9100_ComBase.changeShortToInt(bbf_rx.getShort());        //相数模式(1-单相  3-三相)
        this.SlaveNum = FBS9100_ComBase.changeShortToInt(bbf_rx.getShort());        //从机数量
        this.PageType = FBS9100_ComBase.changeShortToInt(bbf_rx.getShort());        //当前界面0-首页  1-稳态测试     2-整定测试      3-瞬态测试     4-波动测试    5-谐波测试    6-系统设置
        
        return true;
    }
@@ -155,12 +166,52 @@
        return work_str;
    }
    
    public String getPageTypeStr() {
        String work_str = "δ֪-"+this.PageType;
        switch (this.PageType) {
        case PageType_Home:
            work_str = "首页";
            break;
        case PageType_WTtest:
            work_str = "稳态测试";
            break;
        case PageType_ZDtest:
            work_str = "整定测试";
            break;
        case PageType_STtest:
            work_str = "瞬态测试";
            break;
        case PageType_BDtest:
            work_str = "波动测试";
            break;
        case PageType_XBtest:
            work_str = "谐波测试";
            break;
        case PageType_SysParam:
            work_str = "系统设置";
            break;
        default:
            work_str = "δ֪-"+this.PageType;
            break;
        }
        return work_str;
    }
    public int getPageType() {
        return PageType;
    }
    public void setPageType(int pageType) {
        PageType = pageType;
    }
    public String getAlmStateStr() {
        String alm_str = "δ֪-"+this.AlmState;
        switch (this.AlmState) {
        case 0:    alm_str = "暂停";break;
        case 1:    alm_str = "稳态";break;
        case 2:    alm_str = "暂停";break;
        case 1:    alm_str = "暂停";break;
        case 2:    alm_str = "稳态";break;
        case 3:    alm_str = "整定";break;
        case 4:    alm_str = "波动";break;
        case 5:    alm_str = "˲̬";break;
Device_Simulator_DTS_Tester/src/com/dev/ica_600kw/SPCommIAC_600KW.java
@@ -278,6 +278,9 @@
        ) {
            //单点写入
            CommTxBuffer.put(bf);
            bf.position(0);
            rtu.write_value = FBS9100_ComBase.changeShortToInt(bf.getShort());
        } else if(rtu.Cmd == MyModBusRtu.CMD_TYPE_WRITE_MULTY) {
            //多点写入
            CommTxBuffer.putShort((short)rtu.reg_count);
@@ -418,6 +421,16 @@
                        //op_result = "退出界面失败-" + Com.get_DTF(new Date(), Com.DTF_YMDhms);
                    }
                }
//                if((rtu_rt.write_value == IAC_ComBase.CMD_Control_Stop)
//                    && ((dt_cmd_ack == IAC_ComBase.CMD_WTTest_Success_Ack)
//                        || (dt_cmd_ack == IAC_ComBase.CMD_ZDTest_Success_Ack)
//                        || (dt_cmd_ack == IAC_ComBase.CMD_BDTest_Success_Ack)
//                        || (dt_cmd_ack == IAC_ComBase.CMD_STTest_Success_Ack)
//                        || (dt_cmd_ack == IAC_ComBase.CMD_XBTest_Success_Ack)
//                        ) ) {
//                    //停止测试成功后需要发送退出界面
//                    is_ClosePage = false;
//                }
                
            }else if(MyModBusRtu.CMD_TYPE_WRITE_MULTY == rtu_rx.Cmd) {
                if(IAC_ComBase.CMD_SetTestParam_Addr == rtu_rx.reg_addr) {
Device_Simulator_DTS_Tester/src/com/dev/ica_600kw/iac_600kw_page.java
@@ -104,6 +104,7 @@
    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;            //设备编号    
@@ -137,6 +138,7 @@
    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;            //设备编号    
@@ -149,6 +151,7 @@
    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;            //设备编号    
@@ -161,6 +164,7 @@
    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;            //设备编号    
@@ -173,6 +177,7 @@
    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;            //设备编号    
@@ -184,6 +189,7 @@
    private JButton btn_xb_start;                //启动
    private JButton btn_xb_pause;                //暂停
    private JButton btn_xb_stop;                //ֹͣ
    private JButton btn_xb_exit;                //退出
    
    
    
@@ -594,10 +600,7 @@
        
        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));
@@ -606,10 +609,16 @@
        
        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();        
@@ -687,7 +696,7 @@
        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);
        
@@ -712,7 +721,7 @@
        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));
        
@@ -732,7 +741,7 @@
        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));
        
@@ -752,7 +761,7 @@
        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));
        
@@ -772,7 +781,7 @@
        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));
        
@@ -792,7 +801,7 @@
        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));
        
@@ -812,7 +821,7 @@
        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));
        
@@ -832,7 +841,7 @@
        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));
        
@@ -852,7 +861,7 @@
        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));
        
@@ -872,7 +881,7 @@
        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));
        
@@ -892,7 +901,7 @@
        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));
        
@@ -955,22 +964,6 @@
                    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()) {
@@ -985,6 +978,30 @@
                            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;
@@ -1084,7 +1101,24 @@
                    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));
@@ -1109,6 +1143,16 @@
        });
        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);
@@ -1209,15 +1253,15 @@
                    }
                    
                    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());
@@ -1238,7 +1282,26 @@
                    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));
@@ -1263,6 +1326,16 @@
        });
        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);
@@ -1370,8 +1443,8 @@
                        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;
                    }
                    
@@ -1393,7 +1466,26 @@
                    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));
@@ -1418,6 +1510,16 @@
        });
        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);
@@ -1521,8 +1623,8 @@
                        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) {
@@ -1548,7 +1650,26 @@
                    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));
@@ -1573,6 +1694,16 @@
        });
        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);
@@ -1690,7 +1821,25 @@
                    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));
@@ -1716,7 +1865,15 @@
        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);
        
        
        
@@ -1793,6 +1950,12 @@
        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);
    }
    
    /**
@@ -1856,8 +2019,8 @@
                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));
                
@@ -1865,14 +2028,15 @@
                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);                //ֹͣ
@@ -1952,17 +2116,17 @@
                }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);                //ֹͣ
                }
            }
            
Device_Simulator_DTS_Tester/src/com/dev/modbus/MyModBusRtu.java
@@ -28,6 +28,8 @@
    
    public int crc;                //crc校验
    
    public int write_value;        //单点写入时的数值
    public MyModBusRtu() {
        
    }