Technical Forum

Communication / Networks

Modbus Sample Project

Erstellt von Saravana kumar am 13.06.2010 15:54 (44 Antworten)

« Vorheriges Thema Nächstes Thema »
12345» Seite 1 von 5 (45 Objekte)
  13.06.2010, 15:54
Beigetreten am: 06.02.2009
Letzter Besuch: 17.06.2013
Beiträge: 563
Bewertung:
Bewertung: Exzellent [4,27 von 5 / 70 mal bewertet]. (70) 
Bewertung: Exzellent [5 von 5 / 8 mal bewertet]. (8) 

Dear All,

With this mail I have attached the sample project for the modbus communication between CP341 (Modbus Master Module) and the third party slave devices with the one sample slave devices manual for what the sample project is made. 

In this program I have used FB50 as the Modbus standard block; this block can be called multiple times in your program. One block call is for one number of CP341 Modbus master modules.

This program is the tested one and I am using it in my projects,

 

Blocks associated with the FB50 is

FB 7 = Modbus_Rcv (Siemens standard block)

FB 8 = Modbus_Send (Siemens Standard Block)

DB1 = Send list DB (Modbus Queries list)

DB3 = Modbus Misc

DB4 = Modbus Data (Received Data’s)

Modbus Misc DB is used to feed inputs as well as status feedbacks form the FB50.

 

Advantages of using this block,

  1. You can set more then one query to the modbus slave devices upto 128 queries.
  2. Communication failure status for each query (available in Misc DB3).By using this, it is easy to get the healthiness of the slave devices located in various location of the plant.
  3. No need to use pulse time for query increment. Jump from one query to next query is depending on the reply for the previous query.
  4. Receive list offset can be entered directly in the Misc DB, no need of additional logic.
  5. You can call the FB 50 multiple times inside the program with the associated blocks for the one more Modbus Master module (CP341).
  6. Use Modbus variable table in the sample project for testing of your devices.

Use the Modbus block and achieve communication tasks quickly and easily without any problem.

Please revert back for any clarification.


Dateianhang: Modbus.zip  (1308 Downloads)

_______________________________________________________________
Best Regards
T.Saravana Kumar

"All for the Best"

Top
Für diesen Beitrag bedankt sich:
  14.06.2010, 13:05
Beigetreten am: 05.01.2009
Letzter Besuch: 05.04.2012
Beiträge: 83
Bewertung:
Bewertung: Überdurchschnittlich [2,89 von 5 / 9 mal bewertet]. (9) 
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
thanks buddy it is really helpful...

Just like to share that know a days we are insisiting client to go for SIEMENS PAC devices.. i.e. 3100, 3200 & 4200.... instead of EM of conzerve.

PAC 3200 has ethernet port inbuilt through which we actually by pass DCS and almost all the wiring and programming ...

for details refer the below link :-

https://support.automation.siemens.com/WW/llisapi.dll?func=cslib.csinfo&lang=en&objid=7KM21111BA003AA0&caller=view

make full use of it and recommend the same form the our product basket
Top
  25.01.2011, 08:23
Beigetreten am: 14.12.2010
Letzter Besuch: 06.06.2013
Beiträge: 81
Bewertung:
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
Dear Saravanakumar,
                                      Thanks for your programm,its very helpful for me.

Here i have used 19no EM6400 CONZERV meter.and also i send one slave device to 3 send quirey .Totaly19*3=57 send quiery.and also iam used your programm only.

here i can able to get data from slave 1 to slave 13.

Remaining slave 14 to salve 19 datas are im not geeting.I got communication failure error in your misc db from query40 to 57.

How can i getting remaining salve datas from node 14 to19.

In your programm only 13 slave possible?


And also i have one doubt in fb50.in that fb50 you used network2.

network2

L #module reset time_run
L 13
>I


You mentioned 13 for what? no of slave or any thing else?

Kindly give us solution.

Thanks in advance..
im in bottle neck











“Change will not come if we wait for some other person or some other time. We are the ones we have been waiting for. We are the change that we seek”
Top
  13.04.2011, 07:22
Beigetreten am: 27.03.2007
Letzter Besuch: 07.07.2011
Beiträge: 19
Bewertung:
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
Dear Saravanakumar,

Is it possible if i change to Modbus RTU master protocol. Will it work?

I need to establish connection between CP341(master) and SEPAM(slave)

Appreciate your help.

Thank you
Top
  13.04.2011, 08:14
Beigetreten am: 06.02.2009
Letzter Besuch: 17.06.2013
Beiträge: 563
Bewertung:
Bewertung: Exzellent [4,27 von 5 / 70 mal bewertet]. (70) 
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
HI,

Yes, you can use the program for your configuration.

_______________________________________________________________
Best Regards
T.Saravana Kumar

"All for the Best"
Top
  13.04.2011, 09:49
Beigetreten am: 14.05.2009
Letzter Besuch: 14.12.2012
Beiträge: 150
Bewertung:
Bewertung: Herausragend [4 von 5 / 1 mal bewertet]. (1) 
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
hello my friend

siemens pac module doesn't support modbus rotocol.
you can use profibus network instead of modbus, it's very simple and there are very source code for profibus.
\
Top
  13.04.2011, 11:17
Beigetreten am: 27.03.2007
Letzter Besuch: 07.07.2011
Beiträge: 19
Bewertung:
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
Saravana kumar wrote:
HI,

Yes, you can use the program for your configuration.


Dear Sir,

Now there are Tx and Rx on my CP but my SEND status always indicate 0830 with error.

Fyi, im using MDbus(on my PC) as slave and there is ADAM-4522 for Rs232/rs485 converter in between.

Appreciate your help. Thank you.

Rgds,
majoi
Top
  14.04.2011, 11:44
Beigetreten am: 27.03.2007
Letzter Besuch: 07.07.2011
Beiträge: 19
Bewertung:
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
majoi wrote:
Saravana kumar wrote:
HI,

Yes, you can use the program for your configuration.


Dear Sir,

Now there are Tx and Rx on my CP but my SEND status always indicate 0830 with error.

Fyi, im using MDbus(on my PC) as slave and there is ADAM-4522 for Rs232/rs485 converter in between.

Appreciate your help. Thank you.

Rgds,
majoi



Its working now...Thanks all!
Top
  14.04.2011, 14:41
Beigetreten am: 14.12.2010
Letzter Besuch: 06.06.2013
Beiträge: 81
Bewertung:
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
Dear Saravana kumar,
                                       Here i have used your modbus programm with same EM6400 conzerv meter.

As i have facing problem in reading of watt hour(wh) parameter.
This watt hour parameter is some times matching with meter value and some times mismatch with meter value.
 I means values up and down coming in reading of watt hour parameter.I thought you also reading same watt hour parameter.If you also facing same problem in watt hour parameter update me.

for further details here i have attached screen shots for your reference.

Kindly give us solution

Thanks for advance.

Dateianhang: EM6400 KWH trends.gif  (191 Downloads)

“Change will not come if we wait for some other person or some other time. We are the ones we have been waiting for. We are the change that we seek”

Top
  15.04.2011, 03:56
Beigetreten am: 06.02.2009
Letzter Besuch: 17.06.2013
Beiträge: 563
Bewertung:
Bewertung: Exzellent [4,27 von 5 / 70 mal bewertet]. (70) 
Bewertung: keine [0 von 5 / 0 mal bewertet]. (0) 
Hi,

I did't faced any problem in reading KWH reading.

I have an idea to solve is that you just manullly count the running hours of the EM6400 inside the PLC logic and multiply that value with Watts.

Hope this helps.

_______________________________________________________________
Best Regards
T.Saravana Kumar

"All for the Best"
Top
12345» Seite 1 von 5 (45 Objekte)
Aktionen