Need Help Siemens MB_COMM_LOAD

dabanani

Member
Join Date
Feb 2009
Location
Mo
Posts
85
Hello guys,
I am new to Siemens PLC world and I have a task of setting up communication via modbus to send and receive analog data to a device.
I tried to read help files on MB_COMM_LOAD but cannot fully understand.

By the way I am using Siemens software TIA version 11.

Can anyone help explain to me how to program communication through modbus especially how addressing work for several analog inputs and outputs
Thank you in advance for your help
 
I guess that it is an S7-1200 that you are working on and I would recommend that you upgrade TIA Portal software to version 12 SP1

The "MB_COMM_LOAD" instruction configures a port for communication using the Modbus RTU protocol.
"MB_COMM_LOAD" must be called once to configure the port for the Modbus RTU protocol. On completion of the configuration, the port can be used by the "MB_MASTER" and "MB_SLAVE" instructions.
"MB_COMM_LOAD" only needs to be called again if one of the communication parameters has to be modified. Each "MB_COMM_LOAD" call deletes the communications buffer. To avoid data loss during communication, you should not call the instruction unnecessarily.

Here you will find a sample program with communication between two S7-1200:
http://www.automation.siemens.com/DK/forum/guests/PostShow.aspx?PostID=163550&language=en
 
jERA,
Thank you for the information, and yes it is S7 1200 and unfortunately it is TIA V11, I am working on upgrading to version 12.

On MB_MASTER, how do I select addresses for example if the address is 40001, where does it come from? Are there fix addresses for different ports? I am trying to send four analog signals through modbus.

Thanks for your help and is highly appreciated.
 
0= Coil or user controllable boolean
1= Digital Input or I/O controlled boolean
2= Sequencer reference (not currently in use)
3= 16 bit word input or I/O controlled input word
4= 16 bit word user memory
5= Latch reference (not currently in use)
6= User Data File memory,

Hope this will help.
I think 40001 in master is MW0. 40002 is MW1. and so on.
 
Thank you,
I do have a program but for some reason I cannot get signals to and from the device through the modbus. Can you guys look the screen shots for me to see what I have done wrong. I am new to the Siemens plc world, any help will be highly appreciated.

Three screen shots are attached, page 1 is the COMM_LOAD_MB, Page 2 is the MB_MASTER ; page 3 is the wiring schematic for the A/D converter. From Plc is RS485 to db9 to terminal block converter and then to the A/D converter.

Thanks any help will be nice.

PAGE 1.jpg PAGE 2.jpg PAGE 3.jpg
 
I have looked at your pictures, and have the following comments.

MB_COMM_LOAD
Is the port number correct? it must be the same as the hardware module.
Port ID appear in the drop-down list by clicking PORT connection or view the hardware configuration of the module (hardware identifier)

What are the values ​​of "status" after making a connection? See help for MB_COMM_LOAD (click MB_COMM_LOAD to select it and press F1) for the status codes.

MB_MASTER
EN must not be = 0 when the instruction is used

REQ must = 1 for data sent / received

MODE must be required option for send / read data

What are the values ​​of "status" when the instruction is used? See help for MB_MASTER (click on MB_MASTER to select it and press F1) for the MODE and status/error codes
 
Thank you Jera,
I finally have the program working, the problem was settings in the device that the PLC suppose to be talking to. The Baud rate and channel numbering were not matching. After reading your post today, I was able to double check the settings.

Once again thank you for your time and help
 

Similar Topics

Hi all, Got a call from a client that has several small water systems, asked me to take a look at one I've never programmed, just troubleshot a...
Replies
22
Views
5,977
Hey guys, Run into another program. This stuff don't get easy when you start from only knowing the basic of programing to the mid advance stuff...
Replies
3
Views
1,261
I picked up a Siemens S7 1200 from a buddy and I want to start fiddling around with it to learn about PLC's. I don't want to spend a lot of bucks...
Replies
0
Views
2,470
Hi people. I am from australia. Doing a plc course using siemens plc"s . Got given a task to design a pump cycle using two motors etc. The format...
Replies
11
Views
2,777
Hello guys, I am new to the forum as well as to the Siemens PLC programming. So the problem that I am currently facing is to link S7-1200 1215C...
Replies
0
Views
1,994
Back
Top Bottom