You are not registered yet. Please click here to register!

plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!

Go Back - Interactive Q & A > - Interactive Q & A > LIVE PLC Questions And Answers

Thread Tools Display Modes
Old July 13th, 2022, 02:30 PM   #1
United States

Jieve is offline
Join Date: Feb 2012
Location: USA
Posts: 242
S7-1200 Modbus RTU Reads

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?
  Reply With Quote
Old July 13th, 2022, 07:32 PM   #2
Supporting Member

goghie is offline
Join Date: Jan 2008
Location: Belgrade
Posts: 632
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.
  Reply With Quote
Old July 14th, 2022, 03:26 AM   #3
United Kingdom

Puddle is offline
Join Date: Mar 2022
Location: UK - The Norf
Posts: 83
Originally Posted by Jieve View Post
I can read out up to 125 consecutive modbus holding registers.

Try reducing your data length

Originally Posted by Page 23
The telegrams for request, as well as for response, cannot exceed 64 bytes.
  Reply With Quote
Old July 14th, 2022, 03:26 AM   #4
United Kingdom

BryanG is offline
Join Date: Feb 2005
Location: Manchester
Posts: 1,773
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':
Knowledge is power, share the knowledge.
  Reply With Quote
Old July 14th, 2022, 03:52 PM   #5

Lare is offline
Join Date: Jan 2006
Location: Finland
Posts: 1,820
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.)
  Reply With Quote
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
MicroLogix 1100 Modbus RTU radio link mylespetro LIVE PLC Questions And Answers 31 July 27th, 2022 07:57 AM
Micro830 ModBus RTU Master configuration NBlackwell LIVE PLC Questions And Answers 5 March 10th, 2020 07:39 PM
MODBUS RTU s7-1200 and Et200s software difference naturephoenix LIVE PLC Questions And Answers 7 July 2nd, 2017 01:48 PM
MicroLogix 1200 in Modbus mode rtu slave mode does not respond java application jamod yuri90 LIVE PLC Questions And Answers 0 March 27th, 2015 02:44 PM
Modbus Master not polling the Modbus Slave through an EtherNet/IP Connection mihiri LIVE PLC Questions And Answers 3 July 15th, 2010 03:41 AM

All times are GMT -4. The time now is 12:30 PM.