Administrator
2022-02-28 64659e3795b4f7cbafb2eaca8fd3831485035d71
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.dev.fg;
 
public class FBS9600_ComBase {
    
    
    public static final int CMD_SysState_Addr = 0x0000;                //系统信息寄存器地址
    public static final int CMD_SysInfo_Addr =     0x0001;                //用于判断当前设备编号
    public static final int CMD_MonVol_Addr   = 0x0100;                //单体电压寄存器地址
    public static final int CMD_MonRes_Addr   = 0x0200;                //单体内阻寄存器地址
    public static final int CMD_MonTmp_Addr   = 0x0300;                //单体温度寄存器地址
    
    public static final int CMD_ResTest_Addr  = 0x00FF;                //内阻测试寄存器地址
    
    
    
    public static final int CMD_READ_COIL_STATUS         = 0x01;        //读取线圈状态
    public static final int CMD_READ_INPUT_STATUS         = 0x02;        //读取离散输入状态
    public static final int CMD_READ_HOLDING_REGISTER     = 0x03;        //读保持寄存器
    public static final int CMD_READ_INPUT_REGISTER     = 0x04;        //读输入寄存器
    public static final int CMD_WRITE_SINGLE_COIL         = 0x05;     //写线圈
    
    public static final int CMD_WRITE_SINGLE_REGISTER     = 0x06;        //写单个保持寄存器
    public static final int CMD_WRITE_MULTIPLE_COIL     = 0x0F;        //写多个线圈
    public static final int CMD_WRITE_MULTIPLE_REGISTER = 0x10;        //写多个保持寄存器
    
    
    public static final int     CMD_Start                        =    0x51;
    public static final int     CMD_StartAck                    =    0x52;
    public static final int     CMD_Stop                        =    0x53;
    public static final int     CMD_StopAck                        =    0x54;
    
}