Technical Forum

OpenModbusTCP

Modbus TCP/IP Multiple instance call problem

Thread Starter: iffuz   Started: 8/7/2012 5:15 PM   Replies: 5

« Previous thread Next thread »
Page 1 of 1 (6 items)
  8/7/2012, 5:15 PM
Joined 11/29/2011
Last visit: 5/16/2013
Posts: 6
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Dear User.
I am using Modbus RED block (FB909) for modbus communication, My problem is that there are only 4 start value intialization available in FB909 due to which i have to call FB909 cyclically to increase number of intialisation value (in my case 6 start value with different DB address). But when i call FB909 any FC (in my case FC68 and FC77 differently with only one FC active at a time) still my Second time called FB909 is in busy state and it cannot process the defined modbus query

Can Any please help on this..

Thanking You  



=== Edited by iffuz @ 8/7/2012 5:17 PM [GMT ] ===


=== Edited by iffuz @ 8/7/2012 5:16 PM [GMT ] ===


Top
  8/7/2012, 5:51 PM
Joined 11/27/2007
Last visit: 5/22/2013
Posts: 840
Rating:
Rated: Outstanding [3.86 out of 5 / rated 58 time(s)]. (58) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello Iffuz,
it is only possible to call FB909 once for each connected communication partner.

If you need to read e.g. three blocks of holding registers, you should define only one (long) block of holding registers and read them with three different jobs/requests.

Regards,
Kaulquappe



=== Edited by Kaulquappe @ 8/7/2012 5:53 PM [GMT ] ===


=== Edited by Kaulquappe @ 8/7/2012 5:52 PM [GMT ] ===


Top
  8/7/2012, 6:31 PM
Joined 11/29/2011
Last visit: 5/16/2013
Posts: 6
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Dear Kaulquappe
Thanks for the Reply

Actually I want to Read & Write following modbus Address which i splitted as follows:
Read Input Start 10001 to 10665
Read Holding Register 40016 to 40180 (which i splitted in to two different queries as i cant read entire 166 registers together)
Write Coil 05001 to 05054
Write Register from 42001 to42085
So my total no of queries goes more 5 which is not possible to call in one instance.


Top
  8/7/2012, 7:11 PM
Joined 7/7/2010
Last visit: 5/21/2013
Posts: 1978
Rating:
Rated: Excellent [4.01 out of 5 / rated 200 time(s)]. (200) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
iffuz wrote:
Dear Kaulquappe
Thanks for the Reply

Actually I want to Read & Write following modbus Address which i splitted as follows:
Read Input Start 10001 to 10665
Read Holding Register 40016 to 40180 (which i splitted in to two different queries as i cant read entire 166 registers together)
Write Coil 05001 to 05054
Write Register from 42001 to42085
So my total no of queries goes more 5 which is not possible to call in one instance.

If you are using TIA Portal software and your remote device supports single call read/write Modbus FC #23, there is a MB/TCP library that would allow a single call to read and write values.  It was developed by Siemens applications engineers and where I work it is used quite a bit.  With the latest S7-1200 plc, the update (back/forth) is basically the same as scan time for a large PLC program (10-20 ms).  We can send data bidirectionally at a consistent rate of 50 Hz without losing data.

I think going any faster that scan time is not of much help in most cases, but perhaps with a 300 / 400 level plc, it might be even faster, but do not know.

Helpful? Rate it.
Solved? Post it.
Top
  8/7/2012, 9:09 PM
Joined 10/3/2008
Last visit: 5/2/2013
Posts: 522
Rating:
Rated: Outstanding [3.46 out of 5 / rated 52 time(s)]. (52) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi,
the 5 data areas (data_type_1, start_1..., data_type_2...) are not the runtime parameters, these are only the init parameters. With these parameters you say the modbus block, which registers should be managed in which dbs.
The runtime parameters are DATA_TYPE, START_ADDRESS, LENGTH and so on. These parameters you must change during the runtime. If the first telegram is finished (e.g. DATA_TYPE = 2, START_ADDRESS = 0, LENGTH = 665, WRITE_READ = FALSE), then you can change the runtime parameters for the next job. Have a look at the manual, there is a picture regarding the address mapping.

Wüstenräuber
Top
  8/8/2012, 7:19 AM
Joined 11/29/2011
Last visit: 5/16/2013
Posts: 6
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Dear  Wuestenraeuber
Thank you for reply, I got the idea of mapping modbus addresses and its working fine now.

Top
Thank you for this post from:
Page 1 of 1 (6 items)
Actions