Step by step configure Modbus TCP Server in Siemens S7-1200 PLC

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi welcome back to my channel in this video I will explain how to configure a seaman S7 PLC as a modbus TCP server let's get started first create a project in the Seaman Tia portal software then click on configure a device to select the type of device you will be using click add new device and a list of PLC devices will appear on the right pane choose the type of PLC that matches the one you will be using for this project then click add button [Music] below the next step is device configuration click on device configuration then click properties configure the PLC including network interface settings set up the IP P address and configure protection and security [Music] [Music] settings [Music] sh [Music] the next step is to add a new data block click on program blocks then click add new block select data block and give it the name mbor DB then click [Music] okay [Music] in this table we will add 50 addresses to store data as holding registers for the data type select array of integer and set the array limit from 0 to 49 this will create a set of holding registers with addresses ranging from 0 to 49 [Music] [Music] next add a data connection and name it connect choose the data type cancore ipor V4 for modbus connection you will then need to fill in the parameters for the modbus conf configuration please follow these parameters for configuration make sure to configure these parameters according to your specific Network and modbus [Music] requirements next add a data element named error with the data type set as bull this data element will be used to handle error conditions in your modbus configuration after that add a data element named status with the data type set as word this data element will be used to monitor the status of your modbus [Music] communication next go to the ladder diagram page in Network 1 add a modbus server function block by following these steps look for the modbus server function Block in the right pane you can find it under communication then others and finally modbus TCP once you've located the modbus server function block drag and drop it into Network one of your lad diagram this will add the modbus server function block to your program in the modbus server function block fill in the MB hold regge pin with the data holding register that we created earlier this configuration will link the modbus server to the holding registers where data will be read from or written to during modbus communication then fill in the connect error and Status pins in the modbus server function block with the corresponding data blocks we created earlier this step will establish the connections and handle error and Status information as pre- your configuration [Music] he as coils represent outputs on a PLC and my S7 PLC has eight outputs we can create tags with the following names and addresses for Relay outputs relay 1 address Q 0.0 relay 2 address Q 0.1 and so on until relay number eight this configuration will allow us to control and monitor the outputs of our S7 PLC through these name tags [Music] after configuring our project as described we should compile it and save the project compiling the project ensures that it is error free and ready for execution on your Seaman S7 PLC saving the project is important to preserve our configuration and settings for future [Music] use [Music] after compiling the project and ensuring that there are no errors we can proceed to download the program to seaman S7 PLC downloading the program will transfer the configured logic and settings to the PLC so that it can run the control logic as intended make sure the PLC is connected to the programming software and follow the steps to download the program to the [Music] plc [Music] the next step is to test the modbus communication before doing so it's a good idea to go online with the PLC to monitor its status and observe any changes in the registers as they occur going online allows us to interact with the PLC in real time and verify that the modbus communication is functioning as expected this allows us to troubleshoot any issues and ensure that our modbus communication is working correctly I will monitor the values of the coil outputs and the values in the holding [Music] [Music] registers [Music] to test modbus communication I'm using modbus client X you can download it from the link I've provided in the video description run modbus client X and select modbus TCP enter the plc's IP address and click okay once connected a table will appear to view the status of holding registers and [Music] coils first I will change the value in the holding registers using modbus client X we can observe that each time I modify the value at a holding register address the value in the plc's holding register will also change [Music] accordingly [Music] next I will change the values of the coils in modbus client X I will select the coil T and click on the address that I want to set to true or false as a result the output pins on the PLC will change accordingly allowing us to turn on or off the relay pins using the coils in [Music] Modas in this experiment we can conclude that it's relatively straightforward to turn a seaman S7 PLC into a modus TCP server we can create holding registers to store integer data and for coils they directly correspond to the plc's outputs allowing us to control relay outputs using modbus TCP from a modbus client thank you for watching and I hope this video was helpful don't forget to like share and subscribe see you in the next video
Info
Channel: Yaser Ali Husen
Views: 7,165
Rating: undefined out of 5
Keywords:
Id: YuRjIp0cipA
Channel Id: undefined
Length: 12min 2sec (722 seconds)
Published: Wed Nov 01 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.