> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/hypersim/library-blocks-reference/control-miscellaneous/iec-61850-data-integrity-manipulation.md).

# IEC 61850 Data Integrity Manipulation

## Description <a href="#iec61850dataintegritymanipulation-description" id="iec61850dataintegritymanipulation-description"></a>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-f345dd29da5c959cb46ab078c1fd3f75ee698c97%2Fimage%20(667).png?alt=media" alt="" width="169"><figcaption></figcaption></figure>

The **IEC 61850 Data Integrity Manipulation (DIM)** block, located in the **Control Miscellaneous** library, allows the manipulation of the IEC 61850-9-2 stream, by injecting data integrity errors into Sampled Values (9-2LE) Publisher messages. When Sampled Values data integrity manipulation is enabled in I/O Interface Configuration, additional connection points become available in a "Faults" connection group. Each block can be linked to two SV Publisher streams (SV1 and SV2).

The block supports six manipulation types, each with a configurable trigger:

* **Stop transmission**: Stop SV publishing for a specified number of frames to simulate packet loss.
* **Duplicate transmission**: Duplicate frames for a set number of packets to simulate incorrect network topology.
* **smpCnt manipulation**: Change the smpCnt value at a given frame to simulate an IED clock reset.
* **Delay transmission**: Delay frames by a specified time (in microseconds) to simulate network delay.
* **smpSynch manipulation**: Change smpSynch for a set number of frames to simulate loss or change of synchronization.
* **Quality manipulation**: Change quality bits for voltage and current values to simulate IED performance changes.

**Different types of data manipulation** can be enabled at the same time.

{% hint style="info" %}
**Multiple DIM blocks** can be used in the same model.
{% endhint %}

## Mask parameters <a href="#iec61850dataintegritymanipulation-maskparameters" id="iec61850dataintegritymanipulation-maskparameters"></a>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-efd15515fb46b4d01f23d5444d4e6a28f5c07b2c%2FIEC61850.png?alt=media" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="General" %}

<table><thead><tr><th width="251.4000244140625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Enable merging unit output</strong></td><td>Enable the feature and associate the block to a Merging Unit.</td></tr><tr><td><strong>Subscribe to merging unit</strong></td><td>Enable the feature</td></tr><tr><td><strong>Value of desired smpSynch when the simulator is synced</strong></td><td>maximum value 254</td></tr><tr><td><strong>Value of desired smpSynch when the simulator is NOT synced</strong></td><td></td></tr><tr><td><strong>Manipulations to enable</strong></td><td>Select which manipulation types are enabled for this block. Their settings are configured in their respective tabs.</td></tr><tr><td><strong>Manipulation start time</strong></td><td>Manipulation will begin T seconds after the beginning of the ScopeView acquisition</td></tr></tbody></table>

{% hint style="info" %}
Each Merging Unit in the DIM can only be mapped to one SV stream.
{% endhint %}
{% endtab %}

{% tab title="Loss" %}

<table><thead><tr><th width="249.79998779296875">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Trigger on next smpCnt value</strong></td><td>Enable and specify the smpCnt value at which the manipulation begins (instead of at t = T).</td></tr><tr><td><strong>Number of lost SV</strong></td><td>Specify the number of packets that should be lost.</td></tr></tbody></table>
{% endtab %}

{% tab title="Duplication" %}

<table><thead><tr><th width="269.800048828125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Trigger on next smpCnt value</strong></td><td>Enable and specify the smpCnt value at which the manipulation begins (instead of at t = T).</td></tr><tr><td><strong>Number n of affected SV</strong></td><td>Specify the number of SV packets that will be affected.</td></tr><tr><td><strong>Number d of duplicated frames</strong></td><td>Specify how many frames to duplicate.</td></tr></tbody></table>
{% endtab %}

{% tab title="smpCnt" %}

<table><thead><tr><th width="261">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Trigger on next smpCnt value</strong></td><td>Enable and specify whether the change is applied at a specific smpCnt value.</td></tr><tr><td><strong>New smpCnt value</strong></td><td>Specify the new smpCnt value. The stream will appear to jump from its current to the new smpCnt.</td></tr></tbody></table>
{% endtab %}

{% tab title="Delay" %}

| Parameter                                     | Description                                                                                                            |
| --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **Trigger on next smpCnt value**              | Enable and specify whether the delay is applied at the specified smpCnt value (instead of t = T).                      |
| **Delay D applied to the stream**             | Specify the delay length in microseconds.                                                                              |
| **Delay n before recovery**                   | Specify the time, in seconds, before the stream recovers from the delay.                                               |
| **Discard or release the buffer on recovery** | Select Release (default) or Discard. On recovery, either release the buffered frames onto the network or discard them. |
| {% endtab %}                                  |                                                                                                                        |

{% tab title="smpSynch" %}

<table><thead><tr><th width="261">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Trigger on next smpCnt value</strong></td><td>Enable and specify the smpCnt value at which the manipulation begins (instead of at t = T).</td></tr><tr><td><strong>Number n of affected SVs</strong></td><td>Specify the number of SV packets that will be affected.</td></tr><tr><td><strong>New smpSynch value</strong></td><td>Specify the new smpSynch value. The stream will appear to change from its current smpSynch to the new one.</td></tr></tbody></table>
{% endtab %}

{% tab title="Quality bits" %}

<table><thead><tr><th width="260.199951171875">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Trigger on next smpCnt value</strong></td><td>Enable and specify the smpCnt value at which the manipulation begins (instead of at t = T).</td></tr><tr><td><strong>Number n of affected SV</strong></td><td>Specify the number of SV packets that will be affected.</td></tr><tr><td><strong>Current ph A, ... , Voltage ph N</strong></td><td>Specify the quality bit for each current and voltage value in the SV stream.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## Inputs <a href="#iec61850dataintegritymanipulation-inputs" id="iec61850dataintegritymanipulation-inputs"></a>

| Input             | Description                                                                 |
| ----------------- | --------------------------------------------------------------------------- |
| **CLK\_is\_sync** |                                                                             |
| **CLK\_ref\_sec** |                                                                             |
| **CTRL\_POW**     | Connect to the SyncOut output of the POW block to trigger the manipulation. |

## Outputs <a href="#iec61850dataintegritymanipulation-outputs" id="iec61850dataintegritymanipulation-outputs"></a>

| Output | Description                           |
| ------ | ------------------------------------- |
| **y**  | To be mapped to the IEC 61850 driver. |

{% hint style="danger" %}
To make DIM functional, map the connection points from the IEC 61850 driver to the DIM outputs.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/hypersim/library-blocks-reference/control-miscellaneous/iec-61850-data-integrity-manipulation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
