D2000 Programming

The outstanding feature of the D2000 series is its user-programmable output scaling. The transfer function from analog input to data output may be specified to an infinite spectrum of functions, both linear and nonlinear. Sensor data may be scaled to any desired engineering units for easy interpretation through the following D2000 programming.

The D2000 uses a piece-wise linear technique to approximate nonlinear functions. Figure 3 shows this technique. The first step in programming a function is to establish the functions endpoints, as shown in figure 3a. This is accomplished by using the Minimum (MN) and Maximum (MX) commands. In cases where only linear scaling is necessary, the programming task is now complete. For nonlinear functions, the linear curve may be broken into segments by describing a breakpoint using the BreakPoint (BP) command. The breakpoint establishes an intersection between two linear segments. Figures 3b & 3c show the effect of breakpoints.

In general, breakpoints are defined by applying a known analog signal to the input of the module. This establishes the x-axis position of the breakpoint. The y-axis position is defined in the argument of the breakpoint (BP) command. The breakpoint data is stored in nonvolatile EEPROM. The transfer function may be reprogrammed many times.

Up to 23 breakpoints are available to define 24 linear segments. Only two restrictions apply to the shape of the programmed transfer function:

1. The output data value must be a single-valued function of the input.

2. The output values must lie between the limits set by the endpoints.

In general, breakpoints are defined by applying a known analog signal to the input of the module. This establishes the x-axis position of the breakpoint. The y-axis position is defined in the argument of the breakpoint (BP) command. The breakpoint data is stored in nonvolatile EEPROM. The transfer function may be reprogrammed many times.

All DGH modules represent data in the same fixed format of sign, five digits, decimal point, and two more digits; +00100.00 for example. The user can structure the D2000 output data for the best compromise between resolution and readability. For example, a +0.05 volt output indication may be structured in three output formats:

+0.05Volts                           +00000.05                          5

+50 millivolts                      +00050.00                          5,000

+50,000 microvolts          +50000.00                          5,000,000

The microvolt output format extracts the best resolution, but the output data will tend to be noisy. For a 0 to 0.05V output, millivolts is the best output format choice. This gives 5,000 counts of resolution in easy to interpret units.

In a typical application a D2000 module is used to output data in units of specific gravity. The specific gravity output range is between 0.5 and 2. If the output data format range is +0000.50 to +00002.00 there are only 150 counts of resolution between the minimum and maximum outputs. However, since the specific gravity of water is defined to be 1, the output may be scaled in percent. The specific gravity of water becomes 100%. The output data range in % is from +00050.00 to +00200.00. This format allows up to 15,000 counts of resolution in easily interpreted units.

The D2000 can output data in easy-to-understand engineering units that may be instantly read and interpreted, without data conversion, by a host computer. For example, a pressure sensor provides a 1 to 5V linear output for pressures of 0 to 1000 psi. A D2131 reads the sensor output in millivolts. But the real parameter of interest is pressure, not voltage, and voltage readings may be difficult to interpret. To make the output data more meaningful, program the D2131 output in psi:

0                            1.0V                                      +01000.00                          +00000.00

500                        3.0V                                       +03000.00                          +00500.00

1000                      5.0V                                       +05000.00                          +01000.00

In many cases, the desired output data is specific to an application. Assume that the same pressure sensor is used to measure the “fullness” of a pressure vessel, such as a cylinder of compressed air.

The output units could be in units of “percent” and in this case we will assume that if the cylinder reads 750 psi it is 100% full:

0             1.0V                       +00000.00

375             2.5V                       +00050.00

750             4.0V                       +00100.00

The real power of the D2000 series is their ability to provide output data in engineering units for nonlinear sensors. A nonlinear transfer function may be programmed into a D2000 module by approximating the curve with a series of linear segments, using the Break Point (BP) command. A Break Point specifies the intersection between two linear segments. Up to 23 Break Points may be used to specify 24 linear segments in a curve.

The following example uses a D2131 module to linearize the output of a pyrometer that uses an infrared temperature sensor. The infrared temperature sensor is inherently nonlinear and its output ranges from 0.717 to 1.406V for a temperature span of 600 to 1600°C.

Breakpoint           Input Voltage     Output Value

Minimum             +00717.00          +00600.00

00                           +00844.00          +00700.00

01                           +00948.00          +00800.00

02                           +01036.00          +00900.00

03                           +01110.00          +01000.00

04                           +01174.00          +01100.00

05                           +01230.00          +01200.00

06                           +01280.00          +01300.00

07                           +01325.00          +01400.00

08                           +01367.00          +01500.00

Maximum            +01406.00          +01600.00

Assume that a water tower with an irregular shape is 30 feet tall and holds about 10,000 gallons. A pressure sensor may be used to measure the height of the water in the tower. The pressure sensor produces 0.1V per foot of water starting at 0V. To create a nonlinear function in the module, the endpoints must be set first. The minimum value is known and may be programmed by applying 0V to the module corresponding to 0 gallons. A “dummy” maximum value, which we know can never be exceeded, may be used to specify the maximum endpoint. In this case we apply +5V to the module and program the maximum value to be 15,000 gallons. Starting with an empty tower, read the pressure at fixed known volumes of water, every 1000 gallons for example, and set breakpoints in the module corresponding to known amounts of water in the tower. Once the curve is programmed, the module converts the pressure signal to gallons. The preceding example shows that D2000 modules may be programmed in the field to specific test inputs where the actual nonlinearity is unknown. Since all programming is done through the communications port, access to a module is not necessary and ranging may be done remotely.

Scaling to desired engineering units, the D2000 allows you to scale an input to desired engineering units. For example, many sensor output signals are transmitted as 4 to 20mA signals. The following example demonstrates scaling a 4 to 20mA signal to 0 to 100% using a DGH D2251 or D2252 module. The actual input range of these modules is 0 to 25mA to make it easier to adjust for zero and span and to allow for drift in the end points of the input.

Since the input range is 0 to 25mA and you want to use a portion of that range, you must determine the new minimum and maximum values. The two desired values: 4mA, 0% and 20mA, 100% determines the desired transfer function. Extrapolate this function to the full-scale range of the module, which is 0-25mA. This results in endpoints at 0mA, -25% and 25mA, 131.25%.

Input the new minimum and maximum values with the following procedure. In these steps, we assume a channel address of 1.

1. Connect module to computer, or terminal and establish communications.

2. Apply 0mA to the input.

3. Send a Write Enable command, $1WE, followed by a Minimum Value command, $1MN-00025.00. The response to both commands should be an *.

4. Apply +25mA to the input.

5. Send a $1WE command followed by a Maximum Value command, $1MX+00131.25. The response to both commands should be an *. The entire range is rescaled, and all values are read in percent.

Click outside to hide the comparison bar
Compare
×