# How to read Modbus RS485 on plc

**URL:** <https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320>\
**Category:** CODESYS\
**Created:** [September 30, 2025, 7:50am UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320 "2025-09-30T07:50:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![WagoUser44](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WagoUser44](https://www.wago.community/u/WagoUser44)\
**Post date:** [September 30, 2025, 7:50am UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/1 "2025-09-30T07:50:19Z")

</div>

Hello,

I have an electric meter connected with Modbus RS485 to the PFC300 and I want to read the values from codesys. How can I do that please ?

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/b/b2f6722af83331d767874b1d1d79fba98024af96.png)

---

<div class="post-metadata">

**Author:** ![WagoUser44](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WagoUser44](https://www.wago.community/u/WagoUser44)\
**Post date:** [September 30, 2025, 8:28am UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/2 "2025-09-30T08:28:27Z")

</div>

update :

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/e/e6eeccd9853645641775ff73e46492691d0af70b.png)

---

<div class="post-metadata">

**Author:** ![JBO\_LV](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@JBO\_LV](https://www.wago.community/u/JBO_LV)\
**Post date:** [September 30, 2025, 8:51am UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/3 "2025-09-30T08:51:02Z")

</div>

Hi,

Please validate that you got Modbus Master device at upstream of Slave device.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/d/dc18f3abc2433dbc6539d18cd78695913ab1defc.png)

---

<div class="post-metadata">

**Author:** ![WagoUser44](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WagoUser44](https://www.wago.community/u/WagoUser44)\
**Post date:** [September 30, 2025, 9:52am UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/5 "2025-09-30T09:52:23Z")

</div>

I have this

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/f/ffc73b83b513db870e31cbb73607eab0d171ca53.png)

---

<div class="post-metadata">

**Author:** ![JBO\_LV](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@JBO\_LV](https://www.wago.community/u/JBO_LV)\
**Post date:** [September 30, 2025, 11:55am UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/6 "2025-09-30T11:55:20Z")

</div>

Looks like the true one.

Then you should set right Unit ID for the Slave device and configure the Modbus Channel with preferred list of registers to pool from meter, afterwards map the variables and call this variable from POU to get it pooled from Slave device.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/e/e1e373790b3c55905bdd4c875b7cf71c6803800e.png)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/2/2838c57cf790060976e80dac5fb493c5d64a2183.png)

---

<div class="post-metadata">

**Author:** ![WagoUser44](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WagoUser44](https://www.wago.community/u/WagoUser44)\
**Post date:** [September 30, 2025, 12:40pm UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/7 "2025-09-30T12:40:58Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/b/bfbb68064d148197adb9e1b5b624d3ff750aa6a5.png)

I mapped the register with my variable but the value is still 0 and I have the warning “Bus doesn’t work. it may be that the values displayed are no longer current”

---

<div class="post-metadata">

**Author:** ![WagoUser44](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WagoUser44](https://www.wago.community/u/WagoUser44)\
**Post date:** [September 30, 2025, 12:49pm UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/8 "2025-09-30T12:49:42Z")

</div>

The defined variable in my program is :

`TestSignal : WORD;`

---

<div class="post-metadata">

**Author:** ![Thruser](https://avatars.discourse-cdn.com/v4/letter/t/d26b3c/32.png) [@Thruser](https://www.wago.community/u/Thruser)\
**Post date:** [September 30, 2025, 8:37pm UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/9 "2025-09-30T20:37:30Z")

</div>

Hi,

is the red marked variable mapped to your TestSignal variable?

TestSignal is declared as WORD and the mapped variable is declared as ARRAY [0..0] of WORD. You have to map the variable in the second line where type is word.

Then you have to use the variable in the program also.

---

<div class="post-metadata">

**Author:** ![WagoIcard](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagoicard/32/1508_2.png) [@WagoIcard](https://www.wago.community/u/WagoIcard)\
**Post date:** [October 1, 2025, 2:34am UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/10 "2025-10-01T02:34:34Z")

</div>

First, you have to be sure the communication part work before talking about variables.  
Can you do a screenshot of the slave “General”, “Canal serveur Modbus”, “Init serveur Modbus”.  
Thanks.

---

<div class="post-metadata">

**Author:** ![WagoUser44](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WagoUser44](https://www.wago.community/u/WagoUser44)\
**Post date:** [October 1, 2025, 7:27am UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/11 "2025-10-01T07:27:33Z")

</div>

For the start address in the canal server I set to 16#C550 because of the documentation of the meter I use : [MODBUS tables of Countis\_E43](https://www.socomec.fr/sites/default/files/2021-05/COUNTIS-E43-MODBUS-48503065_COMMUNICATION-TABLE_2019-09_CMT201266_EN.html)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/a/a60e496aa1ff8a2775391467f0f06bb346b53662.png)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/b/b28fd8c06e38fca17cf3430f155ed48216cc1ef0.png)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/f/f9ab473963f69314b157d418e4c8315ee8c6b07e.png)

---

<div class="post-metadata">

**Author:** ![WagoUser44](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WagoUser44](https://www.wago.community/u/WagoUser44)\
**Post date:** [October 1, 2025, 7:35am UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/12 "2025-10-01T07:35:13Z")

</div>

Yes it’s mapped to my variable, oh okay I understand, I will test , thanks

---

<div class="post-metadata">

**Author:** ![WagoUser44](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WagoUser44](https://www.wago.community/u/WagoUser44)\
**Post date:** [October 1, 2025, 7:38am UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/13 "2025-10-01T07:38:46Z")

</div>

It don’t works 😕 but thanks for your help

---

<div class="post-metadata">

**Author:** ![WagoIcard](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagoicard/32/1508_2.png) [@WagoIcard](https://www.wago.community/u/WagoIcard)\
**Post date:** [October 1, 2025, 7:50am UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/14 "2025-10-01T07:50:29Z")

</div>

Seems weird.  
Can you try in the variable, instead of linking a variable from the project, declare a variable in the “ModbusGenericSerialServer Mappage E/S” and call this variable in your program.  
Thanks.

---

<div class="post-metadata">

**Author:** ![WagoUser44](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WagoUser44](https://www.wago.community/u/WagoUser44)\
**Post date:** [October 1, 2025, 8:02am UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/15 "2025-10-01T08:02:20Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/b/bb46041550c990dc09c40496aee2959e511f8495.png)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/0/001773bc23ecd5a42027ddcc1d73aadf1d459a55.png)

---

<div class="post-metadata">

**Author:** ![TomasD](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/tomasd/32/2042_2.png) [@TomasD](https://www.wago.community/u/TomasD)\
**Post date:** [October 1, 2025, 8:05am UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/16 "2025-10-01T08:05:16Z")

</div>

Did you try to connect to the device directly and count this register? For starters, it is necessary to count directly through the cable and then do it in the program. Cables A and B are installed correctly? Could you confuse?

---

<div class="post-metadata">

**Author:** ![WagoUser44](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WagoUser44](https://www.wago.community/u/WagoUser44)\
**Post date:** [October 2, 2025, 4:14pm UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/17 "2025-10-02T16:14:54Z")

</div>

Hi,

No I didn’t try because I’m not on site but the staff on site said that everything is connected correctly so I don’t know what the problem can be

---

<div class="post-metadata">

**Author:** ![VegardS](https://avatars.discourse-cdn.com/v4/letter/v/a88e57/32.png) [@VegardS](https://www.wago.community/u/VegardS)\
**Post date:** [October 6, 2025, 10:46am UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/18 "2025-10-06T10:46:06Z")

</div>

Is the serial interface configured to RS485 in WBM? Administration - Serial Interface.

---

<div class="post-metadata">

**Author:** ![WagoUser44](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WagoUser44](https://www.wago.community/u/WagoUser44)\
**Post date:** [October 6, 2025, 3:02pm UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/19 "2025-10-06T15:02:18Z")

</div>

Yes it is configured

---

<div class="post-metadata">

**Author:** ![WagoUser44](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WagoUser44](https://www.wago.community/u/WagoUser44)\
**Post date:** [October 6, 2025, 3:03pm UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/20 "2025-10-06T15:03:47Z")

</div>

I have this by default

 ![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/2X/0/0451de1ea1bfa2838395f18c84e27fd2a29e32fd.png)

---

<div class="post-metadata">

**Author:** ![WagoUser44](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WagoUser44](https://www.wago.community/u/WagoUser44)\
**Post date:** [October 7, 2025, 2:28pm UTC](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320/21 "2025-10-07T14:28:19Z")

</div>

I don’t know if it’s useful but I’m connected to the controller remotely via VPN.

[Next page](https://www.wago.community/t/how-to-read-modbus-rs485-on-plc/2320.md?page=2)
