is it possible to commutate from Slave to master in MODBUS Protocol

baidimed

Member
Join Date
Jul 2008
Location
ariana
Posts
23
is it possible to commutate from Slave to master in MODBUS Protocol Details:I want to use S7 200 in MODBUS on Slave Mode .When it detects that his Master is absent , It must commutate in Master Mode to replace his XMaster in The networks.
so I used the MODBUS library and Microwin sp5.
my problem consiste of:
if the S7 200 comutate from Slave to Master Mode the comunication is blocked.
the cross-reference has show that the maker of the subroutine MBUS_CTRL has used the SM0.1.
so I can call this subroutine in my application one time but I like the PLC always call them when it commutate in master mode . I can't access to this subroutine because it is protected by password.
I want to change this subroutine in order to change the SM0.1 out the subroutine
 
Don't worry about the SM0.1 ..
Just be sure not to start the Master mode until slave mode has been disabled completely...
 
i like commutate from Master to slave and from slave to master Mode in all time because i have a radio networck whith three PLC S7 200
they communicate one to an other
master
||<_________radio modbus (configuration 1)
________||_______
| |
Slave1 __________Slave 2


if i have a probleme with my master the Slave1 will come back Master. So i have this configuration

Slave1 in Master mode ________Slave2 (configuration 2)

when the probleme resolved with my first master the process return to the first (configuration 1)
 
It is a good concept.. I think it should work, just disable one mode and then enable the second one.. What errors are you receiving?
 
the plc start in Slave mode .if it commutate from slave to master it cant communicate with the slave2 and i have an error 10 in MBUS_CTRL which I can't understand it.

and i have the same probleme if the plc start in master mode and he commutate from Master to slave
 
I never tried to use both modbus fcn on one plc so I can't guarantee that it works but it seems like you didn't initialize it right. Did you disable the slave fcn before master init?

EDIT: I'd try -> mbus_init mode 0 -> mbus_init and mbus_slave disable -> mbus_ctrl enable -> mbus_msg en -> mbus_msg start
and back: mbus_msg done-> mbus_msg disable -> mbus_ctrl disable -> mbus_init -> mbus_slave enable -> mbus_init mode 1



What plc do you have? could you use port 0 for the slave fcn and port 1 for the master?
 
Last edited:
Jiri Toman said:
Did you mean communicate?
No, he means commute :)
He wants to alternate states of the port on one station, so that the station changes from being a modbus slave to be a modbus master and back, to be master and slave in one..
 
m_turk said:
No, he means commute :)
He wants to alternate states of the port on one station, so that the station changes from being a modbus slave to be a modbus master and back, to be master and slave in one..

thx to help me
i used the port 0 in Slave PLC and Slave_Master PLC
 

Similar Topics

Hello The plant is running and there is no shutdown nowadays therefore I can add 1734- AENTR and its card while PLC is in Run? I do not wanna...
Replies
1
Views
113
Folks, I have a client with an old ABB Advant / MOD300 system (v14.4). Around y2k I installed the ABB Industrial IT MOD300 OPC Server 1.1/2...
Replies
0
Views
65
Hi all so i have a robot project im working on were i need to set the layers. using the hmi screen i would like to use the numeric data display to...
Replies
11
Views
768
I have a FactoryTalk View Se project, Is it possible to export Direct Reference tags to edit in a CSV file or Excel? I know I can export HMI...
Replies
1
Views
266
If I have a PanelView Plus, is it possible to show historical data via historian on it? I have the application all setup in FT Studio Machine...
Replies
3
Views
456
Back
Top Bottom