# Connect RS485 by PS9600 Communication Issue

**URL:** <https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779>\
**Category:** Controls & Vision\
**Tags:** modbus\
**Created:** [November 5, 2024, 10:00am UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779 "2024-11-05T10:00:52Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![kareem.mostafa](https://avatars.discourse-cdn.com/v4/letter/k/FF8800/32.png) [@kareem.mostafa](https://community.br-automation.com/u/kareem.mostafa)\
**Post date:** [November 5, 2024, 10:00am UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/1 "2024-11-05T10:00:52Z")

</div>

Hi every one  
I am new at B&R, so I am trying to connect RS485 with 3rd party py PS9600 with BB53 but I have error code with MBMaster which is “65535” when EventPV = True.

**I share with you my logic**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/4/44a5e95147a2590e407784b30bc58c203774c9ef.png)

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/3/3dda5656823eccdc12144f6e3e9df78d6bb4b1c0.png)

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/4/400cfd5c6894c1d4e83aa71f05e482301d9a9c6d.png)

**I share with you my error**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/e/e3bfa61872885c2efce00d40dcf0548e444b2eee.png)

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/f/f27d03ebec1963ba57760173e85594023d7f33ee.png)

---

<div class="post-metadata">

**Author:** ![oliver\_D](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/oliver_d/32/257_2.png) [@oliver\_D](https://community.br-automation.com/u/oliver_D)\
**Post date:** [November 5, 2024, 10:07am UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/2 "2024-11-05T10:07:05Z")

</div>

Hello, 65535 is no error - this status means “busy” or in other words the function block is currently working/executed

Looking at your code you are calling the funtion block in the cyclic part of the task without any condition

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/e/ea65afbdc43f74bce39872798110d45afab771a1.png)

This means it is executed every cycle → resulting in “busy” every cycle  
It is okay to call this function block and as you do not get any error code back I suppose your modbus is fine and running

---

<div class="post-metadata">

**Author:** ![kareem.mostafa](https://avatars.discourse-cdn.com/v4/letter/k/FF8800/32.png) [@kareem.mostafa](https://community.br-automation.com/u/kareem.mostafa)\
**Post date:** [November 5, 2024, 10:13am UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/3 "2024-11-05T10:13:57Z")

</div>

Thanks for reply  
what about this sttus code"20220" it apear also with “65535”

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/4/4d0f389065137d5b03057fd869753e025ea990c8.png)

---

<div class="post-metadata">

**Author:** ![kareem.mostafa](https://avatars.discourse-cdn.com/v4/letter/k/FF8800/32.png) [@kareem.mostafa](https://community.br-automation.com/u/kareem.mostafa)\
**Post date:** [November 5, 2024, 10:16am UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/4 "2024-11-05T10:16:21Z")

</div>

how I can troublshooting the communication because it is connected with 3rd party device but the data does not communicated.  
The “S” led at PS9600 is flashed onse every 2 sec.

---

<div class="post-metadata">

**Author:** ![oliver\_D](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/oliver_d/32/257_2.png) [@oliver\_D](https://community.br-automation.com/u/oliver_D)\
**Post date:** [November 5, 2024, 10:39am UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/5 "2024-11-05T10:39:34Z")

</div>

So you also get 20220 and not only “busy”

20220 means “timeout” or in other words a connection problem to the slave  
Either the slave is not responing at all or it takes too long to receive its answer.  
First thing is to check if the slave is even reachable. Here you have to check wiring and adress of the slave  
If it is then the used function codes / adress for modbus might be wrong

---

<div class="post-metadata">

**Author:** ![kareem.mostafa](https://avatars.discourse-cdn.com/v4/letter/k/FF8800/32.png) [@kareem.mostafa](https://community.br-automation.com/u/kareem.mostafa)\
**Post date:** [November 5, 2024, 10:49am UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/6 "2024-11-05T10:49:07Z")

</div>

I actualy use Modbus bool with USB-RS485 Converter not real device

**It is slave configuration**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/1/18acacd99e3b15d4c24988f5745cd1367f775a3c.png)

**it is Master Configuration**

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/3/391c61da48cd0696d7a24fe989ea1df634107a56.png)

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/7/723bd9d850ca7b6b7e93adda44696c35f6d76c0e.png)

![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/a/a9ac1e3759cc1e8421938df088cbc17936dfa334.png)

---

<div class="post-metadata">

**Author:** ![oliver\_D](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/oliver_d/32/257_2.png) [@oliver\_D](https://community.br-automation.com/u/oliver_D)\
**Post date:** [November 5, 2024, 11:03am UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/7 "2024-11-05T11:03:50Z")

</div>

The dataobject you handle tothe MbMopen function block defines your modbus functions and adresses.  
[B&R Online Help (br-automation.com)](https://help.br-automation.com/#/en/4/libraries%2Fdrv_mbus%2Ffbks%2Fmbmopen.html)

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/9/9c45c917d8be87915849d765a6e8de70fb3a7ae7.png)  
So either the slave does not fit to the masters configuzraiton object or the slave is not reachable  
I am sorry but I have never used this software nor a USB to RS485 converter

---

<div class="post-metadata">

**Author:** ![kareem.mostafa](https://avatars.discourse-cdn.com/v4/letter/k/FF8800/32.png) [@kareem.mostafa](https://community.br-automation.com/u/kareem.mostafa)\
**Post date:** [November 5, 2024, 11:19am UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/8 "2024-11-05T11:19:31Z")

</div>

can you help me to deactivate the “flow control” for this serial communication

---

<div class="post-metadata">

**Author:** ![oliver\_D](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/oliver_d/32/257_2.png) [@oliver\_D](https://community.br-automation.com/u/oliver_D)\
**Post date:** [November 5, 2024, 11:23am UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/9 "2024-11-05T11:23:43Z")

</div>

I am sorry but I am a bit lost now - why do you want to deactive this ?

---

<div class="post-metadata">

**Author:** ![kareem.mostafa](https://avatars.discourse-cdn.com/v4/letter/k/FF8800/32.png) [@kareem.mostafa](https://community.br-automation.com/u/kareem.mostafa)\
**Post date:** [November 5, 2024, 11:30am UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/10 "2024-11-05T11:30:28Z")

</div>

The RXD led at converter is open so the converter recive the data from PLC but not responded so I suppose may be the flow control can impact on the communication

---

<div class="post-metadata">

**Author:** ![oliver\_D](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/oliver_d/32/257_2.png) [@oliver\_D](https://community.br-automation.com/u/oliver_D)\
**Post date:** [November 5, 2024, 11:44am UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/11 "2024-11-05T11:44:07Z")

</div>

If the RxD is lit then the modbus master tries to establish communication and if you then get 20220 it would mean that the slave does not respond.  
I am no RS485 expert but I doubt that flow control is the problem here. I rather think the slaves settings (in terms of modbus) are incorrect

---

<div class="post-metadata">

**Author:** ![kareem.mostafa](https://avatars.discourse-cdn.com/v4/letter/k/FF8800/32.png) [@kareem.mostafa](https://community.br-automation.com/u/kareem.mostafa)\
**Post date:** [November 5, 2024, 1:38pm UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/12 "2024-11-05T13:38:26Z")

</div>

is configure the slave ID at “Pconfig” function only ? or Slave ID is configure at another place?

if it is configure at Pconfig only, is it OK, MBOpen not give error even intialize the PLC (when enabbled) and MBClose give same error “20220” when enabled ?

---

<div class="post-metadata">

**Author:** ![oliver\_D](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/oliver_d/32/257_2.png) [@oliver\_D](https://community.br-automation.com/u/oliver_D)\
**Post date:** [November 5, 2024, 1:53pm UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/13 "2024-11-05T13:53:27Z")

</div>

The dataobject you hand over to “pConfig” is the one describing the slave  
The content of this dataobject must fit to the slave as otherwise you will get errors when the master tries to access the slave.

As mentioned I do not know the software you are using and cannot quote if it is correctly set in order to fit to the masters settings (in temrs of modbus registers and adresses)

---

<div class="post-metadata">

**Author:** ![alexander.hefner](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/alexander.hefner/32/111_2.png) [@alexander.hefner](https://community.br-automation.com/u/alexander.hefner)\
**Post date:** [November 6, 2024, 6:57am UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/14 "2024-11-06T06:57:27Z")

</div>

Hi,

maybe I’m completely on the wrong track, but I would suggest to check again the physical connection first.

RS485 has to be terminated on both ends of the bus. Sometimes it works also without termination on short lines, but per definition a termination is mandatory.  
X20BB module has a integrated [terminating resistor](https://help.br-automation.com/#/en/4/hardware%2Fx20bb53%2Fabschlusswiderstand_fur_rs485.html), is it switched on? And has the USB device also a terminating resistor (if not, you can terminate the bus by connecting a 120 ohms resistor between the 2 data lines)?

In one of the screenshots I can see that you use a CH340 chipset based USB devices.  
In past, I had some trouble using that chipset together with Windows 10/11 (I played around with arduino and ESP chips), because of the proprietary CH340 drivers. Therefore, I personally prefer devices with CP2102 or FT232L chipsets, since those chipsets are using the windows standard drivers - maybe you have the possibility to test a different converter not using CH340 chip?

Independent of the chipset, a USB serial converter device maybe use 3.3V signal voltage only, but industrial devices maybe expect higher signal voltages (I haven’t tested it, but I could imagine), even if RS485 is using a differential signal.

So if possible, could you try to use a 2nd PLC or comparable industrial device as modbus slave?

Best regards!

---

<div class="post-metadata">

**Author:** ![kareem.mostafa](https://avatars.discourse-cdn.com/v4/letter/k/FF8800/32.png) [@kareem.mostafa](https://community.br-automation.com/u/kareem.mostafa)\
**Post date:** [November 13, 2024, 10:18am UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/15 "2024-11-13T10:18:51Z")

</div>

Hi  
I tried your suugestion for termination the communication cable and use anoter usp-Rs485 converter  
but same errror

---

<div class="post-metadata">

**Author:** ![kareem.mostafa](https://avatars.discourse-cdn.com/v4/letter/k/FF8800/32.png) [@kareem.mostafa](https://community.br-automation.com/u/kareem.mostafa)\
**Post date:** [November 13, 2024, 10:19am UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/16 "2024-11-13T10:19:57Z")

</div>

I tried to communicate the used converter with other devices, and it is work without any issue

---

<div class="post-metadata">

**Author:** ![kareem.mostafa](https://avatars.discourse-cdn.com/v4/letter/k/FF8800/32.png) [@kareem.mostafa](https://community.br-automation.com/u/kareem.mostafa)\
**Post date:** [November 13, 2024, 1:42pm UTC](https://community.br-automation.com/t/connect-rs485-by-ps9600-communication-issue/4779/17 "2024-11-13T13:42:30Z")

</div>

Dears,  
Thanks you all  
my issue is solved by upgrade the firmware of X20CP0483 for latest version  
BR.
