---
title: "ComWinTop CWT-ULS Ultrasonic Level Sensor"
description: "ComWinTop CWT-ULS ultrasonic level sensor with Modbus RTU over RS-485. Non-contact liquid level, distance to surface and temperature measurement."
url: "https://taphome.com/en/compatibility/comwintop-ultrasonic-level-sensor/"
language: en
lastmod: 2026-10-08
generator: hugo
ai:
  topics: ["modbus-rtu","sensor","rs485","level-measurement","ultrasonic","relay"]
  questions: ["How to integrate ComWinTop CWT-ULS ultrasonic level sensor with TapHome?","What does the ComWinTop ultrasonic level sensor TapHome template measure?","How to connect ComWinTop CWT-ULS via RS-485 to TapHome?","How to configure the mounting height for liquid level calculation?","How to set relay thresholds on the ComWinTop ultrasonic level sensor via TapHome?","What is the blind area limitation of the CWT-ULS ultrasonic sensor?"]
---

# ComWinTop CWT-ULS Ultrasonic Level Sensor

Communication: Modbus RTU

- [ComWinTop CWT-ULS Product Page](https://store.comwintop.com/products/non-contact-ultrasonic-transmitter-ultrasonic-level-sensor-liquid-fuel-integrated-smart-level-measurement-indicator-4-20ma-rs485)

## Integration guide

The ComWinTop CWT-ULS is a non-contact ultrasonic level sensor that connects to TapHome via Modbus RTU over RS-485. The sensor measures distance to a liquid surface using ultrasonic pulses and calculates the liquid level based on a configurable mounting height. Two models are available: CWT-ULS-I-10M (integrated) and CWT-ULS-S-10M (split probe with cable).

The TapHome template exposes liquid level height, distance to surface, a built-in temperature sensor, and two virtual relays with configurable hysteresis thresholds. All register values use 32-bit IEEE 754 floating point encoding, each occupying two Modbus registers.

## Hardware connection

### Technical specifications

| Parameter | Value |
|-----------|-------|
| **Measurement range** | 0.5–20 m |
| **Blind area** | 0.35–0.5 m |
| **Accuracy** | 0.5% |
| **Resolution** | 1 mm |
| **Power supply** | 12–28 VDC |
| **Power consumption** | < 0.6 W |
| **Operating temperature** | -40°C to +80°C |
| **Protection rating** | IP65 |
| **Protocol** | Modbus RTU Slave, RS-485 |
| **Baud rate** | 9600 (default), configurable 600–115200 |
| **Thread** | G2, diameter 60 mm |

### RS-485 wiring

The sensor uses a 4-wire connection with color-coded cables:

| Wire color | Function | Terminal pair |
|------------|----------|-------------|
| **Brown** | Power + (12–28 VDC) | 05–06 |
| **Black** | Power - (GND) | 05–06 |
| **Yellow/Green** | RS-485 A+ | 01–02 |
| **Blue** | RS-485 B- | 01–02 |

Connect the RS-485 wires to TapHome:

- **A+** (Yellow/Green) → A+/D+ on TapHome RS-485
- **B-** (Blue) → B-/D- on TapHome RS-485

The sensor also has two relay outputs, each on its own pair of terminals:

| Terminal pair | Function |
|---------------|----------|
| **08–09** | Relay 1 output |
| **10–11** | Relay 2 output |

> [!WARNING]
> **Blind area limitation**
>
> The sensor cannot measure distances shorter than 0.35–0.5 m from the sensor face (the blind area). Mount the sensor so that, even at the maximum liquid level, the surface stays at least 0.5 m below the sensor face.

### Installation guidance

- Position the sensor away from tank inlets to avoid turbulence interference
- Avoid obstacles in the ultrasonic measurement cone
- Account for tank geometry — conical or spherical shapes may affect readings
- If the liquid surface has debris or turbulence, use a guide tube with a diameter greater than 120 mm

## Configuration

Modbus RTU communication is always active on the RS-485 interface — no activation steps are required.

### Slave ID and baud rate

The default Slave ID is **1** and the default baud rate is **9600** (8N1). Both can be changed via TapHome service actions on the module after the template is imported:

- **Slave ID** service action — writes H:20 (Float), range 1–254
- **Baud rate** service action — writes H:22 (Float), configurable 600–115200

The current Slave ID and baud rate are readable as module-level service attributes.

> [!WARNING]
> After changing the Slave ID or baud rate via service actions, the sensor will respond on the new address/speed immediately. Update the TapHome module connection settings to match.

### Mounting height setup

To enable liquid level calculation, the mounting height (distance from the sensor face to the tank bottom) must be configured:

1. Open the **Liquid Level Height** device in TapHome
2. Go to service settings
3. Use the **Mounting height** service action to set the installation height in meters (0–11 m)

Without a configured mounting height, the **Liquid Level Height** device displays a warning and returns 0. The **Distance to Surface** device reports the raw display value from H:0 until the mounting height is set; after that it returns the mounting height minus the display value.

## Device capabilities

### Level measurement

The template provides two complementary measurement devices:

- **Liquid Level Height** (H:0 + H:10, Float) — calculated liquid level in meters. The sensor reads the display value from H:0 and the mounting height from H:10, returning the calculated level. If the mounting height is not set (H:10 = 0), a warning is generated and the value returns 0. The mounting height can be viewed as a service attribute and configured via a service action.

- **Distance to Surface** (H:0 + H:10, Float) — distance from the sensor to the liquid surface in meters. When the mounting height is not set, this returns the raw display value. When the mounting height is set, it returns the inverse calculation (mounting height minus the display value).

### Temperature sensor

- **Temperature Sensor** (H:2, Float) — built-in temperature sensor in °C. The sensor uses this value internally for ultrasonic sound velocity compensation, but it is also exposed as a readable temperature. Useful for monitoring the ambient temperature at the sensor location.

### Relay outputs

The template exposes two virtual relays with hysteresis control:

- **Relay 1** (H:0 vs H:28/H:30, Float) — activates or deactivates based on the measured distance crossing configurable ON and OFF thresholds
- **Relay 2** (H:0 vs H:32/H:34, Float) — same logic as Relay 1 with independent thresholds

**Hysteresis logic:** The relay behavior depends on the relationship between the ON and OFF thresholds:

- If **ON threshold < OFF threshold** — the relay activates when the measured value drops below the ON threshold and deactivates when it rises above the OFF threshold. Use this for low-level alarms (e.g., activate pump when tank level is low).
- If **ON threshold > OFF threshold** — the relay activates when the measured value rises above the ON threshold and deactivates when it drops below the OFF threshold. Use this for high-level alarms (e.g., close valve when tank is nearly full).

Each relay has two service attributes showing the current ON and OFF thresholds in meters, and two service actions to configure them (range 0–10 m).

> [!TIP]
> The relay thresholds always compare against the display value in H:0. Without a mounting height, H:0 is the distance to the surface; once the mounting height is set, H:0 holds the calculated liquid level. Set the thresholds accordingly.

### Additional capabilities

The CWT-ULS sensor also exposes registers for supply voltage monitoring, cumulative operating time, liquid level vs. object level mode selection, measurement media type (Air, Water, Custom) for sound velocity calculation, measurement period, blind area configuration, and signal filtering levels (None, Rapid, Fast, Normal, Stable). The 4–20 mA analog output range can be calibrated via start/end point registers. These can be added in a future template update.

## Troubleshooting

### No Modbus communication

1. **Check RS-485 cables** — verify A+ (Yellow/Green) is connected to A+/D+ on TapHome and B- (Blue) is connected to B-/D- on TapHome. Swapped wires are the most common cause of communication failure
2. **Verify power supply** — the sensor requires 12–28 VDC on terminals 05–06
3. **Check Slave ID** — default is 1. If changed via the sensor display or a previous Modbus write, ensure TapHome is configured with the matching address
4. **Confirm baud rate** — default is 9600 baud, 8 data bits, no parity, 1 stop bit. Verify TapHome bus settings match
5. **Bus termination** — for long cable runs or multiple devices, ensure proper RS-485 bus termination (120 Ω resistor at each end of the bus)

### Liquid level shows 0 with warning

The mounting height has not been configured. Open the Liquid Level Height device → service settings → set the mounting height via the service action. The value must be greater than 0.

### Unstable or erratic readings

1. **Check for obstructions** — ensure the ultrasonic measurement cone is free of obstacles
2. **Reduce turbulence** — if the liquid surface is agitated, consider using a guide tube (diameter > 120 mm) or adjusting the filtering mode via register H:70 (0=None through 4=Stable)
3. **Verify media type** — if measuring through a medium other than air, the sound velocity setting (register H:54) may need adjustment
4. **Check blind area** — if the target is closer than 0.35–0.5 m from the sensor face, measurements will be unreliable

## Available devices 5

These devices appear in TapHome after import.

ComWinTop CWT-ULS Module

Service Attributes

|           |
|-----------|
| Slave ID  |
| Baud rate |

Service Actions

|           |
|-----------|
| Slave ID  |
| Baud rate |

Service Attributes

Slave ID

```taphome
modbusr(H, 20, float)
```

Baud rate

```taphome
modbusr(H, 22, float)
```

Service Actions

Slave ID

Parameters: ID (1–254 ID)

```taphome
modbusw(H, 20, float, ID)
```

Baud rate

Parameters: baud (1–500000 baud)

```taphome
modbusw(H, 22, float, baud)
```

Relay 1 Reed Contact Read-only

Virtual relay with hysteresis — activates when measured distance crosses the ON threshold, deactivates at the OFF threshold

Register: H:0 Float numeric

Service Attributes

|                |
|----------------|
| Relay ON \[m]  |
| Relay OFF \[m] |

Service Actions

|           |
|-----------|
| Relay ON  |
| Relay OFF |

Read

```taphome
if D < H
	if X < D
		return(1);
	elseif X > H
		return(0);
	else
		return(Rc);
	end
elseif D > H
	if X > D
		return(1);
	elseif X < H
		return(0);
	else
		return(Rc);
	end
else
	return(0);
end
```

Read (module)

```taphome
D := modbusr(H, 28, float);
H := modbusr(H, 30, float);
X := modbusr(H, 0, float);
```

Service Attributes

Relé ON \[m]

```taphome
D
```

Relé OFF \[m]

```taphome
H
```

Service Actions

Relé ON

Parameters: Vzdialenost (0–10 m)

```taphome
modbusw(H, 28, float, m)
```

Relé OFF

Parameters: Vzdialenost (0–10 m)

```taphome
modbusw(H, 30, float, m)
```

Relay 2 Reed Contact Read-only

Virtual relay with hysteresis — activates when measured distance crosses the ON threshold, deactivates at the OFF threshold

Register: H:0 Float numeric

Service Attributes

|                |
|----------------|
| Relay ON \[m]  |
| Relay OFF \[m] |

Service Actions

|           |
|-----------|
| Relay ON  |
| Relay OFF |

Read

```taphome
if D < H
	if X < D
		return(1);
	elseif X > H
		return(0);
	else
		return(Rc);
	end
elseif D > H
	if X > D
		return(1);
	elseif X < H
		return(0);
	else
		return(Rc);
	end
else
	return(0);
end
```

Read (module)

```taphome
D := modbusr(H, 32, float);
H := modbusr(H, 34, float);
X := modbusr(H, 0, float);
```

Service Attributes

Relé ON \[m]

```taphome
D
```

Relé OFF \[m]

```taphome
H
```

Service Actions

Relé ON

Parameters: Vzdialenost (0–10 m)

```taphome
modbusw(H, 32, float, m)
```

Relé OFF

Parameters: Vzdialenost (0–10 m)

```taphome
modbusw(H, 34, float, m)
```

Temperature Sensor Temperature Sensor Read-only

Register: H:2 Float Unit: °C numeric

Read temperature

```taphome
MODBUSR(H, 2, float)
```

Liquid Level Height Variable Read-only

Calculated liquid level — requires mounting height to be configured via service action

Register: H:0 Float Unit: m numeric

Service Attributes

|                      |
|----------------------|
| Mounting height \[m] |

Service Actions

|                 |
|-----------------|
| Mounting height |

Read

```taphome
var mnt := MODBUSR(H, 10, float);
var val := MODBUSR(H, 0, float);
if mnt = 0
	addwarning("Montážna výška nie je nastavená");
	return(0);
else
	return(val);
end
```

Service Attributes

Montážna výška \[m]

```taphome
MODBUSR(H, 10, float)
```

Service Actions

Montážna výška

Parameters: Výška (0–11 m)

```taphome
modbusw(H, 10, float, m)
```

Distance to Surface Variable Read-only

Distance from sensor to liquid surface — raw measurement when mounting height is not set, inverse calculation otherwise

Register: H:0 Float Unit: m numeric

Read

```taphome
var mnt := MODBUSR(H, 10, float);
var val := MODBUSR(H, 0, float);
if mnt = 0
	return(val);
else
	return(mnt - val);
end
```

**Connection:** Modbus RTU • 9600 baud• 8N1 • Slave ID: $\[SlaveId]

Possible improvements (13)

- H:4 Supply Voltage — Read-only supply voltage — useful for remote power monitoring and diagnostics
- H:6 Operating Time — Read-only cumulative operating time — useful for maintenance scheduling
- H:8 Liquid Level / Object Level Mode — 1=Liquid level, 0=Object level — determines measurement interpretation
- H:14 Open/Closed State — 1=Open, 0=Closed — relay output mode configuration
- H:16 Output Starting Point — 4–20mA analog output starting point calibration
- H:18 Output End Point — 4–20mA analog output end point calibration
- H:44 Units — Display unit selection — 0 for mm
- H:54 Media Type — 0=Air, 1=Water, Custom — affects sound velocity calculation
- H:56 Custom Sound Velocity — Custom sound velocity value — used when Media Type is set to Custom
- H:60 Measurement Period — Measurement cycle period in milliseconds
- H:62 Blind Area — Minimum measurable distance from sensor face (0.35–0.5m typical)
- H:70 Filtering — Signal filtering level: 0=None, 1=Rapid, 2=Fast, 3=Normal, 4=Stable
- H:76 Range — Maximum measurement range in meters

## Import parameters

Enter these values when you import the XML.

| Asked in the app | Default       |
|------------------|---------------|
| Slave Id         | `1`           |
| IP address       | `192.168.1.0` |

## Sources

- CWT-ULS Ultrasonic Level Meter Protocol
  
  2026-03-27
  
  [PDF](https://taphome.com/compatibility/devices/comwintop-ultrasonic-level-sensor/manufacturer/protocol-manual.pdf)
- ComWinTop Store — CWT-ULS Product Page
  
  [store.comwintop.com](https://store.comwintop.com/products/non-contact-ultrasonic-transmitter-ultrasonic-level-sensor-liquid-fuel-integrated-smart-level-measurement-indicator-4-20ma-rs485) 2026-03-27
- TapHome Hardware — Ultrasonic Level Sensor
  
  [hardware.taphome.com](https://hardware.taphome.com/en/ultrasonic-liquid-level-sensor/) 2026-03-27

Manufacturer documents are © their respective owners. They are provided as published by the manufacturer, for reference only.

## Related Documentation

- [Modbus Integration](https://taphome.com/en/compatibility/modbus-guide/)
- [Modbus](https://taphome.com/en/docs/integration/modbus/)
- [Simple configuration using templates](https://taphome.com/en/docs/integration/modbus/templates/)
- [Modbus scripts and prefetch](https://taphome.com/en/docs/script/modbus-scripts/)
- [Modbus functions](https://taphome.com/en/docs/script/modbus/)
- [Modbus data types](https://taphome.com/en/docs/script/modbus-data-types/)

