# Reading multiple addresses from MC Protocol (Mitsubishi FX PLC)

**URL:** <https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340>\
**Category:** Industrial\
**Created:** [12 October 2024 11:32 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340 "2024-10-12T11:32:11Z")\
**Posts on this page:** 1\
**Showing post:** 56

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [13 October 2024 08:50 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/56 "2024-10-13T08:50:19Z")

</div>

> [@Jayeshpitale1](#):
>
> i need to know that how to find bytes offset and index offset

Do you know what a 16 bit value is?

Do you know what a BYTE is?

1 MC READ value is 16 bit AKA 2 bytes.

therefore:

- If you get 3 16bit values ` [xxxx, yyyy, zzzz]` then `xxxx` is bytes 0 & 1, `yyyy` is bytes 2 & 3, and so on.
- if you read D990,50, then D990 is byte 0 & 1, D991 is bytes 2 & 3 ... D1024 is bytes 68 & 69, and so on.
- if you read D1040,50, then D1040 is byte 0 & 1, D1041 is bytes 2 & 3 ... and so on.

It is simple maths.

Byte Offset = (Address - Start Address) \* 2

e.g.  
Address: `D1048`  
Start Address: `D1040`  
Byte Offset = `(1048 - 1040) * 2` = `16`

Read this again:

> [@Steve-Mcl](#):
>
> That said, i can see you have entered the address `D990`. That will READ only 1 WORD of data!. How do you expect to parse things like `temperatureSetting` which is at D993?
> 
> Let me explain the point of this all.
> 
> 1. You want to READ from the PLC many things at once to make your code easier to maintain, get best performance, get good consistent data
> 2. So we read 99 16 bit integers starting from D990
> 3. Remember, D registers are 16 bit AKA 2 bytes wide
> 4. That means D990 value is at index `0` (offset byte `0`)
> 5. That means D991 value is at index `1` (offset byte `2`)
> 6. That means D992 value is at index `2` (offset byte `4`)
> 7. That means D993 value is at index `3` (offset byte `6`)

---

_[View the full topic](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340)._
