antonk Posted June 24, 2013 Report Share Posted June 24, 2013 Hi all, I have a question regarding slave adressing on Modbus. We have a V130 which we want to use as a slave on a Scada system. When I read about slave adressing in the help file the pointer value offset is given for each data type, no problems. However, when I read the examples (and also different topics regarding modbus here on the forum) another offset seem to occur. For example when writing a 3-bit vector of outputs starting at O8: "SCADA as the Modbus master to color PLC: Convert the HEX address to DEC.In the SCADA application, set the Slave: Start of Vector parameter to 46393 (30001 + 16384(4000h) + 8) and the Force: Vector Length parameter to 3, enabling the Master device to write to O 8 - O 10 within the slave Vision controller." Where does the 30001 come from? The 4000h is obvious since it's mentioned in the help file. A similar offset of 40001 seem to appear when reading/writing MI:s, 400001 for MF:s and so on. I must be missing something fundamental since I can't find any information about this offset. A couple of words around this would be much appreciated. Cheers from Sweden Anton Quote Link to comment Share on other sites More sharing options...
antonk Posted June 26, 2013 Author Report Share Posted June 26, 2013 Bumping this one since I got another question as well. I'm trying to establish communication with the V130 trough a ModBus simulator on a PC, often enough I can get a connection but I haven't been able to read or write anything to the PLC. I've tried several softwares and all of them has a field "Slave ID: ". Is this the ID filled in the Modbus config FB? I.e 255? Also, have anyone here used some kind of Modbus simulator with a Unitronics PLC they know to be good? Several of the ones I've seen are quite messy. I would really appreciate some input, both on this post and the first since I haven't been able to figure that one out either. Regards Anton Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted July 7, 2013 MVP 2022 Report Share Posted July 7, 2013 Anton, You didn't say whether you were using Modbus RTU (serial) or Modbus IP. If it's Modbus IP, the PLC slave address is always 255. RTU can be any slave address, but I usually use 1 for testing. Start your testing by reading and writing to MI's and don't worry about hex - it's a straight 1:1 decimal map. The only thing you have to remember is Unitronics is 0-based; MI 0 = Modbus 40001. The 3000x addresses are a throwback to when you could read Modicon Modbus Input modules directly - almost no one uses these addresses anymore. I wound up paying for a Modbus simulator that does everything I ever need - http://www.calta.com/mdbus.htm Joe T. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.