> 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/ehs/3.7/first-steps/choose-the-ehs-firmware/introduction-to-standard-ehs-firmware/op4512-and-op46xx/ehsx64-srm-legacy.md).

# Legacy Motors

## Firmware specifications

<figure><img src="https://521571437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo99Izmvvw5eHT4ldzI4g%2Fuploads%2Fgit-blob-d6a0dd92287577237bed76a07761fe3b6a129872%2FOP4510_Legacy.png?alt=media" alt="" width="480"><figcaption></figcaption></figure>

* Compatible with Simulink SPS workflow.
* Compatible with XG platforms
* Solver eHS x64 Gen4
* 2x PMSM Spatial Harmonic
  * 1x Resolver and 1x encoder reserved per machine
* 2x Generic Machine SCIM/DFIM
  * 1x Resolver and 1x encoder reserved per machine
* 1x 5-phase SRM

### FPGA ports mapping table

<details>

<summary>I/O mapping details table</summary>

| Port Number | LoadIn                                 | DataIn                        | DataOut                    |
| ----------- | -------------------------------------- | ----------------------------- | -------------------------- |
| 1           | Config eHS                             | Inputs eHS                    | eHS Averaged               |
| 2           | Scenario / Rst eHS = Status            | TSDO 1 - eHS 0 to 7           | eHS DownSample             |
| 3           |                                        | TSDO 2 - eHS 8 to 15          | Analog In 2A - 0 to 7      |
| 4           | eHS PWM - 0 to 7                       | TSDO 3 - eHS 16 to 23         | Analog In 2A - 8 to 15     |
| 5           | eHS PWM - 8 to 15                      | TSDO 4 - eHS 24 to 31         | Digital In 1A - 0 to 7     |
| 6           | eHS PWM - 16 to 23                     | TSDO 5 - eHS 32 to 39         | Digital In 1A - 8 to 15    |
| 7           | eHS PWM - 24 to 31                     | TSDO 6 - eHS 40 to 47         | Digital In 1A - 16 to 23   |
| 8           | Config PMSM SH 1/2                     | TSDO 7 - eHS 48 to 55         | Digital In 1A - 24 to 31   |
| 9           | Config IM 1                            | TSDO 8 - eHS 56 to 63         | PMSM SH 1/2                |
| 10          | Config IM 2                            | TSDO 9 - eHS 64 to 71         | IM1                        |
| 11          | Config SRM 1                           |                               | IM2                        |
| 12          | Config AOMR                            |                               | SRM1                       |
| 13          | PWM 1B - eHS 24 to 31                  |                               | Resolver/Encoder 1/2       |
| 14          | PWM 1B - eHS 16 to 23                  |                               | Encoder 1/2 Input on RS422 |
| 15          | PWM 1B - eHS 8 to 15                   | PMSM SH 1/2                   |                            |
| 16          | PWM 1B - eHS 0 to 7                    | IM1                           | PQ Estimation              |
| 17          | Config eHS to Machines Mapping         | IM1 Mtx                       |                            |
| 18          | Config MechMux                         | IM2                           |                            |
| 19          | Config Resolver Encoder 1/2 offset     | IM2 Mtx                       |                            |
| 20          | Config Resolver Encoder 1/2            | SRM 1                         |                            |
| 21          | Config Resolver Encoder 1/2 PhaseShift | AOMR Analog Out 2B - 0 to 7   |                            |
| 22          | Config Encoder Input on RS422          | Digital Out 1B - SDO 24 to 31 |                            |
| 23          |                                        | Digital Out 1B - SDO 16 to 23 |                            |
| 24          |                                        | Digital Out 1B - SDO 8 to 15  |                            |
| 25          |                                        | Digital Out 1B - SDO 0 to 7   |                            |
| 26          | Config Encoder 1/2 Output on RS422     | LEDs                          |                            |
| 27          | Config AIR                             | Analog Out 2B - 8 to 15       |                            |
| 28          |                                        | eHS SWG                       |                            |
| 29          |                                        | Encoder 1/2 Output on RS422   |                            |

</details>

## eHS Mapping

| Source Type | Source Index | Source Name                | Details                                               |
| ----------- | ------------ | -------------------------- | ----------------------------------------------------- |
| Input       | 0            | CPU Input                  |                                                       |
| Input       | 1            | NA                         |                                                       |
| Input       | 2            | PMSM SH 1/2                | PMSM1 Ia/PMSM1 Ib PMSM2 Ia/PMSM2 Ib                   |
| Input       | 3            | Sine Wave Generator        | IM1 Stator Ia/IM1 Stator Ib/IM1 Rotor Ia/IM1 Rotor Ib |
| Input       | 4            | Induction Machine 1/2      | IM2 Stator Ia/IM2 Stator Ib/IM2 Rotor Ia/IM2 Rotor Ib |
| Input       | 5            | Switched Relutance Machine | SRM1 Ia/SRM1 Ib/SRM1 Ic/SRM1 Id/SRM1 Ie               |
| Gate        | 0            | CPU Gating Signal          |                                                       |
| Gate        | 1            | PWM                        |                                                       |
| Gate        | 2            | Digital Input 1A           | Slot 1A - Ch00-31                                     |

To contextualize the Input and Gate Configuration table with this firmware configuration, the eHS firmware config tab must be configured with the following custom input source enumeration:

```
{'CPU Model',0,64;'Sine Wave Generator',3,32;'PMSM',2,4;'IM',4,8;'SRM',5,5}
```

And this custom gate sources enumeration:

```
{'CPU Model',0,72;'Digital Inputs',2,32;'PWM',1,32}
```

## Machines

### Communication port configuration for the Dual PMSM (SH) block

|                      | Dual PMSM Motors SH 1 |
| -------------------- | --------------------- |
| Machine label        | PMSM 1, PMSM 2        |
| Data In Port Number  | 15                    |
| Load In Port Number  | 8                     |
| Data Out Port Number | 9                     |

### Communication port configuration for the Induction Machine (IM) block

|                         | IM 1 | IM 2 |
| ----------------------- | ---- | ---- |
| Data In Port Number     | 16   | 18   |
| Data In Mtx Port Number | 17   | 19   |
| Load In Port Number     | 9    | 10   |
| Data Out Port Number    | 10   | 11   |

### Communication port configuration for the Switched Relutance Machine (SRM) block

|                      | SRM 1 |
| -------------------- | ----- |
| Data In Port Number  | 20    |
| Load In Port Number  | 11    |
| Data Out Port Number | 12    |

### Communication port configuration for the Resolver and Encoder block

|                                | Resolver/Encoder 1/2 |
| ------------------------------ | -------------------- |
| Load In Port Number            | 20                   |
| offset Load In Port Number     | 19                   |
| phaseshift Load In Port Number | 21                   |
| Data Out Port Number           | 13                   |

The signals received could be used as external carrier for machine resolver module.

```
Analog In - Slot 2A - Ch00-01
```

### Communication port configuration for the Resolver and Encoder Mapping block

|                     | Resolver/Encoder 1/2 |
| ------------------- | -------------------- |
| Load In Port Number | 18                   |

## Analog Out

### Communication port configuration for the Analog Output Mapping and Rescaling (AOMR) block

|                     | AOMR - Slot 2B |
| ------------------- | -------------- |
| Version             | V1             |
| Data In Port Number | 21             |
| Load In Port Number | 12             |

### AOMR Output

| Index     | Signal Source     |
| --------- | ----------------- |
| 0         | Resolver 1 Sine   |
| 1         | Resolver 1 Cosine |
| 2         | Resolver 2 Sine   |
| 3         | Resolver 2 Cosine |
| 4 - 47    | Not Used          |
| 18 - 127  | User Defined      |
| 127 - 191 | eHS Y01 to Y64    |

## IOs

### Communication port configuration for the Analog Input Differential Rescaling (AIR) block

|                     | AIR - Slot 2A |
| ------------------- | ------------- |
| Channels            | Ch00-15       |
| Load In Port Number | 27            |

### Communication port configuration for the Analog Input (AI) block

|                      | Slot 2A | Slot 2A |
| -------------------- | ------- | ------- |
| Channels             | Ch00-07 | Ch08-15 |
| Data Out Port Number | 3       | 4       |

### Communication port configuration for the Analog Output (AO) block

|                      | Slot 2B | Slot 2B |
| -------------------- | ------- | ------- |
| Channels             | Ch00-07 | Ch08-15 |
| Data Out Port Number | 21      | 27      |

### Communication port configuration for the Digital Input (DI) block

|                      | Slot 1A | Slot 1A | Slot 1A | Slot 1A |
| -------------------- | ------- | ------- | ------- | ------- |
| Channels             | Ch00-07 | Ch08-15 | Ch16-23 | Ch24-31 |
| Data Out Port Number | 5       | 6       | 7       | 8       |

### Communication port configuration for the Digital Output (DO) block

|                     | Slot 1B | Slot 1B | Slot 1B | Slot 1B |
| ------------------- | ------- | ------- | ------- | ------- |
| Channels            | Ch00-07 | Ch08-15 | Ch16-23 | Ch24-31 |
| Data In Port Number | 25      | 24      | 23      | 22      |
| Load In Port Number | 16      | 15      | 14      | 13      |

## Encoders

### Communication port configuration for the Encoder Intput (ENC IN) block

|                       | Slot 3A - RS422 |
| --------------------- | --------------- |
| Nb of Encoder Signals | 2               |
| Load In Port Number   | 22              |
| Data Out Port Number  | 14              |

### Communication port configuration for the Encoder Output (ENC OUT) block

|                       | Slot 3B - RS422 |
| --------------------- | --------------- |
| Nb of Encoder Signals | 2               |
| Data In Port Number   | 29              |
| Load Out Port Number  | 26              |


---

# 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/ehs/3.7/first-steps/choose-the-ehs-firmware/introduction-to-standard-ehs-firmware/op4512-and-op46xx/ehsx64-srm-legacy.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.
