S7-1200 Modbus RTU Reads

Jieve

Member
Join Date
Feb 2012
Location
USA
Posts
274
Hi all,
reading out parameters from a Weg CFW500 VFD using a Siemens S7-1214 CPU over Modbus RTU (CB1241). Using the PLC's built-in Modbus instructions, I'm able to communicate with the VFD. I'm having a bit of an issue though, as there are multiple parameters I'd like to read out, and the parameter numbers are not consecutive. In one modbus master command, I can read out up to 125 consecutive modbus holding registers. However, I've noticed that if the VFD skips a parameter (i.e. goes from P0007 to P0009), if the missing word is included in the address range to be read, that read will return nothing for all parameters. In order to get around this, I'm reading one parameter at a time using a loop. However, this is time intensive; each execution is something like 35ms, so reading 12 parameters is already almost half a second, whereas a single read of 8 parameters was 45ms.

1) Does anyone know of a way to read multiple non-consecutive modbus holding registers with a single modbus master instruction call?

2) Also, does anyone know why the existence of a missing parameter returns nothing for all variables, and if there are any other ways around this?
Thanks.
 
1. It is not possible.
2. Contact Weg, as VFD should return 00 or FF for register that is not used but it is in existing and regular range.
 
I found the same problem when trying to block read registers from a power meter using a Siemens PLC and then a Redlion HMI. I couldn't figure if it was the meter that failed to send because of the missing register, or the PLC/HMI that was failing on receive. Either way round, you can't fix it, you just have to work around it.
As you say, reading registers one by one is a way to go, but slow. I found it quicker to use more than one Modbus read block, though getting the timing to work between blocks was a bit of a pain. I ended up with 8 separate Modbus Read blocks, which used a lot of work memory.
Fortunately for me we changed to Redlion HMIs and having multiple block reads was a dream compared with Siemens.

I found this that has information covering multiple modbus read blocks, searched for 'siemens s7-1200 multiple modbus reads':
https://support.industry.siemens.co...-the-s7-1200-controller-via-modbus-rtu/251421
 
1. It is not possible. One modbus query is consecutive registers.
2. If modbus mapping is done only for parameters and not for registers, then missing paramter means that there isn't modbus register (spare) and you need start another modbus query after blank registers.


Speeding coms up. You can read parameters only certain intervals or if needed so other reads are faster as there isn't so much querys normally.


It looks like that there is TCP modbus module for Weg. With that is is probably possible send multiple modbus querys same time for VFD (Check from Siemens 1200 how many sockets it support same time. I think that it is 4, 8 or 12 depending of firmware and version).

Also TCP is much faster than RTU so coms should be faster.

(Unless Weg TCP module is RTU to TCP converter which is wired to serial port which is bottleneck still.)
 

Similar Topics

I have 3 control panels made by an OEM, they are all identical and have a Siemens S7-1200 PLC with a Siemens CB-1241 Modbus card talking to 2...
Replies
8
Views
4,493
Hi Everyone, First Project with Siemens and I need to communicate via RS-485 to a Tank Level Hub using Modbus RTU. I will be using the CB 1241...
Replies
13
Views
3,790
I am just getting information about a need that a site has. They currently have a machine that has a ML1200 and is being interfaced to by a...
Replies
16
Views
6,616
Hi all, I've hit a bit of a brick wall and need some help. I'm currently trying to get a Siemens S7-1200 PLC to talk to an Eaton DE1 Drive I'm...
Replies
8
Views
3,661
Hi all! So I got tasked with this fun little project. I have never done anything with MODBUS RTU and am having quite a bit of fun doing this. One...
Replies
3
Views
2,297
Back
Top Bottom