Ocean KTA-282 User Manual

KTA-282 Modbus TCP Weather Station Gateway
Connects a Davis VantagePro2 or Vantage Vue to a Modbus network Modbus RTU over RS-485 and Modbus TCP/IP over Ethernet compatible Easy Modbus TCP/IP configuration via webpage, Modbus registers, or onboard switches Supports three simultaneous Modbus TCP masters. Various selectable metric and imperial unit conversions Compatible with new Davis firmware; provides additional weather data Allows weather station configuration directly
Overview
The KTA-282 Modbus TCP Weather Station Gateway allows the easy connection of a PLC (Programmable Logic Controller), RTU (Remote Telemetry Unit) or SCADA System to a Davis Instruments Weather Station. Using the Modbus RTU (Binary), or Modbus TCP/IP (Ethernet) protocols, it enables a programmable controller to monitor and carry out actions based on wind speed, wind direction, temperature and many other weather based variables. The KTA-282 Modbus TCP Weather Station Gateway is a major upgrade to our popular GWY-141 Modbus­VantagePro2 Gateway. It provides all the functionality of the GWY-141, with the following improvements:
Addition 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
current settings, weather data, and communications statuses.
o Can be interrogated over HTTP to return Modbus register values in XML format
Allows all 125 registers to be polled at once – previously limited to 30.
Supports the new LOOP 2 command in compatible devices
1
(VantagePro 2 firmware V1.90 or later, and
Vantage Vue). This provides an additional 16 packets of previously unavailable weather data.
Provides a method to setup the weather station for first use, without the need to connect it to your PC.
Notes: 1. The Weatherlink cable can be used to update the firmware of your weather station; allowing it to respond to the loop 2 command.
Device Compatibility
The KTA-282 is compatible with the following Davis Instruments weather stations (Davis Instruments product numbers in bold):
6152C Cabled VantagePro2 6162C Cabled VantagePro2 Plus 6152 Wireless VantagePro2 6162 Wireless VantagePro2 Plus 6153 Wireless Vantage Pro 2 Fan Aspirated 6163 Wireless Vantage Pro 2 Plus Fan Aspirated 6250 Vantage Vue 6316 Wireless Weather Envoy 6316C Cabled Weather Envoy
7/05/2013 www.oceancontrols.com.au Page 1 of 25
KTA-282 Modbus TCP Weather Station Gateway
Contents
Overview........................................................................................................................................................1
Device Compatibility..................................................................................................................................... 1
Getting Started............................................................................................................................................... 4
Weather Station Set Up.............................................................................................................................. 4
Configuring the KTA-282.......................................................................................................................5
Configuring Modbus...............................................................................................................................6
Weather Station Data..................................................................................................................................... 9
Loop 1 Data................................................................................................................................................9
Loop 2 Data..............................................................................................................................................10
Functionality................................................................................................................................................ 11
Unit Conversions......................................................................................................................................11
Weather Station Polling Period................................................................................................................ 12
Weather Station EEPROM Write (Advanced users)................................................................................ 12
Example (BAR= command):................................................................................................................ 13
Example (EEWR 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...........................................................................................................................18
TCP/IP Switch Settings........................................................................................................................ 18
Weather Station Simulator....................................................................................................................18
Other Menu Items.....................................................................................................................................18
Change Conversions............................................................................................................................. 18
Change TCP/IP Settings....................................................................................................................... 18
Write EEPROM Values to Weather Station..........................................................................................18
Troubleshooting........................................................................................................................................... 19
Power Connected..................................................................................................................................19
Weather station Comms........................................................................................................................19
Ethernet.................................................................................................................................................19
RS-485.................................................................................................................................................. 19
Troubleshooting Procedure...................................................................................................................... 19
Appendix A.................................................................................................................................................. 22
Complete Holding Register Listing...................................................................................................... 22
7/05/2013 www.oceancontrols.com.au Page 2 of 25
KTA-282 Modbus TCP Weather Station Gateway
Getting Started
Certain generic terms are used throughout this manual to refer to equivalent hardware.
Terminology Refers To
“Weather station” Vantage Pro 2 console
Vantage Vue console Envoy (wired or wireless)
“Sensors” Any weather sensors your weather station communicates with. This is
commonly a bunch of sensors packaged together as an Integrated Sensor Suite (ISS) but can also include:
ISS Plus (ISS + UV & solar radiation) Wireless Temperature Sensor Temp/Humidity Sensor Leaf & soil moisture/temp
Or individual sensors (not an exhaustive list):
Leaf wetness Solar radiation UV Anemometer Rain Collector Temperature
“Weatherlink” The serial WeatherLink expansion cable. Required for weather station
connection to the KTA-282. Can also be used to update the firmware of your console.
“Gateway” The KTA-282 Modbus TCP Weather Station Gateway “Controller” The Modbus device you are using to poll the KTA-282. “Weather station EEPROM”
Persistent memory held inside the weather station used to store factory calibration values, location specific data, and other configuration values. It is this memory that is set during the setup of your weather station for first 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 need to fit the WeatherLink in this procedure. This is now the best time to setup your weather station for first use. Your Davis documentation will detail this process. If you have a weather station with a screen you can follow the prompts after entering “setup” mode, otherwise the setup process can be done by connection to a PC. The KTA-282 also offers a method for setting up your weather station (by directly writing to registers), however it is designed for advanced users to alter calibration values and is not recommended for first use configuration. The following values are typically set during this procedure:
IDs, and retransmission of wireless sensors (if applicable).
Date and time
Latitude and longitude
Daylight savings
Elevation
Wind cup size (large is standard)
Rain collector size (US models: 0.01 in, UK models: 0.2 mm. This will typically only need to be changed if a
metric adapter is fitted to a US unit)
Rain season start
Serial Baud Rate (ensure it is at default: 19200. No other baud rates are supported by the gateway)
Continue the set up process by connecting all necessary cabling. A generic set up is shown in the diagram below
7/05/2013 www.oceancontrols.com.au Page 3 of 25
KTA-282 Modbus TCP Weather Station Gateway
(depending on your particular product, connections may differ slightly).
Figure 1: Typical weather station set up
Configuring the KTA-282
Connection 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
WeatherLink cable
RJ45 Socket Ethernet Port OC1 Open Collector Output 1 OC2 Open Collector Output 2
Table 2: Connections to the KTA-282
LED Function
7/05/2013 www.oceancontrols.com.au Page 4 of 25
KTA-282 Modbus TCP Weather Station Gateway
Red Tx LED (next to RS-485 terminal) Indicates serial communications received on RS-485 Green Rx LED (next to RS-485 terminal) Indicates serial communications sent (Modbus RTU) on
RS-485
Green Rx LED next to DE-9 connector Indicates serial communications received (from weather
station) on the serial port
Red Tx LED next to DE-9 connector Indicates serial communications sent on the serial port Green LED (right side) on RJ45 socket Link LED. Always on to indicate good status for
Ethernet, flashes to indicate activity.
Yellow LED (left side) on RJ45 socket FDX LED.
On = Full duplex Ethernet Off = Half duplex Ethernet
Green Rx LED next to RJ45 socket Flashes when packets are received on the Ethernet port. Red Tx LED next to RJ45 socket Flashes when packets are sent on the Ethernet port.
Table 3: KTA-282 LED Functions
Provide power to the KTA-282 via the V+ and GND screw terminals. Without anything else connected, you should 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) to the male D9 port of the KTA-282. You should now see an accompanying green light every time the red LED flashes. This indicates the card is successfully receiving data from the weather station.
Configuring Modbus
Modbus RTU
Serial Modbus is provided on RS-485. The communications settings for this port are set using 8 DIP switches next to the DE-9 Socket. Any changes to the switches won’t take effect until the KTA-282 is power cycled.
Modbus RTU
Address
Switch 1 Switch 2 Switch 3 Switch 4
1 OFF OFF OFF OFF 2 ON OFF OFF OFF 3 OFF ON OFF OFF 4 ON ON OFF OFF 5 OFF OFF ON OFF 6 ON OFF ON OFF 7 OFF ON ON OFF 8 ON ON ON OFF
9 OFF OFF OFF ON 10 ON OFF OFF ON 11 OFF ON OFF ON 12 ON ON OFF ON 13 OFF OFF ON ON 14 ON OFF ON ON 15 OFF ON ON ON 16 ON ON ON ON
Table 4: Modbus RTU address switches
Baud Rate Switch 5 Switch 6
2400 OFF OFF 4800 ON OFF 9600 OFF ON
19200 ON ON
Table 5: Modbus RTU Baud Rate switches
7/05/2013 www.oceancontrols.com.au Page 5 of 25
KTA-282 Modbus TCP Weather Station Gateway
Parity Switch 7 Switch 8
None OFF OFF Even ON OFF Odd OFF ON
Bootloader
1
ON ON
Table 6: Modbus RTU Parity switches
Notes:
1. The bootloader is an advanced function that allows firmware updates to be deployed in the field.
Modbus TCP/IP & Ethernet Webserver
To communicate over a TCP/IP network, the KTA-282 needs five pieces of information:
1. The Internet Protocol (IP) address of the KTA-282 within the network. Set by the user
2. The Subnet Mask of the network. Set by the user
3. The Default Gateway of the network. Set by the user.
4. A unique MAC address. Shipped preloaded by Ocean Controls.
5. The TCP/IP port the request is being sent on. For the KTA-282, Modbus TCP/IP is on port 502, and the
webserver (HTTP) is on port 80.
These settings themselves can be set by one of three available methods:
1. 8 DIP switches next to the Ethernet Connector
2. Modbus registers (using either Modbus RTU on RS485 or Modbus TCP/IP on Ethernet)
3. The webpage.
Configuration Using Switches
Switch one determines where 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 switch on, the settings are loaded from internal memory - saved after being previously configured via the webpage or Modbus.
Power Up Configuration Switch 1
OFF TCP/IP settings from switches
ON TCP/IP settings from internal persistent memory
Table 7: TCP/IP mode switch
Switch two is the “panic switch”, returning the KTA-282 to default if the user writes incorrect values or doesn’t otherwise know what settings the card currently possesses. To use, flick the switch on, hold for one second, and turn back off again. Don’t leave this switch on; the card will be constantly resetting and therefore
unresponsive.
Default Values
IP Address: 192.168.1.100
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1
Reset to Default Switch 2
OFF No action
ON TCP/IP settings reset to default
Table 8: TCP/IP Reset Switch
Switches three and four choose between four different TCP/IP schemes commonly used in private address space.
TCP/IP Base Settings Switch 3 Switch 4
IP Address: 192.168.1.x OFF OFF
7/05/2013 www.oceancontrols.com.au Page 6 of 25
KTA-282 Modbus TCP Weather Station Gateway
Subnet Mask: 255.255.255.0 Default Gateway: 192.168.1.1 IP Address: 10.0.0.x Subnet Mask: 255.0.0.0 Default Gateway: 10.0.0.1
OFF ON
IP Address: 10.1.1.x Subnet Mask: 255.255.0.0 Default Gateway: 10.1.1.1
ON OFF
IP Address: 172.16.0.x Subnet Mask: 255.240.0.0 Default Gateway: 172.16.0.1
ON ON
Table 9: TCP/IP Subnet switches
The final four switches determine the last octet of the IP address.
Last Octet
(IP Address)
Switch 5 Switch 6 Switch 7 Switch 8
100 OFF OFF OFF OFF 101 ON OFF OFF OFF 102 OFF ON OFF OFF 103 ON ON OFF OFF 104 OFF OFF ON OFF 105 ON OFF ON OFF 106 OFF ON ON OFF 107 ON ON ON OFF 108 OFF OFF OFF ON 109 ON OFF OFF ON 110 OFF ON OFF ON 111 ON ON OFF ON 112 OFF OFF ON ON 113 ON OFF ON ON 114 OFF ON ON ON 115 ON ON ON ON
Table 10: TCP/IP IP Address switches
Configuration Using Webpage
The KTA-282 has an inbuilt web server that can service HTTP requests on port 80. Simply point your web 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 populated with the Gateway’s current values. These can be altered and written to the KTA-282. After writing these values, you will likely want to change TCP switch 1 to read from memory on the next power up, otherwise the TCP/IP configuration will read from the switches.
Configuration Using Modbus (RTU or TCP/IP)
The KTA-282 has 13 Modbus holding registers reserved for configuration. These settings can be read and written using either serial Modbus (RTU on RS-485) or Modbus TCP/IP.
Modbus Register Function
80 1st octet IP Address 81 2nd octet IP Address 82 3rd octet IP Address 83 4th octet IP Address 84 1st octet Subnet Mask 85 2nd octet Subnet Mask 86 3rd octet Subnet Mask 87 4th octet Subnet Mask 88 1st octet Default Gateway 89 2nd octet Default Gateway 90 3rd octet Default Gateway 91 4th octet Default Gateway 92 Commit to Gateway (write a 1)
Table 11: Modbus TCP/IP Configuration Registers
7/05/2013 www.oceancontrols.com.au Page 7 of 25
KTA-282 Modbus TCP Weather Station Gateway
Each register holds one octet of the TCP/IP configuration. These can be read to view the current TCP/IP settings, or written to set the values. Once all twelve octets are manually set, the settings are committed to the gateway by writing a one to holding register 92. Make sure all registers are written with correct values before they are committed to the gateway.
Weather Station Data
The gateway operates as a Modbus slave. To access the holding registers in the gateway, the PLC or RTU must be configured as a Modbus Master. Using Modbus Function 3, the PLC can read the Holding Registers.
Loop 1 Data
Data returned by the loop 1 command. All supported Davis Instruments hardware will populate these fields.
Holding Register Address
40,000+
No. of
Registers
Description Multiplier Units Notes
1 1 Indicates the current 3-hour
barometer trend.
1
2 1 Packet Type, always 0 3 1 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 Humidity 1 % 7 1 Outside Temperature 0.1 °F 8 1 Wind Speed 1 mph
9 1 10Min Average Wind Speed 1 mph 10 1 Wind Direction 1 degrees 11 4 7 Extra Temperatures 1 °F 15 2 4 Soil Temperatures 1 °F 17 2 4 Leaf Temperatures 1 °F 19 1 Outside Humidity 1 % 20 4 7 Extra Humidities 1 % 24 1 Rain Rate 0.01 Inches/h
our
2
25 1 UV Index 1 26 1 Solar Radiation 1 W/m
2
27 1 Storm Rain 0.01 Inches 2 28 1 Current Date Of Storm Rain 1 3
29 1 Day Rain 0.01 inches 2 30 1 Month Rain 0.01 inches 2 31 1 Year Rain 0.01 inches 2 32 1 Day ET 0.001 inches 2 33 1 Month ET 0.01 inches 2 34 1 Year ET 0.01 inches 2 35 2 4 Soil Moistures 1 centibar 37 2 4 Leaf Wetnesses, 0 to 15, 0 = Very
Dry, 15 = Very Wet
1
39 1 Inside Alarms 1 40 1 Rain Alarms 1 41 1 Outside Alarms 1 42 4 Extra Temp Hum alarms 1 46 2 Soil and Leaf Alarms 1 48 1 Transmitter Battery Status 1 49 1 Console Battery Voltage 1 Volts
7/05/2013 www.oceancontrols.com.au Page 8 of 25
Loading...
+ 17 hidden pages