Sporadic RS485 MODbus communication failure

Discuss Stepper motors, Drivers, Controllers, GUI's and related Accessories here.
Post Reply
dp1
Posts: 9
Joined: Fri Feb 22, 2019 10:16 am

Sporadic RS485 MODbus communication failure

Post by dp1 » Sun May 05, 2019 1:57 am

My setup is a RS485 wiring from a PC to the first driver(slave 2) (cable length 4m), daisy chained to the second driver (slave 1)(cable length .5m)
Second driver has termination resistors set using the switches on the driver.
Communication is at 9600Baud.
There is no 120Ohm resistor at the RS485 PC side.

The following trace of the MODbus communication is taken at the PC.

The idea behind the MODbus exchanges, is to get Info from both drivers.
then, as slave 1 is is alarm, an alarm reset command is issued, but was not executed by the driver (nor there was a response on the query),
hence the Alarm Status is not Reset..

In this trace I found 3 anomalies, 3 times a MODbus query to the driver is not answered by the driver.
It happens to both drivers, as shown on following trace
1) Slave 1, Set D-SEL0 mode failed ? Maybe because Drive in Alarm
2) Slave 2, Get position and speed failed ? Driver not in Alarm, so why ?
3) Slave 1, Alarm Reset failed ? Maybe because Drive in Alarm

What is the most likely cause of these communication failures?
If a driver is in Alarm '84'h status, how to clear that alarm from within MODbus ?

WaitObj 1 04-18h56m53
2 > 06x 0e0bx(3595) 0001x - 3b13x <<< Set D-SEL0 mode
2 < 06x 0e0bx(3595) 0001x - 3b13x <<< OK
2 > 06x 1393x(5011) 0000x - 7d50x <<< Slave Exception Return Mode
2 < 06x 1393x(5011) 0000x - 7d50x <<< OK
2 > 06x 0ec1x(3777) 00fex - 5b6dx <<< Associate OD #254 to D-SEL0
2 < 06x 0ec1x(3777) 00fex - 5b6dx <<< OK
1 > 06x 0e0bx(3595) 0001x - 3b20x <<< Set D-SEL0 mode ????? Does not get response
1 > 06x 1393x(5011) 0000x - 7d63x <<< Slave Exception Return Mode
1 < 06x 1393x(5011) 0000x - 7d63x <<< OK
2 > 03x 00ccx(204) 6 - 05c4x <<< Get Position,x,Speed ????? No response
2 > 03x 00fax(250) 2 - e409x <<< Get Motor Temperature
2 < 03x 4 ... - 8894x <<< OK
2 Regs 00fa(250):331, --- 33.1ºC
2 > 03x 007ex(126) 2 - a420x <<< Get Alarm Status
2 < 03x 4 ... - fc87x <<< OK
2 Regs 007e(126):20016, --- Status = '4E30'h
1 > 03x 00ccx(204) 6 - 05f7x <<< Get Position,x,Speed
1 < 03x 12 ... - 9370x <<< OK
1 Regs 00cc(204):0,0,0, --- Pos=0, Speed=0
1 > 03x 00fax(250) 2 - e43ax <<< Get Motor Temperature
1 < 03x 4 ... - fa74x <<< OK
1 Regs 00fa(250):308, --- 30.8ºC
1 > 03x 007ex(126) 2 - a413x <<< Get Alarm Status
1 < 03x 4 ... - ffcfx <<< OK
1 Regs 007e(126):3792, --- Status = '0ED0'h
1 > 03x 0a00x(2560) 4 - 47d1x <<< Alarm Record Detail
1 < 03x 8 ... - e408x <<< OK
1 Regs 0a00(2560):132,2, --- with Alarm Code 84h, Sub-Code 02h

WaitObj 258 04-18h56m56
2 > 03x 00ccx(204) 6 - 05c4x <<< Get Position,x,Speed
2 < 03x 12 ... - d071x <<< OK
2 Regs 00cc(204):0,0,0, --- Pos=0, Speed=0
2 > 03x 00fax(250) 2 - e409x <<< Get Motor Temperature
2 < 03x 4 ... - 8894x <<< OK
2 Regs 00fa(250):331, --- 33.1ºC
2 > 03x 007ex(126) 2 - a420x <<< Get Alarm Status
2 < 03x 4 ... - fc87x <<< OK
2 Regs 007e(126):20016, --- Status = '4E30'h
1 > 03x 00ccx(204) 6 - 05f7x <<< Get Position,x,Speed
1 < 03x 12 ... - 9370x <<< OK
1 Regs 00cc(204):0,0,0, --- Pos=0, Speed=0
1 > 03x 00fax(250) 2 - e43ax <<< Get Motor Temperature
1 < 03x 4 ... - fa74x <<< OK
1 Regs 00fa(250):308, --- 30.8ºC
1 > 03x 007ex(126) 2 - a413x <<< Get Alarm Status
1 < 03x 4 ... - ffcfx <<< OK
1 Regs 007e(126):3792, --- Status = '0ED0'h
1 > 03x 0a00x(2560) 4 - 47d1x <<< Alarm Record Detail
1 < 03x 8 ... - e408x <<< OK
1 Regs 0a00(2560):132,2, --- with Alarm Code 84h, Sub-Code 02h

WaitObj 1 04-18h57m19
2 > 06x 007dx(125) 0080x - 1841x <<< OP Alarm RST
2 < 06x 007dx(125) 0080x - 1841x <<< Alarm RESET OK
2 > 06x 007dx(125) 0000x - 19e1x <<< OP Reset
2 < 06x 007dx(125) 0000x - 19e1x <<< OP Reset OK
1 > 06x 007dx(125) 0080x - 1872x <<<<< OP Alarm RST ????? does not get response
1 > 06x 007dx(125) 0000x - 19d2x <<< OP Reset
1 < 06x 007dx(125) 0000x - 19d2x <<< OP Reset OK

WaitObj 258 04-18h57m21
2 > 03x 00ccx(204) 6 - 05c4x
2 < 03x 12 ... - d071x
2 Regs 00cc(204):0,0,0,
2 > 03x 00fax(250) 2 - e409x
2 < 03x 4 ... - 8894x
2 Regs 00fa(250):331,
2 > 03x 007ex(126) 2 - a420x
2 < 03x 4 ... - fc87x
2 Regs 007e(126):20016,
1 > 03x 00ccx(204) 6 - 05f7x
1 < 03x 12 ... - 9370x
1 Regs 00cc(204):0,0,0,
1 > 03x 00fax(250) 2 - e43ax
1 < 03x 4 ... - fa74x
1 Regs 00fa(250):308,
1 > 03x 007ex(126) 2 - a413x
1 < 03x 4 ... - ffcfx
1 Regs 007e(126):3792,
1 > 03x 0a00x(2560) 4 - 47d1x
1 < 03x 8 ... - e408x
1 Regs 0a00(2560):132,2,

WaitObj 0 04-18h57m33

om_tech_support_KR
Posts: 32
Joined: Thu Jan 11, 2018 3:03 pm

Re: Sporadic RS485 MODbus communication failure

Post by om_tech_support_KR » Tue May 07, 2019 10:21 am

Hi Dominique,

Since this looks to be happening when you switch writing between the 2 axis could be there isn't enough delay between the 2 messages sent. I would try adding a longer delay between them. Also you can do an alarm reset to reset the 84h alarm code this is a RS-485 communication error so this must be fixed first before it can be reset. To read the present alarm you would read the register 0081h to check if there is one present preventing you from doing an alarm reset.

dp1
Posts: 9
Joined: Fri Feb 22, 2019 10:16 am

Re: Sporadic RS485 MODbus communication failure

Post by dp1 » Sat May 11, 2019 11:29 pm

I changed my application so that now when a new MODbus request with a slave ID different from previous ID has to be issued,
I first do a sleep of 5ms. This avoids all Communication Errors (84h) I got switching axis.

A sleep time of 3ms was not enough.

Post Reply