Xylem H-4191 User Manual

Model
H-4191
RS-232 to SDI-12 Interface Module
Owner's Manual
Version 1.0
75 West 100 South, Logan, Utah 84321 Phone: (435) 753-2212 Fax: (435) 753-7669 Web: http://www.waterlog.com E-mail: waterlog@waterlog.com
D E S I G N A N A L Y S I S A S S O C I A T E S , I N C .
75 West 100 South, Logan, Utah 84321 Phone: (435) 753-2212 Fax: (435) 753-7669 Web: http://www.waterlog.com E-mail: waterlog@waterlog.com
D E S I G N A N A L Y S I S A S S O C I A T E S , I N C .
Chapter 1
1.0 Introduction
The W to a personal computer or RS-232 terminal the H-4191 can be used to test and monitor SDI-12 sensors and data recorders. The H-4191 allows a programable logic controller (PLC), remote terminal unit (RTU) or other data collection device with a RS-232 interface to access SDI-12 sensors. The H-4191 provides the RS-232 to SDI-12 electrical interface, generates the critical bus timing, parity and command retries needed for the SDI-12 bus protocol..
The “SDI-12 Serial-Digital Interface” is ideal for data logging applications with the following requirements:
Battery powered operation with minimal current drain Low system cost Digital sensors output data directly in user units Sensors are interoperable and available from many different manufacturers
ATER
LOG® H-4191 is a RS-232 to SDI-12 gateway (interface) module. When connected
The H-4191 has the following features:
Provides both electrical and protocol interface functions between RS-232 & SDI-12 Works with any sensor command/response message including vendor specific extended
commands.
Buffers the command so no special timing is required. Generates proper parity for the SDI-12 bus. Automatically sends SDI-12 retries. Passes the sensor service request to the host. Supports optional CTS/RTS hardware flow control for a slow host device. Low power mode facilitates use with a RS-232 data radio. LED shows when the H-4191 is awake. Built in “sensor” can measure the battery voltage.
The H-4191 is packaged in a rugged plastic enclosure with screw mount ears. Connectors located on each end provide easy hookup.
H-4191
Operation 1-1
1.1 Applications
Figure 1 shows a monitoring application where a laptop computer is used to monitor the SDI-12 communication between a data recorder and two SDI-12 sensors. Figure 2 shows the connections when using the H-4191 as a gateway between a PLC and two SDI-12 sensors.
Figure 4 Monitor a data recorder
Figure 3 Interface between a PLC and
two SDI-12 Sensors
1.2 Operation
The H-4191 has a microprocessor with both RS-232 and SDI-12 interface ports. The H-4191 normally operates as a SDI-12 master device: it issues SDI-12 commands and collects responses. Under certain conditions the H-4191 can respond to host commands itself as a “pseudo” SDI-12 sensor (see Section 1.7).
The RS-232 interface port is connected to a personal computer or other “host” device. The H­4191 provides two way communication between the RS-232 host and the SDI-12 bus. During normal operation, the host device sends an address together with a command to a SDI-12 sensor. The sensor then replies with a "response".
1-2 Operation
H-4191
1.2.1 Commands
The RS-232 host interface is fixed at 9600 baud. The H-4191 inputs SDI-12 commands (ASCII characters) from the host and places the character string in a buffer. Up to 60 characters can be buffered. The command can be sent at any speed, even hand-typed commands will work. The backspace character (08h) is supported and deletes the previous character in the buffer. Note: the SDI-12 protocol requires upper case characters. When the H-4191 detects the “!” SDI-12 command terminator character the H-4191 generates a SDI-12 break and transmits the contents of the buffer to the SDI-12 port in a contiguous burst with the proper parity and bus timing. The H-4191 also accepts the <CR> character (ENTER Key) as a command terminator and substitutes the <CR> character with the required “!” SDI-12 command terminator. This makes the H-4191 easier to use for computer users who more commonly complete a message with the ENTER Key. If you use the ENTER Key to terminate the message, do not type the “!” character.
The H-4191 automatically generates SDI-12 compliant parity and timing. After transmitting the command, the H-4191 waits for up to 40mS for a sensor response. If the sensor response fails to arrive, the H-4191 performs a retry sequence specified by the SDI-12 protocol. The H-4191 generates up to four breaks with up to four retries per break (16 retries total).
1.2.2 Sensor Response
The response from a SDI-12 sensor is input by the H-4191 at 1200 baud and output to the RS­232 port at 9600 baud. Any sensor service requests or other SDI-12 bus traffic are also forwarded from the SDI-12 port to the RS-232 port. This feature allows the H-4191 to be used to passively monitor the activity on a SDI-12 bus between a data recorder and its sensors.
H-4191
Operation 1-3
1.3 Making Connections
Connect the RS-232 port of the H-4191 to the serial port of your personal computer or other host device with a standard 9-pin RS-232 cable (provided). The H-4191 has a female connector and is a DCE (modem) device. The cable has 9-pin RS-232 connectors which can be plugged directly into a PC serial port without the use of gender or null-modem adapters. Program your host device for 9600 baud, 8-bit, no parity, full-duplex communication The host device must assert either CTS or DSR to awaken the H-4191 from it’s low power sleep mode.
RS-232 Connector
Pin Name Direction Description Function
1 nc not used
2 TxD Output Transmit Data Transmit data to host device
3 RxD Input Receive Data Receive data from host device
4 DSR Input Data Set Ready Awakens the H-4191 when asserted.
5 GND Ground Ground
6 nc not used
7 CTS Input Clear To Send Awakens the H-4191 when asserted.
Controls TxD if RTS/CTS flow control is on.
8 RTS Output Request To Send Asserted when awake and output
9 nc not used
The H-4191 has a 4-position terminal strip for making connections to the SDI-12 bus. The H-4191 is powered from the +12V power terminal.
buffer is not full
1-4 Operation
H-4191
1.4 Testing the Interface
You can test the H-4191 with a simple RS-232 terminal or computer using a terminal program such as Xtalk or Hyperterminal. The terminal program must assert either the CTS or DSR (or both) input signals to the H-4191 to awaken it from sleep. The red LED on the H-4191 will be illuminated when it is awake and ready to communicate. The interface is a full-duplex connection, depending on the settings of your terminal program you may or may not be able to see what you are typing on your screen. If you make a mistake while typing the command, use backspace key to delete the previous keystroke. If you make a mistake and are not sure what is in the H-4191's buffer, press the “!” or ENTER Keys to flush the buffer and start over.
When the H-4191 is first powered up it transmits a “H-4191 Initialized” debugging message to the RS-232 port.
1.4.1 H-4191 Initiates the Commands
Try the following commands. The sensor address in these examples is “0" and the sensor is a Design Analysis H-350 pressure sensor. If your sensor has a different address use the appropriate address.
1. Check to see if you can communicate with the sensor. Issue a “0I!” Identify command.
The sensor should respond with: “012 DAA H-350001S#000000V10<CR><LF>”
2. Make a measurement. Issue a “0M!” command.
The sensor should respond with: “00153<CR><LF>” After 14 seconds the sensor will send a service request: “0<CR><LF>
Issue a “0D0" command to collect the data.
The sensor should respond with: “0+4.56+0.0000+0.2<CR><LF>”
1.4.2 H-4191 Monitors the SDI-12 Bus
The H-4191 can be used to passively monitor the activity on a SDI-12 bus. You can observe both the commands from the data recorder and the responses from the sensors. The communications between a data recorder and a Model H-350 pressure sensor would appear as follows:
0M!00153 0D0!0+4.56+0.0000+50.0
In this example the data recorder issued a “0M!” command, the sensor responded with “00153<CR><LF> “ (sensor 0, measurement time = 015 sec, 3 parameters will be returned). Next, the data recorder issued a “0D0!” command and the sensor responded with “0+4.56+0.0000+50.0<CR><LF> (sensor 0, stage = 4.56, PSI = 0.0, temperature = 50.0).
H-4191
Operation 1-5
Loading...
+ 14 hidden pages