Logopaede
Is it possible to disable a modbus slave temporarily in OpenPLC?
(to prevent error messages and polling when administrative down)

I have three slaves on my Pi4 modbus master. Two ESP8266 and one RTU. I searched the forum and website, maybe it is related to a config.ini or config.example.ini -- but I have no idea at the moment, sorry.
Reply 0 0
thiagoralves
No, unfortunately there isn't a simple way to do that. All I can think about is for you to zero all the sizes. If the size is zero, OpenPLC won't query that particular register. But then you will have to put them back once you're done testing
Reply 0 0
Logopaede
Okay, that's the way it is.

I changed the Device Type from ESP8266 to 'Generic Modbus TCP Device' and then set all sizes to zero. But it has a few side effects. The start-address of the next slave shifts (%IW102->%IW101) and the powered down second slave fills the Runtime Logs with
Device nodemcu2 is disconnected. Attempting to reconnect...
Connection failed on MB device nodemcu2: Operation now in progress
Device nodemcu2 is disconnected. Attempting to reconnect...
Connection failed on MB device nodemcu2: Operation now in progress
...



Thank you for helping as best as possible, anyway!

PS: Late edit, sorry, had forgotten to paste the image.
Reply 0 0
NWT.Stuff
I don't have any experience with Slave Devices.

What is the physical situation for what you describe as "when administrative down" ?


Reply 0 0
Logopaede
Hi,
a network is dynamic, sometimes clients/slaves are just down or obsolete.
In my test-environment for example I wanted to test just the energy counter (Modbus-RTU), but always had to power on my two wireless slaves (Modbus-TCP) and their infrastructure.
Reply 0 0
thiagoralves
Yeah, I forgot about the fact that the following slave addresses would be shifted. There is no way to do this unless it is implemented in the modbus_master.cpp code directly
Reply 0 0
Logopaede
Okay, thank you. Maybe another target for the new OpenPLC Python SubModule (PSM).
Reply 0 0
NWT.Stuff
I need to have a go at slave devices. I have used ESP8266 before so I think I will start there. 
Reply 0 0
Reply