CJT
I regularly use software for test feeds into KEPwareEX and SCADA.  My environments use a laptop running either Witte's Modbus Slave software or the much older software, MDBus.  However, I need to simulate multiple slaves at the same time.  As I happen to have 7 Raspberry Pi's connected to a switch (from a different project) it would be really great if I could use those as my test modbus slaves but I can't find any equivalent software.  Is anybody aware of equivalent software?
Reply 0 0
thiagoralves
Yes. Just install OpenPLC Runtime on all of them.
Reply 0 0
fg71
Other approach is to use pyModbus and setup 7 Modbus Server and use 1 Raspberry Pi or PC. From Python you could simulate any data type
you like to read or write from your Client. You do not need directly 7 devices to simulate 7 Modbus Servers. You use different port number for your servers. If you have JavaScript knowledge you could also use Node-Red and use function node to setup your feed. It would be the same your Client could read or write to the Modbus Server node.
 
I have done both approaches to test Scada or HMI.
Reply 0 0
CJT
Other approach is to use pyModbus and setup 7 Modbus Server and use 1 Raspberry Pi or PC. From Python you could simulate any data type
you like to read or write from your Client. You do not need directly 7 devices to simulate 7 Modbus Servers. You use different port number for your servers. If you have JavaScript knowledge you could also use Node-Red and use function node to setup your feed. It would be the same your Client could read or write to the Modbus Server node.
 
I have done both approaches to test Scada or HMI.
Thanks fg71 - A colleague has talked about Node-Red in a very positive way... so I'll look into that first.  I have a little JavaScript experience (but enough coding in other languages (including Python) to get me through).  I'll also take a look at pyModbus as I haven't heard of that!
Reply 0 0
CJT
Yes. Just install OpenPLC Runtime on all of them.
 
Hello tiagoralves, thank you for getting back so quickly!  From what I've read in the documentation, it seems like there's a lot required to set up OpenPLC. I just need a simple Modbus slave that I can pop in random values for registers and coils to enable KEPwareEX to obtain values from.
Reply 0 0
fg71
For the Modbus node in Node-Red you make a instance of object by configure the Modebus server node. You could use inject node to do injection automatic per time (ex. every second). From the function node you could have for loop to increment by 1 to simulate a analog signal.
If you then read the analog signal from your Client it will increase every time Node-Red make a injection. Or you could setup a array of numbers and read the index in for loop. You do not need much JavaScript to make that happen.
 
You do need to know how Node-Red is working there is some keywords like msg.payload and how to set/get a value in JSON object if you like to debug your Modbus server inside Node-Red before you use your Client. You could setup Modbus Client in Node-Red to do that.
Reply 0 0
thiagoralves
 
Hello tiagoralves, thank you for getting back so quickly!  From what I've read in the documentation, it seems like there's a lot required to set up OpenPLC. I just need a simple Modbus slave that I can pop in random values for registers and coils to enable KEPwareEX to obtain values from.
Three commands on terminal and you’re good to go:
git clone https://github.com/thiagoralves/OpenPLC_v3
cd OpenPLC_v3
./install.sh linux
 
Reply 1 0
Reply