Ocean KTA-282 Скачать руководство пользователя страница 12

                                    

 

KTA-282 Modbus TCP Weather Station Gateway

The weather station requires the pressure to be in thousandths of an inch mercury. Therefore 1013.25 mbar 
becomes 29.9 inHg; 29900 mInHg. The elevation must be in feet; 204 metres becomes 670 feet.
Write 29900 to Modbus register 115, and 670 to register 116. Commit the values to the weather station by writing 
register 117 to 1.

Note: the BAR= command must send both arguments to the weather station. If one of elevation or barometer 
calibration does not need to be written, you must manually write that register to zero before sending the BAR= 
command.

Example (EEWR command):

The user desires the latitude to be set for Melbourne, Australia. The calculation is as follows:
Melbourne lies at 37.7° South. Southern latitudes are represented in Davis weather stations’ as negative tenths of a
degree (-377). As an unsigned number in 2’s compliment this is 65159 or FE87 in hexadecimal.
To write this figure to the weather station, two commands will have to be used – one for each byte. The latitude is 
held in EEPROM location 0B in the weather station and is two bytes long. Values are 

little endian (least significant 

byte first)

, therefore the following two commands must be sent:

EEWR 0B 87

EEWR 0C FE

This is done with the Modbus interface as:
Write 0B [or decimal 11] to register 111 and 87 [decimal 135] to register 112. To send the command, write a 1 to 
register 113. To confirm the EEPROM write as a success, read register 114. Success will be represented with a 1.
To write the second command, first write register 114 to zero (so that success can be confirmed on the next write). 
Follow the same procedure as before: 0C [decimal 12] (the next address in the weather station's EEPROM) to 
register 111, FE [decimal 254] to register 112, and a 1 to register 113. Register 114 will again change to a 1 upon 
EEPROM write success.
This completes setting the latitude of the Davis weather station.
Note: consult the 

EEPROM configuration settings

 section of “Vantage Serial Protocol Docs” on the Ocean Controls 

website for detailed information on the EEPROM.

Modbus TCP Manual Socket Severing

Some users have experienced some problems with their Modbus TCP connection failing after prolonged use 
(between days and months). If this is a problem for you, it may help to enable manual socket severing by 

writing a 

one to Modbus Holding Register 125

.

Modbus Holding 
Register

Name

Description

125

Modbus Socket 
Sever

1 =

 Automatically severs a Modbus TCP connection after

90 seconds of inactivity.

0 =

 Normal Modbus behaviour (socket remains open for 

the duration of the connection).

The issue is caused by the Modbus Master mishandling the Modbus connection. In this situation, the Master opens
a socket to the KTA-282 and begins communicating over Modbus TCP. At some point, the Master stops 
communicating on that socket, and tries to open another socket, 

without properly closing the first connection

Communications continue on the second socket. Again the Master stops communicating on the second socket, and
opens a third. The KTA-282 supports up to three simultaneous Modbus TCP connections, so at this point all comms
are OK. But  when it happens again, the KTA-282 will refuse the connection, because all sockets are occupied. The
only way to recover is to power cycle either the KTA-282 or the Modbus Master, and manually sever the sockets.

By writing a one to Holding Register 125, you are enabling manual socket severing. The KTA-282 monitors all open
connections, and if there is no actual traffic on a socket for 90 seconds, that connection is artificially forced to close.

Webpage

In addition to providing an interface to read and write the TCP/IP configuration values, the webpage also provides 
the user with a view of the current status of the KTA-282.

7/05/2013

www.oceancontrols.com.au

Page 12 of 25

Содержание KTA-282

Страница 1: ...ddition of Ethernet o Allows the KTA 282 to be polled by up to three Modbus TCP IP masters simultaneously o Provides a webpage whereby TCP IP settings can be easily monitored and altered Also shows cu...

Страница 2: ...command 13 Modbus TCP Manual Socket Severing 13 Webpage 13 XML Request 14 Open Collector Outputs PCB Rev 5 and later 16 KTA 282 PC Application 17 Configuring Communications 17 Serial Switch Settings...

Страница 3: ...use latitude longitude elevation etc Table 1 Davis Instruments Jargon Weather Station Set Up Begin by assembling your weather station and sensors using the documentation provided by Davis You will nee...

Страница 4: ...Description Vs Power Positive 8 to 28V DC 100mW COM Power Negative Ground D RS 485 Data D RS 485 Data GND Ground Male DE 9 Serial communications RS 232 between KTA 282 and Weather station via WeatherL...

Страница 5: ...see the red LED next to the DE 9 connector flash once every 5 seconds This confirms the card is on and functional Continue by connecting the DE 9 cable from your weather station via the WeatherLink t...

Страница 6: ...re the TCP IP settings are loaded from when power is applied to the KTA 282 With this switch off settings are loaded from the current values of the switches regardless of previous settings With the sw...

Страница 7: ...b browser to the IP Address of the KTA 282 to retrieve this page Below the current weather readings is a web form with provision to set the TCP IP settings of the KTA 282 The form fields will be popul...

Страница 8: ...Location in the archive memory where the next data packet will be written This can be monitored to detect when a new record is created 4 1 Barometer 0 001 inHg 5 1 Inside Temperature 0 1 F 6 1 Inside...

Страница 9: ...ther an estimation based on temperature and dewpoint Use as an indication only Loop 2 Data Only recent Davis Instruments hardware Vantage Pro 2 firmware V1 9 or later Vantage Vue will return the loop...

Страница 10: ...e to the latest firmware at oceancontrols com au The units of the readings can be changed by writing to the Modbus holding registers shown in table 16 The following table shows the multiplier and unit...

Страница 11: ...ocol Docs on the Ocean Controls website Each argument of these commands is coupled to a Modbus register Any weather station EEPROM can therefore be written using Modbus communications The BAR command...

Страница 12: ...hange to a 1 upon EEPROM write success This completes setting the latitude of the Davis weather station Note consult the EEPROM configuration settings section of Vantage Serial Protocol Docs on the Oc...

Страница 13: ...ngs will load from dynamic value This text will read either switches or memory based on the status of TCP switch 1 It is important to realise that the TCP IP settings may still be read from the switch...

Страница 14: ...ml Using a web browser with the gateway at its default address 192 168 1 100 registers xml Figure 4 Complete register listing HTTP request using browser Error Request If the GET request is of the wron...

Страница 15: ...urn On or Off 119 1 Direction Sets the direction of the switching behaviour 0 output active below setpoint 1 output active above set point 120 2 Register Sets the Holding Register containing the weath...

Страница 16: ...communications statuses o Modbus RTU over RS485 o Modbus TCP IP o Communications with the weather station Two buttons named bind all comms and release all comms These controls are designed mainly for...

Страница 17: ...d units using the dropdown boxes and commit the selections to the gateway using the Write to KTA 282 button Writes holding registers 105 to 108 Change TCP IP Settings Displays a screen that allows the...

Страница 18: ...port It should flash red roughly once every 5 seconds If so move to step 3 If not 1 Check the wires of the power supply are the correct way around 2 Probe the power terminals with a multimeter to ens...

Страница 19: ...twork to ensure the KTA 282 has a unique IP address within the subnet The best way to do this is via your router if applicable Otherwise you could power off the gateway and then send a ping request to...

Страница 20: ...nd go to properties 3 4 Click on Internet Protocol TCP IP and go to properties 3 5 Click on use the following IP address and set the values to IP Address 192 168 1 1 Subnet Mask 255 255 255 0 Default...

Страница 21: ...Extra Humidities 1 24 1 Rain Rate 0 01 Inches hour 25 1 UV Index 1 26 1 Solar Radiation 1 W m2 27 1 Storm Rain 0 01 Inches 28 1 Current Date Of Storm Rain 1 29 1 Day Rain 0 01 inches 30 1 Month Rain 0...

Страница 22: ...ctet Note 84 1 Subnet Mask 1st octet Note 85 1 Subnet Mask 2nd octet Note 86 1 Subnet Mask 3rd octet Note 87 1 Subnet Mask 4th octet Note 88 1 Default Gateway 1st octet Note 89 1 Default Gateway 2nd o...

Страница 23: ...memory write command is successful 117 1 Open Collector 1 register to monitor 118 1 Open Collector 1 threshold 119 1 Open Collector 1 Direction 0 down 1 up 120 1 Open Collector 1 register to monitor 1...

Страница 24: ...KTA 282 Modbus TCP Weather Station Gateway 7 05 2013 www oceancontrols com au Page 24 of 25...

Страница 25: ...KTA 282 Modbus TCP Weather Station Gateway 7 05 2013 www oceancontrols com au Page 25 of 25...

Отзывы: