K-Water communication driver is the driver to communicate with water level monitoring controller.
<Figure 1> is read setting example of K-Water communication driver.
<Figure 1> Read setting example of K-Water communication driver |
Device part of <Figure 1> input Com Port(COM1), Baud Rate(9600), Parity Bit(0), Data Bit(8), Stop Bit(1) respectively, according to controller.
In protocol option part, you can set the following: analog input tag for read of saved(old) data, equipment type( 0 : water level, 1 : rainfall controller, default = 0 ). Each argument is a comma-delimited.
Input example) AI_0000, 0,
= analog input tag for read of saved data : AI_0000, equipment type : water level controller.
K-Water communication driver read schedule
Read schedule setting parameters are as follows:
1) Year – Year value when DATA read command.
2) Read command – Read command. ( refer to <Table 1> )
TSYN - time syncronization ( syncronize with computer time )
RST - reset of equipment.
TIME - current time read of controller (year, month, day, hour, minute, second)
STS - status request (status 4 ~ 1)
DATA - read of saved(old) data(10 byte data)
LOG - read of Log data (year, month, day, hour, minute, status)
CURR or etc - read of current water level (current water level : 0 ~ 65535)
3) Read start address – Don't care.
4) Save start address for Communication Server – Saving start address of Communication Server.
5) Read Size – Fixed to 1.( refer to <Table 1> )
6) Extra2 – Month, Day when DATA read command, High 2digit = month, Low 2 digit = day.
7) Extra3 – Hour, Minute when DATA read command, High 2digit = hour, Low 2 digit = minute.
Read schedule example)
READ, 0, CURR, 0, 0, 1,
READ, 0, TIME, 0, 5, 6,
READ, 0, STS, 0, 15, 4,
<Table 1> is read command and contents of K-Water communication driver.
Read command | Contents | reading contents | Remarks |
TSYN | time syncronization | none | syncronize with computer time |
RST | reset of equipment | none | reset of controller |
TIME | current time read of controller | year, month, day, hour, minute, second | 6 data |
STS | status request | 4 status byte |
|
DATA | read of saved(old) data | 10 saved data | Station : year, Extra2 : month, day, Extra3 : hour, minute. |
LOG | read of Log data | year, month, day, hour, minute, status |
|
CURR or etc | read of current water level | current water level | 0 ~ 65535 |
<Table 1> Read command and contents of K-Water communication driver |
If you click the icon in protocol option part at <Figure 1>, you can see the help dialogue box such as <Figure 2>.
<Figure 2> Help dialog box of K-Water communication driver |
You can set 'analog input tag, equipment type and etc' at <Figure 2>.
You can set K-Water controller by using 'writing settings'.
Digital Write
Digital write setting parameters are as follows:
1) PORT Port no. (0 ~ 255)
2) STATION Year value when DATA read command( other command = don't care).
3) ADDRESS Read data saving address when TIME, STS, DATA, LOG, CURR write command( other command = don't care).
4) Extra1 Write command = TSYN, RST, TIME, STS, DATA, LOG, CURR or space. ( refer to <Table 2> )
5) Extra2 Month( high 2 digit ), day ( low 2 digit ) when DATA read command( other command = don't care).
Write example 1)
PORT:0, station:0, ADDRESS:0000, Extra1: TSYN, Extra2 : 0
The setting parameter shown above is time syncronization setting example.
Write example 2)
PORT:0, station:0, ADDRESS:0015, Extra1: TIME, Extra2 : 0
The setting parameter shown above is current time read of controller example.
After reading, the readed data save at 15 ~ 20 WORD memory. ( 15 = year, 16 = month, 17 = day, 18 = hour, 19 = minute, 20 = second )
Write example 3)
PORT:0, station:0, ADDRESS:0010, Extra1: CURR, Extra2 : 0
The setting parameter shown above is current water level read example.
After reading, the readed data save at 10 WORD memory.
<Table 2> is write command and contents of K-Water communication driver.
Write command | Contents | reading contents | Remarks |
TSYN | time syncronization | none | syncronize with computer time |
RST | reset of equipment | none | reset of controller |
TIME | current time read of controller | year, month, day, hour, minute, second | 6 data |
STS | status request | 4 status byte |
|
DATA | read of saved(old) data | 10 saved data | |
LOG | read of Log data | year, month, day, hour, minute, status |
|
CURR or etc | read of current water level | current water level | 0 ~ 65535 |
<Table 2> Write command and contents of K-Water communication driver |
Analog Write
Analog write and digital write have the same setting parameters except output value.
Note) Reading data time of DATA write command input 'STATION = year, EXTRA2 = high 2digit - month, low 2 digit - day, Output value = high 2 digit - hour, low 2 digit - minute'.
Write example 1)
PORT:0, station:2013, ADDRESS:0500, Extra1: DATA, Extra2 : 0508, Output value = 1630
The setting parameter shown above is saved data reading example that the
reading time is
After reading, the readed data save at 500 ~ 509(10 saved data ) WORD memory.