# Devices, profiles and tags

> What a device, a device profile and a tag are in Proxus, how they relate, and what the data types and quality of a value mean.

Source: https://proxus.io/docs/concepts/devices-profiles-tags

Three objects describe every machine Proxus reads: the **device** (this machine), the **device profile** (how to
talk to machines of its kind) and its **tags** (the values to read). Splitting them this way lets you describe a
kind of machine once and add the tenth one in a minute.

## Device

A **device** is one machine, PLC, robot, meter or sensor that Proxus reads. It holds what is particular to that
one machine:

| Part | Meaning |
| --- | --- |
| **Device name** | Unique in the installation. Most plants use site, line and equipment, such as `LYS_MIXER_03`. |
| Address | Where the machine is on the network (IP address and port), and the reading interval if it differs from the profile. |
| **Gateway** | The one edge gateway that reads it. |
| **Device profile** | The one profile it uses. |
| Place | **Enterprise**, **Site**, **Area**, **Process cell** and **Equipment module**. All optional. The place sets the device's path in the [Unified Namespace](https://proxus.io/docs/concepts/unified-namespace) and how lists group devices. |
| **Device type** | What the machine is (Mixer, Pump, Filler / Packaging...). It sets the icon and how the Operations Center shows the device. You choose it; Proxus does not guess it. |
| Outbound targets | Where its values go besides the historian. |
| **Active** | Whether the gateway reads it. Clear it to stop reading without deleting the device. |

A device belongs to exactly one gateway and one profile. To read the same machine from two gateways, add two
devices.

## Device profile

A **device profile** says how to talk to a kind of device:

- the **protocol** (Modbus TCP, Siemens S7, OPC UA, MTConnect, the simulator...);
- the **connection parameters** of that protocol (byte order, unit ID, rack and slot, security...);
- the list of **tags**.

Many devices can share one profile. A change to the profile, such as a new tag, applies to every device that
uses it; the profile's **Used By** list shows which ones. The device setup wizard creates a profile when you add
a device, under the **Profile name** you give it, and offers it under **Start from** the next time.

## Tag

A **tag** is one value read from a device: a temperature, a speed, a counter, a state. Each tag in a profile has:

| Field | Meaning |
| --- | --- |
| **Name** | The name the value has everywhere in Proxus: on the device page, in trends, in the UNS topic. |
| **Address** | Where the value is in the device, in the protocol's own form: a register (`x=3;0` for Modbus holding register 0), a Siemens address (`M10`), an OPC UA node, or a range such as `[0,100]` for the simulator. |
| **Type** | The data type the device holds the value in. See the table below. |
| **Unit** | The engineering unit (`°C`, `rpm`, `%`), shown next to the value and published with it. |
| Polling interval | A reading interval for this tag only. Empty or 0 uses the profile's interval. |

## Data types

The data types a tag can have. The first name is the one used in Proxus, the second the IEC 61131-3 name a PLC
programmer uses.

| Type | IEC 61131-3 | Size |
| --- | --- | --- |
| Bool | BOOL | 1 bit |
| Short | INT | 16 bit |
| UShort | UINT | 16 bit |
| Int | DINT | 32 bit |
| UInt | UDINT | 32 bit |
| Float | REAL | 32 bit |
| Long | LINT | 64 bit |
| ULong | ULINT | 64 bit |
| Double | LREAL | 64 bit |
| String | STRING | variable |
| Bytes | ARRAY OF BYTE | variable |
| DateTime | DATE_AND_TIME | |

Choose the type the device stores the value in, not the type you would like to see. A `Float` read as `Int`
gives a wrong number. To convert or scale a value, use a [pipeline](https://proxus.io/docs/concepts/pipelines-and-rules).

## Quality

Every value carries a quality, shown in the **Quality** column of the device page and stored with the value:

| Quality | Meaning |
| --- | --- |
| **Good** | The gateway read the value and it is current. |
| **Bad** | The read failed. The value field holds the reason, for example a wrong address or a timeout. |
| **Uncertain** | The tag failed several reads in a row, so the gateway set it aside. It tries the tag again from time to time, and the value shows the last error. |

A tag with **Bad** or **Uncertain** quality does not stop the other tags of the device; they keep being read.
When the whole device does not answer, the gateway marks the device as not connected and tries it again at
growing intervals.

## What's next

- [Add a device](https://proxus.io/docs/connect/devices/add-a-device) with the setup wizard.
- [Device profiles](https://proxus.io/docs/connect/device-profiles) explains how to edit a profile and its tags.
- [Wrong values or bad quality](https://proxus.io/docs/troubleshoot/devices) helps when tags do not read well.
