---
title: Opto22 MMIO Protocol Ethernet
slug: litmusedge/quickstart-guide/industrial-systems-connection-guide/opto-devices/opto22-mmio-protocol-ethernet
description: Review the following information for setting up and configuring the Opto22 MMIO Protocol Ethernet driver. 
docTags: 
createdAt: 2022-07-04T16:09:33.000Z
---

Review the following information for setting up and configuring the Opto22 MMIO Protocol Ethernet driver. The driver connects to Opto22 controllers over TCP using the OptoMMP memory-map protocol.

:::hint{type="info"}
**Note:** This driver is experimental. Some features might not work as expected.
:::

# Litmus Edge compatible series

| Compatibility parameter      | Compatible items                                 |
| ---------------------------- | ------------------------------------------------ |
| **Driver type**              | Ethernet                                         |
| **Validated devices/series** | [OPTO22 SNAP PAC System](http://www.opto22.com/) |

To set up and configure this device in Litmus Edge (LE), do the following:

- Step 1: Set up and configure the PLC device
- Step 2: Set up the PLC device in Litmus Edge DeviceHub
- Step 3: Configure the list of registers

# Step 1: Set up and configure the PLC device

If the device is configured for Ethernet access, find its network parameters. Otherwise, use PLC software on your computer to configure the device for Ethernet access.

# Step 2: Set up the PLC device in Litmus Edge DeviceHub

Configure the following parameters when you [Connect a Device](docId\:pF5pwEP7Ata1NC7c0yQu_) with this driver. Update default values to the specific setup of your device.

| Parameter          | Value                                                                               |
| ------------------ | ----------------------------------------------------------------------------------- |
| **Type**           | Opto Devices                                                                        |
| **Driver**         | Opto22 MMIO Protocol Ethernet                                                       |
| **NetworkAddress** | The IP address of the device you defined in Step 1. Default value `192.168.0.1`     |
| **NetworkPort**    | The TCP port of the device. Enter a value from `0` to `65535`. Default value `2001` |

The following parameters are under **Advanced Parameters**.

| Parameter               | Value                                                                                                                         |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| **ReadTimeout**         | How long the driver waits for a response, in milliseconds. Enter a value from `10` to `10000`. Default value `2000`           |
| **RetryCount**          | The number of times a failed request is retried. Enter a value from `0` to `5`. Default value `0`                             |
| **PauseBetweenRetries** | The pause between retries, in milliseconds. Enter a value from `0` to `2000`. Default value `0`                               |
| **KeepAlive**           | The TCP keep-alive interval, in seconds. Enter a value from `0` to `7200`. Enter `0` to disable keep-alive. Default value `5` |

For the **Meta Data**, **Status Register**, and **Optional Settings** options, see [Connect a Device](docId\:pF5pwEP7Ata1NC7c0yQu_). By default, the status register is `FEATURE`, value type `int32`, address `0`.

# Step 3: Configure the list of registers

When you [Add a Tag](docId:89nruY50cZN0cPLIOmVdl) to the connected device, see the following register table and tag parameters. This driver does not support browsing tags.

See the following additional resources if necessary:

- [Organize Device and Tag Data by Using Metadata](docId\:gSM6iJPWjd0cCxWq2Qre2)
- [Tag Formula Variables](docId\:Xj0OqYONxM2BEhMwqkDWC)

## Register table

| **Name**                | **Value Types** | **Address Format** | **Min Address** | **Max Address&#x20;** | **Access Type** |
| ----------------------- | --------------- | ------------------ | --------------- | --------------------- | --------------- |
| ACTIVECOUNTER           | bit             | DD                 | 0               | 63                    | R/W             |
| ALARM\_HI\_DEADBAND     | int32           | DD                 | 0               | 63                    | R/W             |
| ALARM\_HI\_ENABLE       | bit             | DD                 | 0               | 63                    | R/W             |
| ALARM\_HI\_SETPOINT     | int32           | DD                 | 0               | 63                    | R/W             |
| ALARM\_HI\_STATE        | bit             | DD                 | 0               | 63                    | R/O             |
| ALARM\_LO\_DEADBAND     | int32           | DD                 | 0               | 63                    | R/W             |
| ALARM\_LO\_ENABLE       | bit             | DD                 | 0               | 63                    | R/W             |
| ALARM\_LO\_SETPOINT     | int32           | DD                 | 0               | 63                    | R/W             |
| ALARM\_LO\_STATE        | bit             | DD                 | 0               | 63                    | R/O             |
| COUNTERDATA             | uint32          | DD                 | 0               | 63                    | R/O             |
| COUNTERDATA\_READCLEAR  | int32           | DD                 | 0               | 63                    | R/O             |
| COUNTS                  | int32           | DD                 | 0               | 63                    | R/W             |
| COUNTS\_4096            | float32         | DDDD               | 0               | 4095                  | R/O             |
| EU                      | int32           | DD                 | 0               | 63                    | R/W             |
| EU\_4096                | float32         | DDDD               | 0               | 4095                  | R/O             |
| FEATURE                 | int32           | DD                 | 0               | 63                    | R/W             |
| FEATURE\_4096           | uint32          | DDDD               | 0               | 4095                  | R/W             |
| GAIN                    | int32           | DD                 | 0               | 63                    | R/W             |
| GAIN\_4096              | float32         | DDDD               | 0               | 4095                  | R/W             |
| HDD\_COUNTER            | uint32          | DDdd               | 0               | 1531                  | R/O             |
| HDD\_COUNTER\_READCLEAR | uint32          | DDdd               | 0               | 1531                  | R/O             |
| HDD\_OFFLATCH           | bit             | DDdd               | 0               | 1531                  | R/O             |
| HDD\_OFFLATCH\_CLEAR    | bit             | DDdd               | 0               | 1531                  | R/O             |
| HDD\_ONLATCH            | bit             | DDdd               | 0               | 1531                  | R/O             |
| HDD\_ONLATCH\_CLEAR     | bit             | DDdd               | 0               | 1531                  | R/O             |
| HDD\_STATE              | bit             | DDdd               | 0               | 1531                  | R/O             |
| HISCALE                 | int32           | DD                 | 0               | 63                    | R/W             |
| HISCALE\_4096           | float32         | DDDD               | 0               | 4095                  | R/W             |
| LOSCALE                 | int32           | DD                 | 0               | 63                    | R/W             |
| LOSCALE\_4096           | float32         | DDDD               | 0               | 4095                  | R/W             |
| MAX                     | int32           | DD                 | 0               | 63                    | R/O             |
| MAX\_4096               | float32         | DDDD               | 0               | 4095                  | R/O             |
| MAX\_READCLEAR          | int32           | DD                 | 0               | 63                    | R/O             |
| MAX\_READCLEAR\_4096    | float32         | DDDD               | 0               | 4095                  | R/O             |
| MIN                     | int32           | DD                 | 0               | 63                    | R/O             |
| MIN\_4096               | float32         | DDDD               | 0               | 4095                  | R/O             |
| MIN\_READCLEAR          | int32           | DD                 | 0               | 63                    | R/O             |
| MIN\_READCLEAR\_4096    | float32         | DDDD               | 0               | 4095                  | R/O             |
| MODULETYPE              | int32           | DD                 | 0               | 63                    | R/O             |
| MODULETYPE\_4096        | uint32          | DDDD               | 0               | 4095                  | R/O             |
| OFFLATCH                | bit             | DD                 | 0               | 63                    | R/O             |
| OFFLATCH\_READCLEAR     | bit             | DD                 | 0               | 63                    | R/O             |
| OFFSET                  | int32           | DD                 | 0               | 63                    | R/W             |
| OFFSET\_4096            | float32         | DDDD               | 0               | 4095                  | R/W             |
| ONLATCH                 | bit             | DD                 | 0               | 63                    | R/O             |
| ONLATCH\_READCLEAR      | bit             | DD                 | 0               | 63                    | R/O             |
| PID\_CFG\_ALG           | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_CFG\_FLAGS         | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_CFG\_FLAGS\_OFF    | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_CFG\_FLAGS\_ON     | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_CFG\_HI\_RANGE     | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_CFG\_LOW\_RANGE    | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_CFG\_MAN\_MODE     | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_CFG\_MAX\_OUT      | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_CFG\_MIN\_OUT      | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_CFG\_MM\_IN        | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_CFG\_MM\_OUT       | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_CFG\_MM\_SP        | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_CFG\_SCAN\_TIME    | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_CV\_D              | int32           | DDD                | 0               | 127                   | R/O             |
| PID\_CV\_ERROR          | int32           | DDD                | 0               | 127                   | R/O             |
| PID\_CV\_FF             | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_CV\_I              | int32           | DDD                | 0               | 127                   | R/O             |
| PID\_CV\_IN             | int32           | DDD                | 0               | 127                   | R/O             |
| PID\_CV\_INTEGRAL       | int32           | DDD                | 0               | 127                   | R/O             |
| PID\_CV\_OUT            | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_CV\_P              | int32           | DDD                | 0               | 127                   | R/O             |
| PID\_CV\_SP             | int32           | DDD                | 0               | 127                   | R/O             |
| PID\_LSV\_IN            | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_LSV\_SP            | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_SCALE\_IN\_HI      | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_SCALE\_IN\_LOW     | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_SCALE\_OUT\_HI     | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_SCALE\_OUT\_LOW    | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_SCAN\_COUNTER      | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_STATUS             | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_STATUS\_OFF        | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_STATUS\_ON         | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_TUNE\_D            | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_TUNE\_FF           | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_TUNE\_I            | int32           | DDD                | 0               | 127                   | R/W             |
| PID\_TUNE\_P            | int32           | DDD                | 0               | 127                   | R/W             |
| POINTTYPE               | int32           | DD                 | 0               | 63                    | R/W             |
| POINTTYPE\_4096         | uint32          | DDDD               | 0               | 4095                  | R/W             |
| QUALITY\_4096           | uint32          | DDDD               | 0               | 4095                  | R/O             |
| SP\_BIT                 | bit             | DD                 | 0               | 63                    | R/W             |
| SP\_FLOAT               | uint32          | DDDDD              | 0               | 10239                 | R/W             |
| SP\_INTEGER             | uint32          | DDDDD              | 0               | 10239                 | R/W             |
| STATE                   | bit             | DD                 | 0               | 63                    | R/W             |

## Tag parameters

- **Name**: Select a register name from the drop-down list. The available options depend on the names in the register table.
- **Value Type**: Select a data type from the drop-down list. The available options depend on the register name selected.
- **Address**: Enter the register address in decimal format, within the min and max range in the register table. Omit leading zeros. For registers with a bit address format (lowercase `d`), add the bit number at the end.
- **PollingInterval**: Enter how often the tag polls for data, in seconds. Enter `0` to disable polling. Default value `1`
- **Tag Name**: Enter a name for the tag.
- **Description** (Optional): Enter a description for the tag.
- **Tag Formula**: Enter a formula for the tag to process the generated data. You can use two variables: `value` (current tag value) and `timestamp` (current tag UNIX time in milliseconds). The following math functions are available:
  - sin
  - cos
  - sqrt
  - tan
  - power: power(`x`) performs the operation `10^x`.
  - log: log(`x`) is the natural logarithm (the logarithm is in base `e`).
  - exp: exp(`x`) performs the operation `e^x`.
- **Only Publish on Change of Value**: Select the checkbox to publish NATS messages only when the *value* parameter changes. *Change of Value* only applies to boolean, numeric (such as int or float), and simple string data types. It does not apply to complex types, such as JSON or array. Poll-once topics are not affected by *Change of Value* settings, and still receive a single message.
- **Meta Data**: Define key-value pairs to add to the device output payload.

:::hint{type="info"}
**Note:** If you use special characters in metadata key names, the special characters are replaced with underscore characters in the payload. This can cause two key names to be combined into one. For example, configuring the key names a\*\*b and a&\&b creates only one key name (a\_\_b).
:::

