/************************************************************/
/*  Reversion information of I/O library for I-8000         */
/*                                                          */
/************************************************************/
1.7.0 [2021/06/30] by Mac
    Support I-87026W, I-8026W, I-87084W
    New feature:Support moving average of I-8014W, I-8017HW, I-8017HCW, I-8026W.
                You can set the fifo number 5~50 to acvtive moving average in Modbus Utility.
                The process will remove the highest and lowest values, and then caculate the average.
    New feature:Support duty setting of I-8088W
	========== Relative information ==========
    Modbus Utility: 1.8.5 2021/06/30 (must be updated to match this firmware)
------------------------------------------------------------------------
1.6.7 [2017/11/09] by Mac
		New feature: Modbus Utility can monitor the IO scan time. It shows current, max and min value.
		Support I-87028VW-20V, I-87005W, I-87024CW, I-8088W, I-87016W
		Fix bug:Timeout value is too short for request AI module. It cause AI module showing off-line.
		========== Relative information ==========
    Modbus Utility: 1.8.4 2017/11/10 (must be updated to match this firmware)
------------------------------------------------------------------------
1.6.4 [2013/08/12] by Mac
		Support I-8093W, I-8084W for iP-8000
		Support iP-8000-MRTU
		Fix Bug
				Correct I-87042 DI value
		========== Relative information ==========
    Modbus Utility: 1.8.0 2013/08/06(must be updated to match this firmware)
------------------------------------------------------------------------
1.6.3 [2012/10/17] by Mac
    Fix Bug:
        1.Support Ch16~Ch31 DI counter enabled setting. In earlier version,
          you can set Ch0~Ch15 only.
        2.Add 0x0D (-20mA~+20mA) type of 87019, 87019Z.
        3.Correct 8050's maximum DI number from 8 to 16.
     ========== Relative information ==========
    Modbus Utility: 1.7.3 2012/10/15(must be updated to match this firmware)
------------------------------------------------------------------------   
1.6.2 [2012/06/08] by Mac
		Support ET-87Pn
		Support 8046W,87015PW,87016W,87017W-A5,87017RW87017RCW,87017DW,
            87017DW-SE,87018RW,87018PW,87019PW,87037W,87040PW,87042W,
            87053PW,87053W-A5,87053W-E5,87057PW,87059W,87069W
            8017DW,8017HCW,I-87024DW,I-87024RW,I-8050W modules.
    ========== Relative information ==========
    Modbus Utility: 1.7.2 2012/06/27(must be updated to match this firmware)      
------------------------------------------------------------------------
1.6.1 [2012/02/23] by Mac
		Support 87017RCW
------------------------------------------------------------------------
1.6.0 [2012/01/03] by Mac
    Support iPAC-8000
    Support 87017Z, 87018Z, 87019Z, 8084W, 87028, 87061
    ========== Relative information ==========
    Modbus Utility: Ver 1.7.2 (must be updated to match this firmware)
    
    MiniOS7 image file: 
	      I-8000 (40M CPU) (Updated)
            2.02 build 013, Jun 17 2011
            CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8000_UDP-20110125.img
        I-8000 (80M CPU) (Updated)
            2.02 build 013, Jun 25 2011
            CD:\Napdos\Modbus\8000e\OS_Image\For_80M\C836_UDP-20110117.img
        iP-8000 (80M CPU)(New support)
            2.04 build 014, Sep 21 2011
            CD:\Napdos\Modbus\iP8000\OS_Image\C837_2M_UDP-20110921.img    
------------------------------------------------------------------------
1.5.7 [14,Sep,2007] by Mac
    Support 87019  
    Support Auto Configuration
        You can remove the damaged module after power off, and plug a same one.
	The 8000 MCU will configure the module automatically when it power on.
    ========== Relative information ==========
    Modbus Utility: Ver 1.7.0 (must be updated to match this firmware)
    
    MiniOS7 image file: 
	      8000 (40M CPU) (Updated)
            2.02 build 006, Jun 25 2007
            CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8000_UDP_20070625.img
        8000 (80M CPU) (Updated)
            2.02 build 006, Jun 25 2007
            CD:\Napdos\Modbus\8000e\OS_Image\For_80M\C836_UDP-20070625.img

------------------------------------------------------------------------
1.5.6 [19,Mar,2007] by Kevin
    Support 87022, 87026  
    
    ========== Relative information ==========
    Modbus Utility: Ver 1.6.9  (must be updated to match this firmware)
    
    MiniOS7 image file: 
      For 40M CPU (Ethernet version) (Updated)
          2.02 build 002, Mar 12 2007
          CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8000_UDP_20070312.img
      For 80M CPU (Ethernet version) (Updated)
          2.02 build 002, Mar 12 2007
          CD:\Napdos\Modbus\8000e\OS_Image\For_80M\C836-UDP_20070312.img
              
------------------------------------------------------------------------    
1.5.5 [28,Aug,2006] by Kevin   
    1. Fix bug 0f 8090
        Its counter values are put to wrong AI registers.
    
    2. Fix bug of 87K 16 bit DO module
        DO module doesn't work correctly. Its status is always offline.     
    
    3. Fix bug of configure input range code of I-87013,17,18.
        After booting, the input range back to old setting even the 
        cofiguring is done by Modbus Utility.
        This bug exists from version 1.5.0 ~ 1.5.4.
        
    4. Support power on value for AO and DO modules
        AO and DO modules go to their preset power on value when power on.
        
    5. Support safe value for AO and DO modules
        When the I-8000 controller loses modbus communication between PC
        more than the WDT (Watch Dog Timer) value, all AO and DO modules 
        go to their preset safe value.
        
        The WDT is default as 0 (disabled). When it is set to >5 second,
        the safe value scheme enabled. 
        
    6. Read/Write modbus AO and DO registers can configure the power on value
       and safe value.
        
       [DO register]
          Address(Hex) (Decimal) Description 
          --------------------------------------------------------
          iTotal_DINum ~ 315     Reserved for user
          --------------------------------------------------------       
          0x140-4       316      Write DO power on value to EEPROM
          0x140-3       317      Write DO safe value to EEPROM
          0x140-2       318      Write AO power on value to EEPROM
          0x140-1       319      Write AO safe value to EEPROM
          --------------------------------------------------------
          0x140~0x15F   320~351  DO Power On Value [slot0]
          0x160~0x17F   352~383  DO Power On Value [slot1]
          0x180~0x19F   384~415  DO Power On Value [slot2]
          0x1A0~0x1BF   416~447  DO Power On Value [slot3]
          0x1C0~0x1DF   448~479  DO Power On Value [slot4]
          0x1E0~0x1FF   480~511  DO Power On Value [slot5]
          0x200~0x21F   512~543  DO Power On Value [slot6]
          0x220~0x23F   544~575  DO Power On Value [slot7]
          --------------------------------------------------------
          0x240~0x25F   576~607  DO Safe Value [slot0]
          0x260~0x27F   608~639  DO Safe Value [slot1]
          0x280~0x29F   640~671  DO Safe Value [slot2]
          0x2A0~0x2BF   672~703  DO Safe Value [slot3]
          0x2C0~0x2DF   704~735  DO Safe Value [slot4]
          0x2E0~0x2FF   736~767  DO Safe Value [slot5]
          0x300~0x31F   768~799  DO Safe Value [slot6]
          0x320~0x33F   800~831  DO Safe Value [slot7]
        
       [AO register]
          Address(Hex) (Decimal) Description 
          --------------------------------------------------------
          iTotal_AONum ~ 315     Reserved for user
          --------------------------------------------------------       
          0x140-4       316      CPU reset status
                                    1: by Power on
                                    2: by 0.8 second WDT
          0x140-3       317      CPU reset events 
                                    1. Saved in EEPROM
                                    2. Can be reset
          0x140-2       318      Set host WDT value (for safe value) 
                                    1. Saved in EEPROM
                                    2. 6~65535 (second) =enabled
                                    3. <=5 (second) =disabled
                                    4. defalut=0
          0x140-1       319      Events of Safe value
          --------------------------------------------------------
          0x140~0x147   320~327  AO Power On Value [slot0]
          0x148~0x14F   328~335  AO Power On Value [slot1]
          0x150~0x157   336~343  AO Power On Value [slot2]
          0x158~0x15F   344~351  AO Power On Value [slot3]
          0x160~0x167   352~359  AO Power On Value [slot4]
          0x168~0x16F   360~367  AO Power On Value [slot5]
          0x170~0x177   368~375  AO Power On Value [slot6]
          0x178~0x17F   376~383  AO Power On Value [slot7]
          --------------------------------------------------------
          0x180~0x187   384~391  AO Safe Value [slot0]
          0x188~0x18F   392~399  AO Safe Value [slot1]
          0x190~0x197   400~407  AO Safe Value [slot2]
          0x198~0x19F   408~415  AO Safe Value [slot3]
          0x1A0~0x1A7   416~423  AO Safe Value [slot4]
          0x1A8~0x1AF   424~431  AO Safe Value [slot5]
          0x1B0~0x1B7   432~439  AO Safe Value [slot6]
          0x1B8~0x1BF   440~447  AO Safe Value [slot7]
    
    7. Change LED status
        L2 flash = Config in CPU doesn't match module plug in slot
        L3 flash = Safe value of AO and DO modules are actived
        
    8. Improve performance of UpdateIOModule
        In Version 1.1.5 [23,Jun,2003], the function checks Ethernet
        service 4 times then updates one slot. That makes I/O update 
        performance is not good.
        
        In this version, it is changed to check Ethernet service 2 times
        then updates one slot, and skips empty slot.
    
    === For programming ===
    IO_155.lib must be used with mbt8_167.lib or later version.
    
        
    ========== Relative information ==========
    Modbus Utility: Ver 1.6.8  (must be updated to match this firmware)
    
    MiniOS7 image file: 
      For 40M CPU
          2.00 build 004, Sep 02 2005
          CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8K050902.img
      For 80M CPU (Ethernet version)
          2.01 build 000, Nov 03 2005
          CD:\Napdos\Modbus\8000e\OS_Image\For_80M\8000E-80-20051103.img        
------------------------------------------------------------------------
1.5.4 [20,Jul,2006] by Kevin         
    Fix bug of 87K DI counter enable/disable status
        87K DI counter is defaut as 0 (disabled).
        
        Version 1.5.3 doesn't give corrcet status (disabled) to it.
        when you first time run the controller and press "Refresh" button 
        of Modbus Utility.
        
        Once you ever set the 87K DI counter status,
        the problem disappears and works as you set.
        So, even you don't update the library, it is no problem.

    ========== Relative information ==========
    Modbus Utility: Ver 1.6.7  (must be updated to match this firmware)
    
    MiniOS7 image file: 
      For 40M CPU
          2.00 build 004, Sep 02 2005
          CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8K050902.img
      For 80M CPU (Ethernet version)
          2.01 build 000, Nov 03 2005
          CD:\Napdos\Modbus\8000e\OS_Image\For_80M\8000E-80-20051103.img
------------------------------------------------------------------------        
Version 1.5.3 [11,Jul,2006] by Kevin
    1. Fix bug of 8080
        When change channel mode, the Modbus Utility can update 
        register mapping address. But the firmware doesn't update
        the register mapping address.
        
    2. Fix bug of 8 bit 87KDI module
        Cann't get DI value and module status is always off-line.
        
    3. Fix bug of 8KDIO module
        DI is correct but DO is not corrcet.
        
    4. Fix bug of AI/AO offset value
        After changing slot of AI, AO module, the offset values becomes
        +10000 or -10000.
        The offset value should be 0.
        
    ========== Relative information ==========
    Same as version 1.5.2

------------------------------------------------------------------------
Version 1.5.2 [22,Jun,2006] by Kevin
    Support 87015, 87046.
    
    MBT8_150.lib becomes two files ==> MBT8_166.lib and IO_152.lib
        MBT8_nnn.Lib takes care Modbus communication.
        IO_nnn.Lib takes care I/O scan kernel.
    
    ========== Relative information ==========
    Modbus Utility: Ver 1.5.1  (must be updated to match this firmware)
    
    MiniOS7 image file: 
      For 40M CPU
          2.00 build 004, Sep 02 2005
          CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8K050902.img
      For 80M CPU (Ethernet version)
          2.01 build 000, Nov 03 2005
          CD:\Napdos\Modbus\8000e\OS_Image\For_80M\8000E-80-20051103.img 
------------------------------------------------------------------------
Version 1.5.0 [05,May,2006] by Kevin
    Fix bug
        Cann't find module even click "Refersh" butom in Modbus Utility.
        
Version 1.5.0 [23,Mar,2006] by Kevin
    Support 
        1. Low speed counter (100Hz) of 87K DI module.
        2. 16 Channel reading of 8017HS single-end mode
    
    Update 8024 Lib
        solve problem that 8024 outputs -10V at begining.     
        
    New function    
        Auto configuring
            When replaceing a module with another one (with same 
            module ID number), the configuration will be keep the same
            as the data stored on the CPU module.
            
            If the I/O modules are different to the confiuration 
            on the CPU, the L2 and L3 will flah.
            You have to run the Modbus Utility to refresh the 
            configuration on the CPU.
            
            This is helpful when replacing a damaged module, the worker
            doesn't need a PC to run Modbus Utility to configure the  
            new module again.
            
    ========== Relative information ==========
    Modbus Utility: Ver 1.5.0  (must be updated to match this firmware)
    
    MiniOS7 image file: 
      For 40M CPU
          2.00 build 004, Sep 02 2005
          CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8K050902.img
      For 80M CPU (Ethernet version)
          2.01 build 000, Nov 03 2005
          CD:\Napdos\Modbus\8000e\OS_Image\For_80M\8000E-80-20051103.img 
                     
------------------------------------------------------------------------
Version 1.4.0 [10,Jan,2006] by Kevin

    Update 8017H lib:
        Version 1.0.4 fixes the wrong value when signal source is close
        to the full range. 
        For example, the problem likes: input 10.1 V, get 9.81 V.
    
    ===== For programming =====
    Correct ModbusRTU_Master2Slave:
        Before, always return 0 (No Error).
        Now, return the right code of the result. 
        For example: timeout, CRC check error, ....
        
    ========== Relative information ==========
    Modbus Utility: Ver 1.3.3
    
    MiniOS7 image file: 
      For 40M CPU
          2.00 build 004, Sep 02 2005
          CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8K050902.img
      For 80M CPU (Ethernet version)
          2.01 build 000, Nov 03 2005
          CD:\Napdos\Modbus\8000e\OS_Image\For_80M\8000E-80-20051103.img
            
------------------------------------------------------------------------
Version 1.3.9 [14,Nov,2005] by Kevin
    When COM3 be the UpLink Port and several Modbus/RTU devices are
    on the same RS-485 bus, the communication is crazy.

    ========== Relative information ==========
    Modbus Utility: Ver 1.3.3
    
    MiniOS7 image file: 
      For 40M CPU
          2.00 build 004, Sep 02 2005
          CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8K050902.img
      For 80M CPU (Ethernet version)
          2.01 build 000, Nov 03 2005
          CD:\Napdos\Modbus\8000e\OS_Image\For_80M\8000E-80-20051103.img
------------------------------------------------------------------------
   
Version 1.3.8 [08,Nov,2005] by Kevin
    Doesn't change any thing. Just update 8000E.Lib to 
    let the same firmware can run on both ver 1.2 and 2.5 CPU (80M).
    
    ========== Relative information ==========
    Modbus Utility: Ver 1.3.3
    
    MiniOS7 image file: 
      For 40M CPU
          2.00 build 003, Aug 11 2005
          CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8K050811.img
      For 80M CPU (Ethernet version)
          2.01 build 000, Nov 03 2005
          CD:\Napdos\Modbus\8000e\OS_Image\For_80M\8000E-80-20051103.img
------------------------------------------------------------------------
Version 1.3.7 [29,Sep,2005] by Kevin
    For programming
        1. Change ModbusMaster2Slave:
                Rename to ModbusRTU_Master2Slave,
                Add a lTimeout parameter.
        
        2. Add ModbusASCII_Master2Slave
           The function usage is same as ModbusRTU_Master2Slave
           but use Modbus/ASCII protocol.   
        
    ========== Relative information ==========
    Modbus Utility: Ver 1.3.3
    
    MiniOS7 image file: 
        For 40M CPU
            2.00 build 003, Aug 11 2005
            CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8K050811.img
        For 80M CPU (Ethernet version)
            2.00 build 003, Aug 15 2005
            CD:\Napdos\Modbus\8000e\OS_Image\For_80M\8E050815.img 
------------------------------------------------------------------------
Version 1.3.6 [26,Aug,2005] by Kevin
    Improve system stability and performance
        There are many libraries updated. The whole system becomes
        more stable and has better performance.
        You can check the list in the Lib directory.
        (8000E_Lib_List_136.txt)
        
    For porgramming
        Add function
            Add functions for Modbus/TCP master. 
            There are 3 new functions:
                1. ModbusTCP_Init
                2. ModbusTCP_Master2Slave
                3. ModbusTCP_Close
            
            Using the function, 7188E/8000E can link to 8 remote 
            Modbus/TCP devices.
            The function can detect whether the remote Modbus/TCP device
            is alive or not. If the device crashs, the function 
            can know the connection is disconnected.
            And it can recover the connection once the remote Modbus/TCP 
            device becomes alive.
          
    ========== Relative information ==========
    Modbus Utility: Ver 1.3.3 (updated) (not necessary)
    
    MiniOS7 image file: 
        For 40M CPU (updated)
            2.00 build 003, Aug 11 2005
            CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8K050811.img
        For 80M CPU (Ethernet version) (updated)
            2.00 build 003, Aug 15 2005
            CD:\Napdos\Modbus\8000e\OS_Image\For_80M\8E050815.img 

------------------------------------------------------------------------    
Version 1.3.5 [12,Apr,2005] by Kevin
    Fix bug
        online/offline status (new function added from Ver. 1.3.1)
        doesn't mapped to DI register correctly.
        It will disturb DI modules when some slots are empty.
        
    Support 87040, 87041    
    
    ========== Relative information ==========
    Modbus Utility: Ver 1.3.2 (updated)
        
    MiniOS7 image file: 
        For 40M CPU (updated)
            2.00 build 002, Apr 08 2005
            CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8K050408.img
        For 80M CPU (Ethernet version) (updated)
            2.00 build 001, Apr 20 2004
            CD:\Napdos\Modbus\8000e\OS_Image\For_80M\8E050408.img 
            
------------------------------------------------------------------------        
Version 1.3.3 [18,Feb,2005] by Kevin
    For porgramming
        Fix bug when use TC++ 1.01 to compile .exe file.
            The input/output range configuration of AI,AO module
            doesn't be set correctly. New range is always set to Ch0. 

------------------------------------------------------------------------
Version 1.3.3 [27,Jan,2005] by Kevin
    Update 8024 library to fix bug:
        When 8024 plug in 80M CPU + following backplane, there could
        be no actual voltage or current output.
            B843 V 6.2 (4 slots + COM4) 
            B883 V 8.1 (8 slots + COM4)
            B883 V 8.2 (8 slots + COM4)
            
    Update 8080 library to fix bug:
        Doesn't get correct initial count value after initiating or 
        clearing the counter.
        
    ========== Relative information ==========
    Modbus Utility: Ver 1.3.1
        
    MiniOS7 image file: 
        For 40M CPU
            2.00 build 001, Mar 30 2004
            CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8K040330.img
        For 80M CPU (Ethernet version)
            2.00 build 001, Apr 20 2004
            CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8E040420.img        
    
------------------------------------------------------------------------
Version 1.3.1 [24,Dec,2004] by Kevin
    Add SMMI menu (Network configuration)
        Pressing "UP" and "Down" of the SMMI can configurate 
        IP, Mask, Gateway.
        Refer to CD:\Napdos\Modbus\8000E\Document\
        LED_Menu_Network_Configuration.pdf for details.
    
    Add online/offline status detection for each I/O module.
        When the module is alive, the DI register is 1.
        If the module is failed, the DI register becomes 0.
    
    Support 8080
    
    Fix 87024 bug
        87024 output range = 4~20 mA doesn't output correct.
        Now the problem is fixed and the value mapping is
        4~20 mA <===> 0000~7FFF(Hex)
    
    Fix bug 
        Using Modbus Utility or LED menu to set offset value 
        to AI moudle is ok, but to AO module doesn't work.
        
    For porgramming
        Rename CheckLEDMenu to SMMI_Offset_CheckIn       
    
    ========== Relative information ==========
    Modbus Utility: Ver 1.3.1
        
    MiniOS7 image file: 
        For 40M CPU
            2.00 build 001, Mar 30 2004
            CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8K040330.img
        For 80M CPU (Ethernet version)
            2.00 build 001, Apr 20 2004
            CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8E040420.img
        
------------------------------------------------------------------------
Version 1.3.0 [19,Nov,2004] by Kevin
    Fix connection problem for VLC (Must use 80M CPU)
        VLC is a very high speed software. Before this version,
        there could be 1 or 2 disconections (due to receive response
        from the 8000-MTCP timeout) each hour when running the 
        VLC to communicate with the 8000-MTCP. 
        Now, the communication is very good.
        
        === Detail Explaining ===
        This problem is due to the MiniOS7 1 ms interval timer is 
        running on the Flash. Flash is slow speed memory. When the 
        ethernet communication is very busy, the MiniOS7 cannot finish
        functions relatived to the timer in time to service the Ethernet
        request. And there could be some Ethernet requests lost.
        Now, calling new timer driver, the 1 ms interval timer runs on 
        the SRAM. SRAM is high speed memory. Then MiniOS7 can use 
        shorter time to finish functions relatived to the timer. 
        Then the Ethernet requests can be serviced on time.

    For porgramming
        1. Update 8000E.Lib to ver 2.0.2.
        2. Calling InstallNewTimer.
             This is included in InitModbus. Users don't need to call the
             function again. And the 55 ms interval timer doesn't effect.
        3. Replace  IsSystemKey,  GetSystemKey,  ClearSystemKey with 
                   _IsSystemKey, _GetSystemKey, _ClearSystemKey.
             This is included in CheckLEDMenu. Users don't need to do any
             modification.
        4. Update XS8_3009.Lib to XS8_3201.Lib  (Ver 3.2.01)
             Need to add function PortUserStart to user.c
             and add function Port9999Start to v7000.c
             
    ========== Relative information ==========
    Ver 1.3.0 only change the communication action in the firmware.
    You don't need to change the Modbus Utility or the MiniOS7 image 
    file.
     
    Modbus Utility: Ver 1.2.7 
        
    MiniOS7 image file: 
        For 40M CPU
            2.00 build 001, Mar 30 2004
            CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8K040330.img        
        For 80M CPU (Ethernet version)
            2.00 build 001, Apr 20 2004
            CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8E040420.img       
            
------------------------------------------------------------------------
Version 1.2.2 [15,Jun,2004] by Kevin
    Change declaration (in MBTCP_8E.h)                         
        1. _MaxModule: constant ===> int iMax_Module_Count
        2. iMemory_DI, iMemory_DO,              
           iMemory_AI, iMemory_AO ===> to pointer
           
        ===> that users can change iMax_Module_Count to 
             enlarge the register count to store more
             extra information when they use the 
             Modbus library to develop their customized
             firmware.    
             Usage:
                iMax_Register_Count=1000;
                iRet=InitModbus();
                
             Please refer to MBTCP_8E.h for more detail information.   
    
    Support 8KE4/8KE8
        There is no any dip switch to set the NetID (station number).
        So it is fixed at 1.     
          
    ========== Relative information ==================
    Modbus Utility: Ver 1.2.7 
        
    MiniOS7 image file: 
        For 40M CPU
            2.00 build 001, Mar 30 2004
            CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8K040330.img        
        For 80M CPU (Ethernet version)
            2.00 build 001, Apr 20 2004
            CD:\Napdos\Modbus\8000e\OS_Image\For_80M\8E040420.img
            
------------------------------------------------------------------------
Version 1.2.1 [08,Jun,2004] by Kevin
    Change 
        Change TCP retry from 1100 ms (default for most Ethernet devices)
        to 110 ms. The 8000E re-send a package to the destinate device 
        in 110 ms, if it doesn't receive an ACK from the device. 
    
    Release Modbus/RTU slave port at COM1
        Add following code in UserLoopFun of user.c can 
        enable COM1 to be a Modbus/RTU slave port.
        
        //Is any Modbus/RTU request from COM port ?
        CheckModbusRequest(iModbusUpLinkPort);   
        
        Note: before Modbus Utility supports functions to set the UpLink port
              (baudrate, start bit, data bit, stop bit, parity bit),
              you can use SendTCP.exe to set the COM port configuration.
               
    Corrcet CheckLEDMenu
        When the function works together with CheckModbusRequest.
        The COM1 cannot work properly. It was fixed.
            
    Add function for CJC of 87018
        add Disable/Enable function for CJC.
        
    ========== Relative information ==========
    Modbus Utility: Ver 1.2.7 
        to support CJC eanble/disable functions of 87018
        
    MiniOS7 image file: 
        For 40M CPU
            2.00 build 001, Mar 30 2004
            CD:\Napdos\Modbus\8000e\OS_Image\For_40M\8K040330.img        
        For 80M CPU (Ethernet version)
            2.00 build 001, Apr 20 2004
            CD:\Napdos\Modbus\8000e\OS_Image\For_80M\8E040420.img
        
-------------------------------------------------------------------------------
Version 1.2.0 [23,Sep,2003] by Kevin
    Modify AI offset adjustment option:
        AI offset range is chnaged from this verion. The difference is:
        -128 ~ +127     ===> Utility:  1.2.3 ~ 1.2.4
                             Firmware: 1.1.5 ~ 1.1.9
        -10000 ~ +10000 ===> Utility:  1.2.5 ~ newer
                             Firmware: 1.2.0 ~ newer
                
    Add function CheckLEDMenu to adjust AI offset
        The LED menu can be used to adjust AI offset.
        Please refer to CD:\Napdos\Modbus\document\8000e\LED_Menu.pdf
        for the detail information.
                     
    Support 8037
    
    ========== Relative information ==========
    Modbus Utility: Ver 1.2.5 
        to support new AI offset adjustment option
        to support 8037
        
    MiniOS7 image file: 
        2.00 build 001, Jun 05 2003
        CD:\Napdos\MiniOS7\MiniOS7_2.0\I-8000\8K030605.img
        
------------------------------------------------------------------------
Version 1.1.8 [12,Sep,2003] by Kevin
    Fix bug:
        8040: the ch8~ ch15 are always 0.
        
------------------------------------------------------------------------
Version 1.1.5 [23,Jun,2003] by Kevin
    Change name of firmware (exe file running on 8000)
        The original name is MBTCP_8E.exe no mater what version it is.
        The new name becomes MBT8_nnn.exe which nnn means the version.
        For example: MBT8_115.exe means the firmware version is "1.1.5".
        
    Fix bug
        When read more than 63 AI or AO registers,
        the 8000 controller closes the ethernet connection.
        
    Modify function ModbusMaster2Slave:
        Add function code 01 and 03 to read back DO and AO registers.
        
    Improve Ethernet communication performance (change Update I/O mode)
        Add a new mode (mode 3) to UpdateIOModule and disable other modes.
        That is to say, there is only a update I/O mode. Please refer to
        the comments in version 1.0.7 to for the update I/O modes.
        
        When there are several Modbus/TCP clients connect to 
        the 8000 controller, there will be a lot of Modbus/TCP requests.
        The new update I/O mode can service more Ethernet requests.
        Every Modbus/TCP client won't wait too long for the Modbus/TCP response
        and the rate to update I/O module is ok. 
        If the Ethernet service rate is slow (other mode all have the problem),
        then the Modbus/TCP clients must increase the time interval to wait the
        Modbus/TCP response. That means the performace of the Modbus/TCP client
        will be not good.
        This method is to get a balance between service the 
        Ethernet requests and update I/O modules.
        
                
Ethernet     +-+ +-+ +-+ +-+   +-+ +-+ +-+ +-+           +-+ +-+ +-+ +-+
  Request:  _| |_| |_| |_| |___| |_| |_| |_| |_........._| |_| |_| |_| |___
                                                              
                            +-+                +-----+                  +-+  
Update I/O: ________________| |________________|     |_................_| |_
                          Slot0              Slot1                  Slot7 
                          
------------------------------------------------------------------------
Version 1.1.4 [27,May,2003] by Kevin
    Fix bug:
        Cann't force output of ch1,ch2 and ch3 of 87024
    
    Change:
        Use DMA technique to access 87K modules plugged on slots.
        That can save CPU resource and avoid data lost situation.
        
    Support:
        8077,8090
       
    Note:
        Modbus Utility must be version 1.2.2
        
------------------------------------------------------------------------
Version 1.1.3 [20,Mar,2003] by Kevin
    Add function:
       Function CheckModbusRequest to let specific COM pot becomes
       a Modbus/RTU slave port.
        
    Fix bug:
       When link to 87013, the first 4
       channels of the AI module that
       next to the 87013 are always zero.
       
    Note:
        Modbus Utility must be version 1.2.1
        
------------------------------------------------------------------------    
Version 1.1.2 [17,Mar,2003] by Kevin                           
    Add
        CJC adjustment for 87018
    
    Note: Modbus Utility must be version 1.2.0
    
------------------------------------------------------------------------
Version 1.1.1 [23,Feb,2003] by Kevin                       
  Support burn out (break line) detection for 87018 (thermocouple type only).       
    When one channel is burnt out, the Modbus kernel will  
    return a +Max. value (7FFF) for the channel            
    to indicate this situation.
    
------------------------------------------------------------------------
Version 1.1.0 [06,Jan,2003] by Kevin
  Update 
    1. Xserver kernel (VxComm) to version 3.0.9 (XS8_3009.lib)
         When you use Modbus SDK to develop your special firmware,
         You need to add a function, VcomCmdUser, to user.c when 
         update XS8_3004.Lib to XS8_3004.Lib.  
    2. Modbus kernel to version 1.1.0 (MBT8_110.Lib)
         Didn't change any thing. Only use new library to re-compile.
    3. TCPIPL.Lib to version 1.0.2 [Jan,02,2003]
         Improve Ethernet communication performance.
    4. Hardware library
         8000L.Lib, 8000.h  ==> [Nov,15,2002]
         8017HL.Lib         ==> [Nov,07,2002] ==> can be linked to TC 2.0
         
------------------------------------------------------------------------
Version 1.0.7 [13,Dec,2002] by Kevin
  Add UpdateIOMode
    The Modbus kernel reads settings form EEPROM 
    to switch update I/O mode.
    The function UpdateIOModule can following the mode to 
    know how to update the I/O modules.
    There are following mode:
      0(default): Auto
        Can detect how many 87K modules
        is plugged in the 8000 controller. 
        If there are more than one 87K module, 
        the kernel choose mode 1 else choose mode 2.
          
      1: Update one slot (in UpdateIOModule) peer scan loop
        The speed to communicate with the 87K module is slower 
        than the Ethernet communication speed.
        If the kernel scan all slots then check one ethernet request,
        the ethernet request must wait for long time to be dealed.
        To solve this speed problem, the kernel must check the ethernet
        request after update a slot of 87K module.
        
        Original problem: The time interval to service 
                          the Ethernet request is long.
        
    Ethernet     +--+                                      +--+     
    Request:    _|  |______________________________________|  |_____
             
    Update I/O:       +-----+ +-----+               +-----+    +-----+
                ______|     |_|     |_............._|     |____|     |_
                       Slot0   Slot1                 Slot7       Slot0   
                   
        To solve this speed problem, the kernel must check the ethernet
        request after update a slot of 87K module.

Ethernet     +--+        +--+                  +--+       +--+ 
Request:    _|  |________|  |_................_|  |_______|  |_
            
                  +-----+    +-----+               +-----+    +-----+ 
Update I/O: ______|     |____|     |_............._|     |____|     |_
                   Slot0        Slot1               Slot7      Slot0                           
                                   
      2: Update all slots (in UpdateIOModuel) peer scan loop       
        The speed to communicate with the 8K module is higher
        than the Ethernet communication speed.
        If the kernel scan all slots then check one ethernet request,
        the update I/O rate can be high and the ethernet request 
        is not slow.
        
        Ethernet       +--+                     +--+
           request: ___|  |_____________________|  |_____
                  
                            +-+ +-+          +-+     +-+ 
        Update I/O: ________| |_| |_........_| |_____| |_
                          Slot0 Slot1       Slot7   Slot0          
                        
      others: use mode 1
  
                   The total system loop is like:
                                   (Start)
                                      |
                      +-------------->+
                      |               |
                      |   +-----------+------------+
                      |   | Check Ethernet Request |
                      |   +-----------+------------+
                      ^               |
                      |   +-----------+------------+
                      |   |    UpdateIOModule      |
                      |   +-----------+------------+  
                      |               |
                      +-------<-------+                             
     
------------------------------------------------------------------------
Version 1.0.6 [02,Dec,2002] by Kevin
  Correct frame check for "OPC server of ICPDAS"
  
------------------------------------------------------------------------
Version 1.0.5 [11,Nov,2002] by Kevin
  Add function ModbusMaster2Slave
  
------------------------------------------------------------------------
Version 1.0.4 [24,Oct,2002] by Kevin
  Change ACK delay to 20 ms (in InitModbus())




 


                                                           
