4/28/2012 3:07 PM | |
Joined: 12/1/2009 Last visit: 10/27/2024 Posts: 672 Rating: (147) |
Hi nikoska, I think you need tocontact with the manufacturer of thatblack box in order to solve your problem. I might could help you in case you usea CP34x, there I wrote the modbus master RTUdriver myself and can do whatever is the requirement. Regards. |
Give us your feedback and show us your respect! |
|
5/1/2012 3:57 PM | |
Joined: 1/17/2007 Last visit: 10/21/2024 Posts: 1547 Rating: (537)
|
The black box is using what are known as extended holding registers. These were a later addition to the modbus protocol, and not all modbus devices support them. It seems that the S7-1200 device falls into the category. I suggest that you could use a modbus protocol convertor. This is a hardware device that sits between the 2 devices. As its name suggests, its purpose is usually to convert one protocol to another (e.g. modbus RTU to modbus ASCII say). However, it can be used to remap the registers from one modbus RTU device to another. I have used one such device to do this in the past. The one I used is made by a company called anybus. Click here for details. The Anybus device has a built-in modbus RTU slave for one side, and a loadable protocol for the other side (one of which is a modbus master RTU protocol). The configuration of the device is through wizards, so no programming knowledge is required. So you would load in the modbus master RTU protocol to the convertor. The convertor master side would connect to your black box and poll the extended holding registers. These can then be remapped internally in the convertor to 40001 addresses. These can now be read by the S7-1200 master from the convertors modbus slave RTU interface. So the S7-1200 would think it was reading the 40001 adresses, but it would actually be reading the extended holding register addresses. |
Programming today is the race between software engineers building bigger and better idiot proof programs, and the universe producing bigger and better idiots. |
|
5/2/2012 1:23 PM | |
Joined: 12/1/2009 Last visit: 10/27/2024 Posts: 672 Rating: (147) |
Thanks smiffy, good to know about that device, for the case I need one in future. Do you have information about the frame structure of accessing these extendend addresses. I just have the standard serial & TCP modbus protocol descriptions. Best Regards. |
Give us your feedback and show us your respect! |
|
6/20/2012 12:30 PM | |
Posts: 4 Rating: (1) |
Hello everyone, Thanks for the updates. Smiffy, I appreciate your solution, and indeed it seems it would solve the problem. However, it seems to me we are going the long way around. I can understand a legacy PLC 20 years old not supporting extended input registers, but not a newer and still updated device such as the S7-1200. Not to mention that the Modbus specification: http://www.modbus-ida.org/docs/Modbus_Application_Protocol_V1_1b.pdf dated 28 December 2006, very clearly states (page 7) that "In a MODBUS PDU each data is addressed from 0 to 65535". On page 16 it is even more exact, specifically for function 0x04 (read input registers) that the address is specified as 0x0000 to 0xFFFF, i.e. 16 bits. So it appears that the S7-1200 firmware is not compliant with the ModBus specification in this respect. So, I would put the matter to the S7-1200 firmware developers, they already implemented extended addressing for the holding registers, they must do the same for input registers. |
Follow us on