Copyright Mar. 2004 by ICP DAS CO., LTD. All right reserved.

This paper lists the upgraded history of the driver of Wincon-8037/8337/8737 &
  Wincon-8036/8336/8736.
 
Our newly released driver can also be obtained from the following
website.
  http://www.icpdas.com/products/PAC/i-8000/isagraf.htm

Warning:
  The copyright of the firmware and ISaGRAF embedded driver 
  belongs to ICP DAS CO., LTD. 
  Only the W-8x37 / W-8x36 have registered a legal ISaGRAF Target license. 

Trademark:
  Products, names and trade names appeared belongs to their respective owner. 

**************************************************************************
*  3.05 , Mar.18,2004
**************************************************************************
The below items are supported.
1.  Modbus RTU (serial) slave protocol in COM2 or COM3 (default is COM2).
2.  Modbus TCP/IP slave protocl in ethernet port, Up to 8 link at the same time.
3.  Max. "Tic code" size - 512K bytes.
4.  Below I/O modules are supported.
    i-8037, 8040, 8041, 8042, 8051, 8052, 8053, 8054, 8055, 8056, 8057, 
    i-8058, 8060, 8063, 8064, 8065, 8066, 8068, 8069, 8017, 8024
    i-87051, 87052, 87053, 87054, 87055, 87057, 87058, 87063, 87064, 87065,
    i-87066, 87068, 87069, 87013, 87017, 87018, 87022, 87024, 87026, 87082
5.  Below I/O modules will be supported in higher version No.
    i-8050, 8080, 8090, 8091, 8077, 87015, 87016, 87019
    i-8112, 8114, 8142, 8144
6.  RS485 remote I/O - "Bus7000" & related function blocks - i_7050, 
    i_87051, ...  for i-7000 & i-87K remote I/O modules.
7.  Autoscan I/O.
8.  MMICON starter kit - "MMICON" & its related functions - 
    mmi_boo, mmi_inp_n, mmi_inp_s, mmi_int, mmi_real, mmi_str
9.  Byte array functions : array_r, array_w
    Integer array functions : ary_n_r, ary_n_w, ary_w_r, ary_w_w
10. Other functions.
    bit_wd, int_real, real_int, int_real, real_str, time_str, val_hex, wd_long
11. Other function blocks.
    long_wd, sysdat_r, sysdat_w, ststim_r, systim_w, wd_bit
12. Message array functions: msgary_r, msgary_w
13. File operation functions: f_ropen, f_wopen, f_close, f_eof, fa_read, 
    fa_write, fm_read, fm_write
14. R/W COM2 & COM3 functions: comopen, comclose, comclear, comready, comread,
    comwrite, comstr_w, comary_r, comary_w
15. unique serial No. functions: get_sn
16. VB.net functions to talk to ISaGRAF softlogic

**************************************************************************
*  3.06 , Apr.13,2004
**************************************************************************
1. Add Mbus_b_r, Mbus_n_r, Mbus_b_w, Mbus_n_w, Mbus_br1, Mbus_nr1, 
       Mbus_r, Mbus_r1, Mbus_wb function blocks
2. W-8037 is supported
3. Fix bus_7000 bug in version 3.05

**************************************************************************
*  3.07 , May.05,2004
**************************************************************************
1. Add Pid_AL, bcd_v, v_bcd function blocks
2. Fix a bug of exchanging timer value between VB.net & ISaGRAF
3. Add Ary_f_r, Ary_f_w, F_seek, F_read_b, F_read_w, F_read_f,
       F_writ_b, F_writ_w, F_writ_f, F_creat
4. Limit max. file number that can be open by F_Ropen & F_Wopen to 50
5. extends addr number of message array from 256 to 1024

**************************************************************************
*  3.08 , Jun.02,2004
**************************************************************************
1. Add i-8090 I/O board "i_8090" & function - M_r_enco
2. Add i-8091 I/O board "i_8091A" & functions listed as below.
   M_regist , M_s_nc : W-8337/8737 ignore these 2 functions (No action happens)
   M_r_sys, M_s_var, M_s_dir, M_s_mode, M_s_serv, M_stpx, M_stpy, M_stpall,
   M_lsporg, M_hsporg, M_lsppmv, M_hsppmv, M_nsppmv, M_lspmv, M_hspmv, M_cspmv,
   M_slwdn, M_slwstp, M_intp, M_intln, M_intln2, M_intcl2, M_intar2, M_intstp
3. Fix a bug of I-8017h (Some boards can not get A/I value correctly before Ver. of 3.08)
4. Improve program efficiency a little when integrate ISaGRAF program with VB.net & 
   eVC++ program.
5. Add I/O complex equipment - Ebus_m & Ebus_s
6. Fix a bug on Mbus_br1 , Mbus_nr1 & Mbus_r1

**************************************************************************
*  3.09 , Jun.30,2004
**************************************************************************
1. Add I/O complex equipment - "SMS" 
2. Add SMS functions - sms_test , sms_get , sms_gets , sms_send & sms_status.
3. SMS supports GM29 , CMS91 & M1203A. 
4. Add EEPROM functions - eep_en, eep_pr, eep_b_r, eep_b_w,
       eep_by_r, eep_by_w, eep_wd_r, eep_wd_w, eep_n_r, eep_n_w
5. Add I/O Complex Equipment - bus7000b.

**************************************************************************
*  3.10 , Aug.10,2004
**************************************************************************
1. Add function - i_reset
2. Add I/O complex equipment - "modem_ps", it supports "Modem_station" link 
   , however not support "other IP" yet.
3. Modify i-8024's driver to have better efficence
4. Fix a bug of exchanging Timer data between VB.net & ISaGRAF project

**************************************************************************
*  3.11 , Oct.01,2004
**************************************************************************
1. Add function - ComayWW , ComayNW , Bin2Eng , i7000_en
2. Fix a bug of the Ebus.
3. Add Beta version of Web HMI.

**************************************************************************
*  3.12 , Mar.02,2005
**************************************************************************
1. Replace Scanker.dll , ScankerNet.dll to Quicker.dll & Quickernet.dll
2. New VB.net demo to access to IsaGRAF program thru. Quickernet.dll & Quicker.dll
   Location CD-ROM:\napdos\isagraf\wincon\VB.NET_Demo\
   Manual: CD-ROM:\napdos\isagraf\wincon\english_manu\VB.net_link_w8337.pdf
3. Web HMI ver. 1.0 is finished.
   Manual: CD-ROM:\napdos\isagraf\wincon\english_manu\web_hmi.pdf (available soon)
4. Add function - f_delete , f_end , dt2mesag 
5. comopen & comopen2 's parity supports 3:Mark & 4:Space

**************************************************************************
*  3.13 , May.10,2005
**************************************************************************
1. Add Trend curve function for Web HMI (Web HMI Demo 11)
2. Add C or VB.net version Web HMI - whmi.exe
3. New Getting Started Manual released.  CD-ROM:\napdos\isagraf\wincon\english_manu\getting_started_w8337.pdf

**************************************************************************
*  3.14 , May.10,2005
**************************************************************************
1. modify isawincon.exe to run on both "CompactFlash" or "Compact Flash" directory name.
2. modify whmi.exe to run on both "CompactFlash" or "Compact Flash" directory name.

**************************************************************************
*  3.15 , Jun.09,2005
**************************************************************************
1. Add Thermo couple modules broken line detection for I-87018BL , I-7018BL, I-87019 , I-7019
2. Add variable directly accessed functions by Netwok address:
  r_mb_rel , w_mb_rel , r_mb_adr , w_mb_adr
3. Add remote IO driiver of I-7055d , I-7016d2 , I-7015
4. Add scaling fuction for (0 - 10 V) and (4 - 20 mA) 
  a4_20_to , to_a4_20 , v0_10_to , to_v0_10

**************************************************************************
*  3.16 , Jun.30,2005
**************************************************************************
1. Add IO board I-8081F2 (i-8081-ODM2)
2. Fix a memory leak problem when open and close com_port. 
3. ComOpen and ComOpen now supports 2(COM2:), 3(COM3:), 5 to 9 (COM5: to COM9:) and
   10 to 14 (MSP1: to MSP5:)
4. MMICON now supports RS232 port of 2(COM2:), 5 to 9 (COM5: to COM9:) and 10 to 14 (MSP1: to MSP5:)   
5. Mbus now supports RS232 port of 2(COM2:), 3(COM3:), 5 to 9 (COM5: to COM9:) and 
   10 to 14 (MSP1: to MSP5:)   
6. MMICON now supports RS232 port of 2(COM2:), 5 to 9 (COM5: to COM9:) and 10 to 14 (MSP1: to MSP5:)   
7. Add i_7051d , i_7045d & i_7059d


**************************************************************************
*  3.17 , Aug.03,2005
**************************************************************************
1. Add IO board I-8050
2. Add C functions - F_append, F_copy , F_writ_s, F_dir
3. Modify c functions - R_MB_ADR, R_MB_REL , W_MB_ADR , W_MB_REL to be 5% faster

4. Add retained function. Retain_B, Retain_N, Retain_F, Retain_T, Retain_X
 To use reatined variables, please plug one S-256 or S-512
 to Wincon's new backplane (the position is just under the CPU board). 

 The ver. of the new backplane should be the below or later version.
    WB-831 (For 3-slot ): Rev 2.6
    WB-871 (For 7-slot ): Rev 2.8

  Maxinum retained number:
    a. up to 1024 boolean variables
    b. up to 4096 integer variables
    c. up to 4096 REAL variables
    d. up to 1024 timer variables

5. When click on "Stop" on the ISaGRAF debugger, All digital output will reset to OFF and
   I-8024, I-87022, I-87024 & I-87024 will reset to 0 (If I-87022, 87026's range is set as 4 to 20 mA,
   reset to 4 mA)

6. Add controller fault detection.
  For example:
  (* When controller "Local Fault" happens, the ISaGRAF can detect it and then user's program can do the right action *)
  (* is_fault & fault_type are declared as internal integer *)
  (* tmp is declared as internal boolean *)
  (* PC / HMI can request controller fault state & type by Modbus protocol at No.=9999 & 9998 *)  

  (* to get controller state *)
  is_fault := R_MB_ADR(1,9999);     (* 0: Ok ,  1: controller fault happens *)

  (* controller fault type		
     101 : Global fault : project stop running, only HMI/PC can request it by Modbus No. 9999 & 9998
     --- other value is Local fault ---
     102: S_R_R error, invalid REAL value 
     103: R_MB_REL error, invalid REAL value 
     104: INT_REAL error, invalid REAL value 
     105: RETAIN_F error, invalid REAL value 
     106: RETAIN_X error, invalid REAL value  
     107: Real divided by 0  
     108: Integer divided by 0  
     109: F_READ_F error, invalid REAL value (For Wincon-8x37/8x36 only)
     110: I-87K IO board in slot 0 to 7 not found. 
  *)
  fault_type := R_MB_ADR(1,9998);   

  if  is_fault=1  then

    (* Do action here when  "Local Fault" happens *)
    (* ...                                        *)

    (* Only for Wincon-8037/8337/8737: To stop program running & reset all output in slot 0 to 7, call Stop_APL *)
    (* tmp := Stop_APL( ); *)

    (* To clear the value in Network address 9999 & 9998 when Local fault happens, please use W_MB_ADR(1, 9999, 0) and W_MB_ADR(1, 9998, 0) *)
    (*
      tmp :=  W_MB_ADR(1, 9999, 0);
      tmp :=  W_MB_ADR(1, 9998, 0);
    *)

  end_if;

8. Add c function - Stop_APL  to stop program running (it will become "No application")
   

**************************************************************************
*  3.18 , Sep.09,2005
**************************************************************************
1. Add driver of I-87015T, 8-ch. Thermister input
2. Add driver of I-87015, 7-ch. RTD input


**************************************************************************
*  3.18B , Sep.19,2005
**************************************************************************
1. Add remote I/O function block i-87015 & i-87015T


**************************************************************************
*  3.18C , Sep.22,2005
**************************************************************************
1. Add remote I/O function block i-87040 & i-87041

**************************************************************************
*  3.19 , Oct.14,2005
**************************************************************************
1. replace old Quicker.dll & QuickerNet.dll with new one.
2. Stop Web server when End IsaGRAF driver or Web HMI driver.
3. Add "Mbus_asc" : Modbus ASCII Master
4. "Mbus" & "Mbus_asc" supports multi-port now. Available ports is
   COM2, COM3, COM5 to COM9, COM10(MSP1:), COM11(MSP2:), COM12(MSP3:)
   , COM13(MSP4:), COM14(MSP5:)
5. Modify below function blocks's 1st parameter setting (SLAVE_) to support multi-port
   Mbus_b_r, Mbus_br1, Mbus_w_b, Mbus_n_r, Mbus_nr1, Mbus_n_w, Mbus_r, Mbus_r1, Mbus_wb
   For ex, if SLAVE_ = 2001,  Port No. = COM2,  slave No. = 1;    
           if SLAVE_ = 9002,  Port No. = COM9,  slave No. = 2;     
           if SLAVE_ = 10032,  Port No. = COM10 (MSP1:), slave No. = 32;  


**************************************************************************
*  3.20 , Oct.24,2005
**************************************************************************
1. fix a un-stable bug when connecting Remote I-7000 & I-87K IO modules
2. Fix a bug of function - R_MB_ADR & W_MB_ADR
3. Add I/O board of 16-Ch. I-8071HS (Single-End input)
4. Fix a bug of I-8017H & I-8017HS when "smple_number" is not set as 1
5. Add function blocks for 8-Ch. Thermister I/O modules "I-7005"
   I-7005d (2's complement)
   I-7005d2 (engineering, integer format)
   I-7005d3 (engineering, float format)


**************************************************************************
*  3.21 , Nov.17,2005
**************************************************************************
1. Add function block : i_DiCnt , i_DiCnt2
2. Fix a bug of requesting bits of Mbus_R , Mbus_R1 , Mbus_B_R , Mbus_BR1 
3. Fix a bug of connecting MMICON 
4. Add M-7000 Modbus I/O function blocks:
   M7015, M7017, M7018, M7019, M7024 
   M7041, M7044, M7045, M7050, M7051, M7052, M7053, M7055, M7058, M7060, M7063, M7065, M7067
5. Fix a bug on Mbus_b_w, Mbus_n_w, Mbus_wb ("action" init as 0, original bad value is 1)
6. Add function block CJC for I-7018/7019 and I-87108/87019


**************************************************************************
*  3.22 , Dec.12,2005
**************************************************************************
1. Add Redundant sysytem function
   IO complex equipment:  RDN 
   Function blocks: RDN_B, RDN_N, RDN_F, RDN_T & RDN_go
   Example program: wdmo_18a & wdmo_18b
2. Modify i_8017H, i_8017HS & i_8017A's definition. Now Sample_number setting
   can be set as 0 - "Fast scan rate mode". 
   The normal scan rate of I-8017H in Wincon is about 62Hz. If setting 
   Sample_Number to 0,  The fast mode scan rate of I-8017H in Wincon is about 100Hz.
   For I_8017HS, normal is 31 Hz, fast is 62 Hz.
3. Add IO complex equopment "udp_ip"
4. Add c functions - "udp_send" & "udp_recv" & demo program - wdemo_19 & wdemo_20


**************************************************************************
*  3.23 , Jan.16,2006
**************************************************************************
1. Fixed a bug of Modbus TCP/IP connection. The socket ID now is modified to 32-bit value.
2. Add c functions - "com_MRTU"
3. Add PWM function - "pwm_en", "pwm_en2", "pwm_sts", "pwm_dis", "pwm_on" & "pwm_off"
4. Add D/I counter - "Di_Cnt" at slot 1
5. Add c function - "pwm_sts2"
6. Add c function - "pwm_set" to dynamically change the ON_, OFF_ & NUM_ setting


**************************************************************************
*  3.24 , Feb.27,2006
**************************************************************************
1. Modify priority:  main() = 131  , RDN2=130 
2. RDN Change over time = 500 ms (Master dead --> Slave active), Data synchronation time = 75 ms
3. Add "Mbus_en" to enable/disable  "Mbus" or "Mbus_asc"
4. Delete "rdn_go" function
5. Add special "range" setting of Temperature IO connection to support clear "Degree Celsius" or 
   "Degree Fahrenheit" temperature input value.
   IO board: I-87013, 87015, 87015T, 87018/R, 87019/R
6. Add special "ADR_" setting of Temperature remote IO function block to support clear "Degree Celsius" or 
   "Degree Fahrenheit" temperature input value.
   Remote IO module: I-7005, 7013, 7018/R, 7019/R, 7033, I-87013, 87015, 87015T, 87018/R, 87019/R


**************************************************************************
*  3.25 , Mar.23,2006
**************************************************************************
1. Add one function "PLC_mode" to change PLC speed, For example:
  (*
     0:  Fast Mode, Default setting, the minimum PLC scan time is 4 ms
     1:  Slow Mode, the minimum PLC scan time is about 6 to 7 ms
     2:  Slower Mode, the minimum PLC scan time is about 9 to 11 ms
     3 or other value:  Slowest Mode, the minimum PLC scan time is about 19 to 21 ms
  *)
  (* TMP is declared as Boolean internal variable *)
  (* INIT is declared as Boolean internal variable and init at TRUE *)
  if  INIT  then
    INIT  :=  False ;   (* Only do it once in the 1st PLC scan *)
    TMP  :=  PLC_mode(2) ;   (* Set PLC speed to 2:slower mode *)
  end_if ;
2. Add IO complex-equipment "Rtu_Slav". It can setup to add 4 more Modbus RTU Slave ports 
   in COM5, COM6, COM7 or COM8 (i-8112/8114/8142/8142i/8144 in slot 1 or slot 2)
 

**************************************************************************
*  3.26 , May.17,2006
**************************************************************************
1. Add function block - "i_7777" & "i7k87k"
2. Fix bug of "i_7063d"
3. Firmware: Modify driver to call GO_7000_87K( ) & GO_COM1_IO( ) in isa_main( )
4. Fix a bug when setting wrong range of I-87018.  " ... CRC error ..."
5. Modify driver to support SCADA requesting bits by Modbus request to max 1968 booleans.
   Original is 255 booleans only for one Modbus request.
6. Modify driver to support SCADA requesting words by Modbus request to max 123 words.
   Original is 122 words only for one Modbus request.
7. Fix a bug of Ebus can not deliver integer package No of 17 to 128.
8. Add function of get_info( ) which can request controller's Net-ID
9. Add function of s_MB_adr( ) which can define Modbus Network address No. to "Variable Array".
10. To declare a ISaGRAF version 3.4 (or 3.5) "Variable Array", please add 2 more lines 
    on the top of the "isa.ini" file in the ISaGRAF sub-directory "C:\ISAWIN\EXE\". And then 
    when you open the ISaGRAF workbench, there will be a "DIM" area you can assign in the 
    Dictionary declaration windows.
    
    inside  c:\isawin\exe\isa.ini, adds 2 lines
 
    [DEBUG]
    arrays=1

    Manual:  Please refer to below Manual for "Variable Array".
      A. Wincon-8xx7 CD-ROM: \napdos\isagraf\wincon\english_manu\variable_array.pdf  or
      B. ftp://ftp.icpdas.com/pub/cd/wincon_isagraf/napdos/isagraf/wincon/english_manu/variable_array.pdf

11. When Redundant system ("rdn_m" or "rdn_s" ) is using, the Modbus RTU slave port will
    response nothing if the controller is Redundant in-Active. Only the Active controller's 
    Modbus RTU salve port will response. So The HMI linking to the Modbus RTU slave port
    of these two Controllers will have no problem if they have the same Net-ID setting & different 
    IP setting. Only one will response the HMI's Modbus RTU request.

    Manual:  Please refer to below Manual for Controller Redundancy.
      A. Wincon-8xx7 CD-ROM: \napdos\isagraf\wincon\english_manu\redundancy.pdf  or
      B. ftp://ftp.icpdas.com/pub/cd/wincon_isagraf/napdos/isagraf/wincon/english_manu/redundancy.pdf

12. Modify i-8080 driver to Kevin's 2.04 version.


**************************************************************************
*  3.27 , July.04,2006
**************************************************************************
1. Improve code to protect isawincon.exe when under ethernet flood attack
2. Using Fast I/O Read & Write


**************************************************************************
*  3.28 , July.20,2006
**************************************************************************
1. Add a command line feature.  
   If "\CompactFlash\ISaGRAF\ibatch.txt" is found, the isawincon.exe will
     execute the command line listed in it after 10 seconds.
   For example, the "\CompactFlash\ISaGRAF\ibatch.txt" could be

      route.exe  add  192.168.100.0  mask  255.255.255.0  192.168.0.30

  Then running iswincon.exe 10 seconds later, it is executed once.

2. Fix a bug in wincon8xx7.c , IO memory mapping address is modified.

3. Add i-8KE4-MTCP & i-8KE8-MTCP I/O, refer to description of below items or 
   http://www.icpdas.com/faq/isagraf.htm - "FAQ - 042"

   IO conplex equipment:  i8ke
   C functions :  i8ke_b , i8ke_n , i8ke_f , i8ke_b_a , i8ke_n_a , i8ke_f_a 

4. Redundancy solution now support i-8KE4-MTCP & i-8KE8-MTCP I/O, please set IO complex equipment -
   "rdn" - "RDN_ip" - "Remote_IO_type" as 2.
   Set 2nd IP address of W-8x47 to "rdn" - "RDN_ip2" - "Master_IP2" & "Slave_IP2" will make redundancy 
   solution more safe. If one cable is break, the other one still works.


**************************************************************************
*  3.29 , Aug.09,2006
**************************************************************************
1. Add IO board - "dis_stop"
2. Fix a bug of function - "Bin2Eng"
3. Add one more parameter - "Send_Time_Gap" of IO complex equipmenet - "Udp_ip"
4. Fix a bug of "Udp_ip"
5. Fix a bug of connect HMI to multi-drop of W-8xx7 via modbus RTU RS-485
6. Add IO complex equipment - "Tcp_clie" & c-functions - "Tcp_send" & "Tcp_recv" 
7. Modify "i8ke" driver to become more efficient.


**************************************************************************
*  3.30 , Aug.16,2006
**************************************************************************
1. Fix a bug of I-87K I/O in slot 1 to 7.
2. Fix a bug of calculating PLC scan time.
3. Modify W-8x47 / 8x46 's "i8ke" to be more efficient.


**************************************************************************
*  3.31 , Sep.20,2006
**************************************************************************
1. Fix a bug of "bus700b" when "checksum_flag" is enabled
2. Add more delay (6) to (20) in i_8017h.c to fix a bug when using i-8017h
3. Modify i-8080 driver to 2.05 version.
4. Add "special <CODE_> parameter for temperature input board (for example, 
   M-7018R, M87018R, M-7019R & M-87019R) to get clear <Degree Celsius> or 
   <Degree Fahrenheit> input value" into "mbus_r" & "mbus_r1" 
5. Add FRNET IO complex board "i_8072" & c-function "fr_b" & "fr_b_a"


**************************************************************************
*  3.32 , Oct.19,2006
**************************************************************************
1. Modify "mbus" & "mbus_asc" to wait > 3.5 bytes time after complete slave's 
   response is received, then sending next command.


**************************************************************************
*  3.32B , Oct.31,2006
**************************************************************************
1. Add c-function blocks "i_7017rc" for RS-485 IO modules - i-7017C & i-7017RC
2. Add c-function blocks "i_87017r" for RS-485 IO modules - i-87017RC 
3. Add io board - "i87017rc" for IO board - i-87017RC 
4. modify c-function "A4_20_to" to accept Range = 16#7  &  16#1A
5. modify a bug of i-87K IO plug in slot 1 to 7  - give "pIsaNameOf87k" a fixed address
6. Modify IO board "i_87019" to accept range code from 08 to 0D
7. Add IO board "i_87015f". Remove original "i_87015" .
   Please connect "i_87015f" when using i-87015 : 7-Ch. RTD input. 
   Each channel can be set to different Range Code setting.


**************************************************************************
*  3.33 , Nov.15,2006
**************************************************************************
1. Fix a bug of "i_7051d" function block (old driver signal is reversed)
2. Modify code in Tamp0get.c & Tamp0put.c , Search "Nov.02,2006"
3. Modify Modbus RTU Slave (RS232/485) to check  (nbi, nbb) & (nbw, nbb)
4. Fix a bug of i-8080 Up/Counter value drop or rise about 65536 suddenly. 
   Fix a bug of i-8080 DIR/Pulse & Up/Count mode, the counter value now can reverse.

   Since ISaGRAF interger value is in range of -2,147,483,648 to + 2,147,483,647 
    (signed 32-bit Integer format), so the i-8080 counter value in ISaGRAF is as below

   Counter value range:
     Up Count:  0 -> 1 -> 2 ... ---> 2,147,483,647 (Hex is 7FFFFFFF) -> -2,147,483,648 (Hex is 80000000)
                  -> -2,147,483,647 ... ---> -1 (Hex is FFFFFFFF) then -> back to 0 again
     DIR/Pulse: Starting at value of 0, can be forward or backward depends on the direction.
                range is -2,147,483,648  ~  2,147,483,647
     Up/Down:   Same as DIR/Pulse mode.

   Note:
     1. DIR/Pulse & Up/Down mode are similiar as Encorder input. The counter value can be 
          forward or backward in the range of -2,147,483,648  ~  2,147,483,647
        To use DIR/Pulse or Up/Down properly, please always limit the actual input count in the 
          range of -2,147,483,648  ~  +2,147,483,647
     2. The Up Count mode starting at 0 will max go up to 2,147,483,647, then go to -2,147,483,648 when
          the next count is coming. And then ... go to -1 then back to 0 again. 
        If user's HMI/SCADA software supports "unsigned 32-bit Integer format" , the counter value in 
          the HMI/SCADA can be "0  ... to +4,294,967,295 then back to 0 at next count" if setting as 
          "unsigned 32-bit Integer format" in the HMI/SCADA siftware. 
        However in ISaGRAF it always starts at 0 ... to 2,147,483,647, then go to -2,147,483,648 when
          the next count is coming. And then ... go to -1 then back to 0 again. 
 

**************************************************************************
*  3.34 , Dec.20,2006
**************************************************************************
1. Modify "SettingPage.cpp" & "WebServerPage.cpp". Search "Nov.20,2006"
2. When isawincon.exe is starting, the "ISA11" , "ISA16" 's file attribute is modified to Archive
   search "Nov.20,2006" in "wincon8xx7.c"
3. Increase Ebus Master cycle time from 50 to 60 ms.
4. Modify c-function "str_real" to accept SPACE, TAB, ENTER, LF character.
    like   str_real('   1.2345   ') now return a correct REAL value = 1.2345
    (* old version accept only str_real('1.2345'), if give str_real('   1.2345   '), it retruns a 
          error value = 1.23E-20 *)
5. Reduce the Ebus Max. sending package size from (768-24) to (512-24) to compatible with I-8x37 & I-7188EG.


**************************************************************************
*  3.35 , Jan.09,2007
**************************************************************************
1. RDN: Increase the timeout time for RS-485 remote IO. Original is 250 ms. 
        Now is the I/O module number x 250 ms   (SerialComm_V2.c modified)
2. Add c-function : EEP_F_R , EEP_F_W for processing REAL value in EEPROM
3. Add c-function block : EBUS_F_R , EBUS_F_W for for processing REAL value in EBUS
   If you don't have the block definition in your ISaGRAF workbench, please visit
     http://www.icpdas.com/products/PAC/i-8000/isagraf.htm  to download "ICP DAS Utilities For ISaGRAF"
4. Increase EBUS package number to max. 256 packages
5. Modify Local fault and Global fault definition as below

--------------------------------------------------------------------------------------------
Local & Global Fault definition:
-----------------------------------------------------------------------
ERROR No.           Description
-----------------------------------------------------------------------
    101          :       Global  fault
    102          :       S_R_R  Float  error
    103          :       R_MB_REL  Float  error
    104          :       INT_REAL  Float  error
    105          :       RETAIN_F  Float  error
    106          :       RETAIN_X  Float  error
    107          :       Real  divided  by  0
    108          :       Integer  divided  by  0
    109          :       RETAIN_A  Float  error
    110          :       Real  multiply  error
    111          :       Real  division  error
    112          :       Real  addition  error
    113          :       Real  sunstraction  error
    114          :       EEP_F_R  Float  error
    115          :       EBUS_F_R  Float  error
    116          :       FBUS_F_R  Float  error
    117          :       F_REAF_F  error   (For Wincon-8xx7)
    118          :       I-87K  I/O  not  found
    119          :       ARY_F_R  Float error
--------------------------------------------------------------------------------------------


**************************************************************************
*  3.36 , Feb.15,2007
**************************************************************************
1. Add virtue IO board - "IO_state" to test if IO board in slot 1 to 7 working well.
   Search "Jan.22,2007" in  *.c  &  *.h
2. Add virtue IO board - "echo_tim" to set delay time of response of Modbus RTU Slave port 
   (one of COM2 and COM3 RTU Slave port).  Search "Jan.23,2007" in  *.c  &  *.h
3. Add "Msg_F" function to extract some REAL values from a string (Message)
   Demo program: wdemo_52 , wdemo_54 at 
     ftp://ftp.icpdas.com/pub/cd/wincon_isagraf/napdos/isagraf/wincon/demo/
4. Add "Msg_N" function to extract some Integer values from a string (Message)
   Demo program: wdemo_53 , wdemo_53 at 
     ftp://ftp.icpdas.com/pub/cd/wincon_isagraf/napdos/isagraf/wincon/demo/
5. Add Web HMI 's \Web_Data1 path. to frequently record data. Please refer to "whmi_12" demo.
   at   ftp://ftp.icpdas.com/pub/cd/wincon_isagraf/napdos/isagraf/wincon/demo/  &
        ftp://ftp.icpdas.com/pub/cd/wincon_isagraf/napdos/isagraf/wincon/webhmi_demo/
    (Modify WebServerPage.cpp & W-8xx7.c)
6. Add c-function-blocks : "i_7018z" and "i_87018z" for related RS-485 remote I/O module
7. Add I/O board : "i_87018z" for i-87018z plugged in slot 1 to 7
8. Add W-8xx7 to support functions : ARcreate( ) , ARwrite( ) , ARread( ).
   The first parameter of these 3 functions should be always 1, not supporting other value.
   Max. integer number can be allocated by ARcreate( ) is 3,000,000. Each is 32-bit format.
   That is totoal memory can be allocated is 3,000,000 x 4 = 12,000,000 bytes.
9. Modify bus7000 (bus7000b) to wait some milli-second when it receive the complete response
   from the remote IO module, then send next command.  Search "Feb.13,2007" in SerialComm_V2.c
10. Add parameter of Delay_time2 to Delay_tim5 in I/O complex equipment - "RTU_slav"
   

**************************************************************************
*  3.37 , May.09,2007
**************************************************************************
1. Reduce "RDN_DATA_SIZE" from 20000 to 10000 in rdn.h
2. Add "Security_passwd" parameter in IO complex equipment - "tcp_clie"
   When value of "Security_passwd" is not zero, the TCP/IP protocol will add 4 more checksum bytes.
3. Add "Security_passwd" parameter in IO complex equipment - "udp_ip"
   When value of "Security_passwd" is not zero, the UDP/IP protocol will add 4 more checksum bytes.
   Demo program & description:  www.icpdas.com - FAQ - Software - ISaGRAF - 065
4. Modify code to do proper operation when using such as, ANA(1.5E+20), ANA(-2.0E+19), 
   TMR(2.0E+13)  or  TMR(-1.0).
   An float error message 121 or 122 will be display in the ISaGRAF debugger windows.
5. Modify code to do proper operation when floating point calculation of  * , / , + or - 
   is out of 32-bit float range.
   An float error message 110 , 111 , 112 or 113 will be display in the ISaGRAF debugger windows.
6. Modify code to do proper operation when POW( ) and EXPT( ) calculation is out of 32-bit float range.
   An float error message 123 will be display in the ISaGRAF debugger windows.
7. Add functions - "net_addr" , "net_ntoa" and "int_str3"
   Demo program & description:  www.icpdas.com - FAQ - Software - ISaGRAF - 065
   

**************************************************************************
*  3.38 , Jul.03,2007
**************************************************************************
1. Add functions :  wdt_en   and  wdt_rfh
2. Add Email_ETH feature. Support  mail_set  and  mail_snd  function
   to send email (or with one attached file < 2MB)
   Please visit www.icpdas.com - FAQ - Software - 067 for more information and demo program.
   Demo program: Wdemo_62 , Wdemo_63 and Wdemo_64

      
**************************************************************************
*  3.39 , Aug.16,2007
**************************************************************************
1. Add Modbus slave function code 08 at COM2 / COM3 or "RTU_slav" port : COM5 ~ COM8.
   (Fuji HMI will send      01  08  00  00  12  34  CR_H  CR_L
    Then W-8xx7 will reply  01  08  00  00  12  34  CR_H  CR_L)
2. Fix a Modbus RTU slave port bug when using as RS-485 multi-drop ports. (Aug.08,2007 in tast8lv2.c)
3. Add Modbus RTU master "frame delay time" in IO complex equipment - "mbus" and "mbus_asc"
   The "port_no" parameter setting is modified as below.  (Aug.16,2007 in mbus.c , winconio.c , taio0ker.c)
    port_no :   
        Port No.   = port_no   mod   100 ; 
        Delay time = port_no / 100;
           delay time for sending the next Modbus frame, unit is ms, min. value is 0, max value is 1000 ms
           setting a value larger than 1000 will use the value of 1000 ms

        For Ex. 
           (1)  if port_no = 3 , then  Port No. = 3  ,  Delay time = 0 ms.  It means two Modbus 
                frame will have at least  "3.5 character"  time gap.
           (2)  if port_no = 50002 , then  Port No. = 2  ,  Delay time = 500 ms . It means two 
                Modbus frame will have about  500 ms + "3.5 character"  time gap.			

     
**************************************************************************
*  3.40 
**************************************************************************
1. Add IO complex equipment "i_87181" 
   (Please refer to FAQ-076 at www.icpdas.com - FAQ - Software - ISaGRAF - 076)
2. Modify the scan-time-increase problem when connecting Ru-87P4 in Checksum enabled and 
   hostwatchdog enabled mode . (Sep.06,2007)
3. Add protection codes in Winconio.c when connecting i-87K or i-8K I/O boards 
   in the wrong slot No. larger than slot 7 (Sep.08,2007)


**************************************************************************
*  3.41 
**************************************************************************
1. Fix a communication bug. When HMI requests more than 255 bits of the W-8xx7 's COM2/3,
   the ANS[ ] buffer 's max. index is not enough. This version increase it from 1024 to 4096.
   Oct.05,2007 by Chun
2. Add I/O board "i87017A5" to support the i-87017W-A5 IO module in slot 1 to 7 which can 
   measure +/- 50 VDC or +/- 150 VDC.
3. Add C-function block "i87017A5" which can get the value of the RS-485 remote I/O module i-87015W-A5 in
   i-87K4/5/8/9 expansion unit.
4. Add C-function block "i_87058" for RS-485 Remote i-87058 modules.


**************************************************************************
*  4.01 , Apr.25,2008
**************************************************************************
1. Fix a FRNET bug. FRNET D/O variable can output its initial value now. 
2. Release an easy programming method of FRNET I/O. Add two function blocks "Fr_16di" &
   "Fr_16do" . Please refer to  www.icpdas.com > FAQ > Software > ISaGRAF > 082 for more 
   information and demo program - "wdemo_70" .
3. Add function block "i7017ra5"
4. Support CAN BUS converter i-7530.  (source code: search "CAN_BUS_7530" )
   Please refer to  www.icpdas.com > FAQ > Software > ISaGRAF > 086 for more 
     information and demo program -  "wdmo_71a"  to  "wdmo_71e" 
   Add I/O complex equipment - "CAN7530"
   Add c-functions  -  "CAN_BY_W"  ,  "CANSTR_W"  and  "CANOP_ST"
   Add c-function block  -  "CAN_R"
5. Add function block "i87059"
6. No more supporting old retaine variables. 
   Please use new retaine method, like the following.

   (* To_Retain is declared as Internal Boolean with initial value of TRUE *)
   if  To_Retain  then   (* only run once in 1st PLC scan *)
     To_Retain := False ;
     TMP  :=  Retain_B( B1 , 1 )  ;      TMP  :=  Retain_B( B2 , 2 )  ;  
     TMP  :=  Retain_N( N1 , 1 )  ;      TMP  :=  Retain_N( N2 , 2 )  ;  
     TMP  :=  Retain_F( F1 , 1 )  ;      TMP  :=  Retain_F( F2 , 2 )  ;  
     TMP  :=  Retain_T( T1 , 1 )  ;      TMP  :=  Retain_T( T2 , 2 )  ;  
   end_if ;

7. Modbus Master code move to running in the main thread, no more running in one 
   another thread. (Search "Feb.27,2008" )
8. Add "SO_KEEPALIVE" mechanism to TCP socket. (search "Mar.12,2008")
9. Remove the "Cycle to Cycle" running mode. Now only supports "Real Time" mode.
10. Add function blocks:   (search "Mar.31,2008")
   i7017z10 : to measure 10-Ch. differential Voltage and Current input of i-7017z
   i7017z20 : to measure 20-Ch. single-end Voltage input of i-7017z.
   Note:
      1. 20-ch. mode doesn't support current input
      2. Each channel can set to different Range type code. 
11. modify "COM_MRTU" function to support COM5 ~ COM8 when the "RTU_slav" in I/O connection 
   window is enabled.


**************************************************************************
*  4.02 , May.28,2008
**************************************************************************
1. Support "i_87089" VW sensor Master board (Vibration Wire).  
   Please refer to www.icpdas.com > FAQ > Software > ISaGRAF > 091.
2. Fix a bug of "SYSDAT_W" and "SYSTIM_W" . The old version has problem when
   setting date and time both at the same time.

   
**************************************************************************
*  4.03 , Jul.16,2008
**************************************************************************
1. Support "mbus24r" and "mbus24r1" to read max. 24 words or max. 384 bits
   from Modbus device.
2. Increase the waiting time from 2 to 5 to prevent the i-8KE8-MTCP + i-87019 's rack status fluctuating
   in the I/O connection - i8ke.
3. Fix a bug that "RDN" can not work with the "Ebus_m" and "Ebus_s"
   (Note: W-8x47 supports Ebus in its LAN2 port. Not LAN1 port)


**************************************************************************
*  4.04 , Aug.14,2008
**************************************************************************
1. Increase the 2-byte-timeout to prevent the COM2 communication un-stable problem
   in ISaGRAF V3.55 debugger windows. (Search "Jul.24,2008")

2. Add IO board "Flow_Ctr" Type = 1 at COM2 port. Please refer to the description of IO board "Flow_Ctr"

3. Fix a Modbus Master bug in the driver version 4.03. 
  (The mbus_n_r, mbus_nr1, mbus_r , mbus_r1 can not get correct value in version 4.03)


**************************************************************************
*  4.05 , Sep.04,2008
**************************************************************************
1. Fix a bug when using i-87181 in slot 7

2. Fix a controller-hanging problem when using many serial COM ports to connect 
   serial devices.

3. Fix a hot-plug problem of i-87K High profile A/I cards in slot 1 thru. 7.
   Old version will get a value of "-32768" in some channels when plugging the 
   i-87K High profile A/I card.


**************************************************************************
*  4.06 , Nov.13,2008
**************************************************************************
1. Fix a bug of retaine variable in S-256 / 512. Old version may have error 
   when retainning both REAL value and Timer value.

2. Modify SerialComm_V2.c & tats8lv2.c for safety. (search "Sep.19,2008")

3. Modify the priority of "hThread_COM" Thread from 117 to 115. (search "Nov.12,2008" in tast0mai.c)

4. Re-install the ethernet driver if Modbus TCP/IP is not more connected. (search "Nov.13,2008" in RDN.c , tats8lv2.c)


**************************************************************************
*  4.07 , Dec.15,2008
**************************************************************************
1. Reduce the USB Mouse priority from 101 to 125 to prevent the USB problem to 
   make the ethernet and USB mouse failed.
   (To make it work, the new ISaGRAF driver should run once and then re-cycle the power once.
    After that, the new modified USB Mouse priority is changed and saved in the registry)

2. Supports i-8080W cards. It supports fast frequency update rate than the i-8080. 
   It is about four signal-input-cycle to upadte once . For ex. if the signal is 1KHz, it will
   update the frequency value once about 4 ms. (but if the ISaGRAF PLC scan time is 10 ms, 
   it update the frequency value in 10 ms, not 4ms. because 10 > 4 ) . 
   If the signal is 10Hz only, it will update once about 400ms.

   To use the i-8080W card, please connect the "i_8080w" in the ISaGRAF IO connection windows.
   (not "i_8080", it's for i-8080 card) . 
   If you can not find the ISaGRAF IO definition of the "i_8080w" , please visit 
   ftp://ftp.icpdas.com/pub/cd/wincon_isagraf/napdos/isagraf/ark/   to download the "i_8080w.xia" .
   Then restore it to your PC / ISaGRAF.

3. Accept old i-8017HS and current i-8017Hs (around Nov.25,2008, firmware 4) and future i-8017HS (firmware after 4)   

4. Add "Mbus_XR" and "Mbus_XR1" function blocks to read max. 120 words or 60 long-integers or
   60 Reals from Modbus RTU / ASCII devices. Please refer to 
    www.icpdas.com > FAQ > Software > ISaGRAF > 101


**************************************************************************
*  4.09 , Feb.05,2009
**************************************************************************
1. If the bus7000b at COM3 has communication problem, it will auto re-install the COM3 port once
   in 30 seconds later.
   (Search "Jan.16,2009"  in  SerialComm_V2.c  and  winconio.c)
2. Fixed a bug in "RTU_Slav" which makes I-87K cards in slot 0 ... 7 no work .
   (search "Feb.04,2009" in winconio.c)
3. Supports c-function :  "ether_en"  to disable / enable  Modbus TCP/IP slave. Default is enabled.
   (search "Feb.05,2009" in tats8lv2.c , taio0ker.c , ether_en.c , ether_en.h & grus0lib.c)


**************************************************************************
*  4.10 , Mar.06,2009
**************************************************************************
1. The "ether_en( )" function now can disable / enable the Modbus TCP/IP slave function.
   (default is enabled)
   For example, the following ST statement can disable it when "enable_MBTCP" is False. 
   However enable it when "enable_MBTCP" is True.
      (* Please declare "enable_MBTCP" as a boolean variable and init as TRUE *)
      TMP := ether_en( enable_MBTCP) ;
2. Add special usage of  W_MB_ADR( 0 , 9991 , 1) and W_MB_ADR( 0 , 9991 , 0)  and  R_MB_ADR( 0 , 9991 )
  The  W_MB_ADR( 0 , 9991 , 1 )  is to enable the control of I-8KE8-MTCP I/O .
  The  W_MB_ADR( 0 , 9991 , 0 )  is to disable the control of I-8KE8-MTCP I/O .
  ( If user has connectted the "i8ke" in the I/O connection windows, it is enabled by default.
    Then when disable it by using  W_MB_ADR( 0 , 9991 , 0 ) , the W-8xx7 or the WP-8xx7 controller
    will lose the control of its connectted I-8KE4-MTCP and I-8KE8-MTCP I/O )
  For example, use can can call below ST statment to disable / enable the control of I-8KE8-MTCP.
      (* The "enable_8KE8" should be declared as a boolean variable and init as TRUE *)
      if  enable_8KE8  then
         TMP := W_MB_ADR( 0 , 9991 , 1 ) ;   (* enable it *)
      else
         TMP := W_MB_ADR( 0 , 9991 , 0 ) ;   (* disable it *)
      end_if  ;
  To Read the current control state of the connectted I-8KE8-MTCP, plese use  R_MB_ADR( 0 , 9991) .
  For example, the below ST statement return  "con_state_8KE8" as  1: enabled  ,  0: disabled .
      (the "con_state_8KE8" should be declared as an integer variable )
      con_state_8KE8  :=  R_MB_ADR( 0 , 9991 ) ;
  Please refer to the following Web sites for more information.
    www.icpdas.com > ISaGRAF SoftLogic PAC > FAQ > 042 
3. Reduce each UDP package size to be less than 1400 bytes when enable the 
   redundant system.  And also increase the total allowed redundant data amount from 
   10,000 bytes to 16,000 bytes.
   (search Mar.05,2009 in rdn.c and rdn.h)
4. Support I-8084W. 
   Please refer to www.icpdas.com > FAQ > Software > ISaGRAF > 100


**************************************************************************
*  4.11 , Mar.30,2009
**************************************************************************
1. Fix one Ebus bug.
   (Search "Mar.24,2009" in winconio.c) 
2. Ebus using 255.255.255.0
   (Search "Mar.25,2009" in winconio.c) 
3. Re-install RDN send socket 0 ~ 3 if sending them failed.
   (Search "Mar.26,2009" in winconio.c) 


**************************************************************************
*  4.12 , Apr.13,2009
**************************************************************************
1. increse sleep time if connecting more i-8KE4/8-MTCP.
2. Ebus using xxx.xxx.xxx.255 to send
3. Add "Hex_Val" function to convert Hex. string to an integer


**************************************************************************
*  4.12A , Apr.21,2009
**************************************************************************
1. Fix a bug of Retain_X and Retain_F (older version always return False)


**************************************************************************
*  4.13 , Jun.02,2009
**************************************************************************
1. Fix code in the i-87K D/I counter in slot 1 ~ 7, the original reset_counter command is not good. 
   Modify the counter value of i-87K D/I counter in slot 1 ~ 7 to 32-bit value ( 0 ~ 2,147,483,648 )
2. Default enable Watchdog as 60 seconds. User can modify it by using the "wdt_en" function
3. If the commnunication of the "COM1 + i87K" fail, reset COM1
4. The ISaGRAF driver will plus one integer value by 1 every second when the project is running. 
   And then VB.net or C#.net or EVC++ program can read this value by Quicker.dll (addr. = 8201 to read this value) .
   If the ISaGRAF project stop, this integer value remain at its last value. So the VB.net program can detect 
   the value is not changed and decide to reset it if the value last for more than some specified seconds.  
   How to reset ? 
   Using VB.net or C#.net or EVC++ program to write a value 12345 to Quicker.dll 's Addr. 8202 to reset it.
5. fix a bug in ethernet communication when enable the IO complex equipment "vip"
6. reset W-8x37 's ethernet driver if detecting its communication problem in 120 seconds .


**************************************************************************
*  4.13A , Jun.12,2009
**************************************************************************
1. Add c-function "Averag_N" and "Averag_F". Please refer to 
   www.icpdas.com > FAQ > Software > 099
2. Increase the timeout setting of the remote i-7000 watchdog command from 1 loop 
   to 6 loops to support ZigBee wireless converter - ZB-2550P / ZB-2551P
   (www.icpdas.com > FAQ > Software > 110)


**************************************************************************
*  4.13B , Jun.23,2009
**************************************************************************
1. Add c-function "Mbus_en" . 
   It works only when the I/O complex equipment - "mbus" or "mbus_asc" is connected.
   Be careful to use the "Mbus_en" with the "RDN_new" and "RDN" , they all have the power 
   to enable / disable the "Mbus" and "Mbus_asc" port. If giving un-proper "Mbus_en" command 
   when the "RND_new" and "RND" is working, it may generate un-proper behavior.


**************************************************************************
*  4.15 , Aug.19,2009
**************************************************************************
1. Modify the code of I-8K parallel digital output board to output only when any channel 
   state is changed.
2. Increase the max. number of Boolean retain variable from 1024 to 2048.
3. Reset the Ethernet driver when detecting Ethernet communication problem.
4. Reduce the max. accepting ethernet socket from 32 to 10 .
5. Reset the COM2 port when detecting COM2 's Modbus RTU slave communication problem.
6. Reset the PAC when COMM. Thread is dead. (It seems impossibe, however add it for safety)


**************************************************************************
*  4.16 , Nov.16,2009
**************************************************************************
1. Fix a bug of using I-87005W in slot 0 to 7 . 
2. Fix a convesion bug of the I-87005W 's range type = 60 . 
3. Add two parameter for IO complex-equipment - i_8084W > FREQ8 . 
   The "Min_Update_Time" and "Low_High_Auto" .


**************************************************************************
*  4.17 , Dec.01,2009
**************************************************************************
1. Improve the Modbus TCP/IP Slave communication. Add more exception check.


**************************************************************************
*  4.18 , Jan.21,2010
**************************************************************************
1. The "DI_CNT" function block now supports I_8050. 
   Must connect the "i_8050" in the IO connection windows and setting the 
   first 8 channels as Digit inputs . For ex. setting the "config" parameter as below.
   0 :     all 16 channels are D/I
   FF00 :  Ch.1 to 8 are D/I , Ch.9 to 16 are D/O
   F000 :  Ch.1 to 12 are D/I , Ch.13 to 16 are D/O
2. Increase the max. "N_" parameter of function block "Averag_F" and "Averag_N"
   from 20 to 50 .
3. The "Mbus_N_W" support writting 1 word by Modbus command 16 (10h).
   Set "NUM_W_" parameter as -1 to write 1 word by Modbus command 16 (10h).

   Original function :
   When set "NUM_W_" parameter as 1, it write 1 word by Modbus command 6 .
   When set "NUM_W_" parameter as 2 ~ 4, it write 2 ~ 4 words by Modbus command 16 (10h).

   New:
   When set "NUM_W_" parameter as -1, it write 1 word by Modbus command 6.
4. If assign "port_no" of "mbus" and "mbus_asc" less than 100 in the IO connection, it 
   will apply the "delay_time" as 100 ms (the old version is 0 ms).
   If user wish to set the "delay_time" as other value, please set this "port_no" larger than 100.
   For ex., setting the "port_no" as 2103 means using COM3 and applying the "delay_time" as 21 ms.


**************************************************************************
*  4.18B , Feb.10,2010
**************************************************************************
1. Add two c-functions "aver_n" and "aver_f" to calculate the moving average of 
   an integer or real variable.
2. Fix a bug of file operation c-functions when the specified file (name or parh) 
   doesn't exist.


**************************************************************************
*  4.19 , Mar.09,2010
**************************************************************************
Same as the 4.18B version . 


**************************************************************************
*  4.21 , Jun.29,2010
**************************************************************************
1. Make the RS-485 remote I/O to be scaned more frequent if the PLC_MODE(mode) 
   setting is mode = 1:slow  to  mode = 3:slowest.
2. Clear all RS-485 remote data buffer as 0 when program starting up.
3. Support the I-87005.


**************************************************************************
*  4.22 , Nov.04,2010
**************************************************************************
1. Fix a problem when connecting with the Intouch SCADA via Modbus TCP .

