Blog · Application
Tank level and overfill with one radar sensor
The level in millimetres and a hard “full” switch from one sensor in the tank lid.
The problem
A metal tank with a water-based medium, such as a washer rinse tank or a coolant reservoir, is refilled by the PLC. Two float switches give full and empty but nothing in between, and a stuck float overfills the tank. The operator only learns the tank is low when the alarm comes.
The station
- Sensor ifm LR2050, guided wave radar, G 3/4, probe 150 to 2000 mm (ordered separately), port class A
- Master SICK SIG200, 4 ports, EtherNet/IP. 500 mA per port, 3 A total
- Port X1, 4.6 m route, 10 m cable
The settings that matter
| Setting | Value | Why | Datasheet / IODD |
|---|---|---|---|
| Set point SP | 800 mm | Full: OUT1 switches on here | SP 15 to L−30 mm, steps of 1 mm |
| Reset point rP | 780 mm | OUT1 drops after 20 mm of draining | rP 10 to L−35 mm, hysteresis over 5 mm |
| Probe length L | 1000 mm (our choice) | Limits SP to 970 mm and rP to 965 mm | Inactive zone 30 mm at the top, 10 mm at the bottom |
| Low alarm | 150 mm, in the PLC | Read from the level value, above the bottom inactive zone | Measuring error ±7 mm, resolution 1 mm |
The studio checks the entered probe length from 150 to 2000 mm, limits SP to L−30 mm and rP to L−35 mm, and checks that rP sits below SP. This example uses a 1000 mm rod. The EMC figures in the datasheet assume a closed metal tank; a plastic or open tank falls under a different EMC class.
Run it
0E 0D: 0x0E0D shifted right by two is 899 mm, and bit 0 is OUT1.What you get
The screenshots show the earlier example. The JSON, CSV and current HTML report below use the current Studio data. They are proposed settings, not a record of physical commissioning.
The commissioning file has every port: validation IDs, cycle time, data storage, and each parameter as ISDU index, subindex and raw value. This is port X1 from the real file, trimmed to the fields that matter:
{
"port": 1,
"mode": "iolink",
"tag": "L1",
"device": {
"part": "LR2050",
"vendor": "ifm electronic",
"vendor_id": 310,
"device_id": 479,
"iodd_file": "ifm-0001DF-20150720-IODD1.1.xml",
"bitrate": "COM2",
"validation": {
"recommended": "type_compatible",
"vendor_id": 310,
"device_id": 479,
"alternatives": [
"none",
"type_compatible",
"identical"
],
"serial_number": null
},
"data_storage": {
"recommended": "backup_restore",
"note": "Parameters are kept in the master so a replacement device is loaded automatically. Needs a device that supports data storage; check the IODD."
},
"cycle_time_ms": {
"device_min": 2.3,
"recommended": 2.3
},
"process_data": {
"in_bits": 16,
"in_bytes": 2,
"out_bits": 0,
"out_bytes": 0,
"in_layout": [
{
"name": "Level",
"bit_offset": 2,
"bits": 14,
"gradient": 1,
"unit": "mm"
},
{
"name": "OUT2",
"bit_offset": 1,
"bits": 1,
"gradient": null,
"unit": null
},
{
"name": "OUT1",
"bit_offset": 0,
"bits": 1,
"gradient": null,
"unit": null
}
]
},
"parameters": [
{
"key": "probe_length",
"name": "Probe length L",
"kind": "setting",
"unit": "mm",
"value": 1000,
"entered": 1000,
"note": null,
"index": 1600,
"subindex": 0,
"datatype": "IntegerT",
"bit_length": 16,
"raw": 1000,
"raw_hex": "03 E8",
"clamped": false,
"status": "ok"
},
{
"key": "sp",
"name": "Set point SP",
"kind": "setting",
"unit": "mm",
"value": 800,
"entered": 800,
"note": null,
"index": 583,
"subindex": 0,
"datatype": "IntegerT",
"bit_length": 16,
"raw": 800,
"raw_hex": "03 20",
"clamped": false,
"status": "ok"
},
{
"key": "rp",
"name": "Reset point rP",
"kind": "setting",
"unit": "mm",
"value": 780,
"entered": 780,
"note": null,
"index": 584,
"subindex": 0,
"datatype": "IntegerT",
"bit_length": 16,
"raw": 780,
"raw_hex": "03 0C",
"clamped": false,
"status": "ok"
},
{
"key": "probe",
"name": "Probe type",
"kind": "option",
"unit": "",
"value": "rod",
"entered": null,
"note": null,
"index": 1602,
"subindex": 0,
"datatype": "UIntegerT",
"bit_length": 8,
"raw": 1,
"raw_hex": "01",
"clamped": false,
"status": "ok"
}
]
}
}
Download: commissioning file (JSON) · CSV · current station report (HTML)
Buy and install. One button in the studio sends the station to us. We reply with a price and an install date, buy the parts, mount and wire them, and write the settings on site. No payment is taken in the studio.
Open this station in the studio
The same station comes out of ChatGPT with the iolinki connector (https://mcp.iolinki.com/mcp, setup on the MCP page): describe the job and it builds, checks and shows the station in the chat.
The proposed order includes the separate E43207 rod probe, 1000 mm long. The commissioning file includes probe length L at ISDU index 1600 and the rod probe type at index 1602. Check the fitted length and set the medium on the sensor at commissioning; the studio does not export the medium setting.