KMA Weather Data Read is the driver to communicate with 'kma.go.kr' weather service of KMA.
<Figure 1> is read setting example of KMA Weather Data Read communication driver.
<Figure 1> Read setting example of KMA Weather Data Read communication driver |
Device part of <Figure 1> input device type(TCP/IP), IP address or url name( www.kma.go.kr), service port of TCP/IP(80) respectively.
Also, you can set default site number( site number of KMA, default : 4113357000), read interval of each read schedule(3 ~ 6000 second, default : 60).
Read schedule of KMA Weather Data Read communication driver
Read schedule setting parameters are as follows:
1) station – don't care.
2) reading site number – site number of site such as 4113357000. ( site number : refer to KMA home page, blank = use default site number )
3) read address – don't care.
4) Save start address for Communication Server – Saving start address of Communication Server.
5) Read size – fixed to 1.
Read schedule example)
READ, 0, 4113357000, 0, 0, 1,
READ, 0, 4113356000, 0, 500, 1,
<Table 1> is data saving address and readed value for each reading site number of KMA Weather Data Read communication driver.
reading site number |
Contents |
Data saving value of Communication Server |
Remarks |
site number of KMA |
read of weather data from KMA |
Saving Start Address + 0 : description of KMA service Saving Start Address + 1 : type of KMA service Saving Start Address + 2 : contents of KMA service ... |
save the readed data to WORD/DWORD/FLOAT/ DOUBLE/INT64 or STRING memory, <tm> data = save year, month, day, hour, minute |
<Table 1> Data saving address and readed value for each reading site number of KMA Weather Data Read communication driver¿ë |
KMA Weather Data Read communication driver store the same data in WORD, DWORD, FLOAT, DOUBLE, INT64, STRING memory, but the data format are different.
If you click the icon in protocol option part at <Figure 1>, you can see the dialog box such as <Figure 2>. you can also set read schedule by using this part.
<Figure 2> Example of KMA Weather Data Read communication driver¡¯s Option dialog box |
You can set read schedule by using , , button and listbox of <Figure 2>.
Also, you can set default site number, read interval of each read schedule by using 'Default Site Number', 'Read Interval".
<Figure 3> Example of KMA Weather Data Read communication driver¡¯s read schedule Add/Edit dialog box |
When you click Add button or Edit button in dialogue box of <Figure 2>, dialogue box of <Figure 3> is shown.
You can read weather data by using 'write settings'.
Digital Write
Digital write and analog write have the same setting parameters except output value.
Analog Write
Analog write setting parameters are as follows:
1) PORT Port no. (0 ~ 255)
2) STATION don't care.
3) Address saving start address of readed weather data. ( 10 digit unit address )
4) Extra1 site number of site such as 4113357000. ( site number : refer to KMA home page, blank = use default site number )
5) Extra2 don't care.
Write example 1)
PORT : 0 STATION : 0 ADDRESS : 1000 EXTRA1 : 4113356000 EXTRA2 : 0
The setting parameter shown above is example of weather data for 4113356000 site address.
After reading, the readed data save from 1000 WORD, DWORD, FLOAT, DOUBLE, INT64, STRING memory.