Siemens S7 1200 Modbus TCP communication with Windows client

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ต.ค. 2019
  • Simple communication between Siemens S7 1200 and Windows Modbus client
    Step by step guide, project archive provided
    PLC program archive, TIA V15.1
    drive.google.com/file/d/1AzTL...
    Modbus tool (Windows client)
    archive.codeplex.com/?p=modbu...
    Siemens TIA Portal V15.1 30 days Trial version
    support.industry.siemens.com/…
    Introduction to Modbus
    www.csimn.com/CSI_pages/Modbu...
    How do you establish a Modbus/TCP communication from a SIMATIC S7-300/S7-400 and where can you find further information?
    support.industry.siemens.com/...
    How do you use the blocks for MODBUS/TCP communication via the integrated PROFINET interface of the CPU in STEP 7 Professional (TIA Portal)?
    support.industry.siemens.com/...
    Modbus General Description
    support.industry.siemens.com/...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 42

  • @krstech1269
    @krstech1269 2 ปีที่แล้ว

    I had to stop/start the CPU, works great, thank you.

    • @industrialautomation3470
      @industrialautomation3470  2 ปีที่แล้ว

      Yeah, that happens when you reload program or DB, while modbus fb is enabled.

  • @valentinebright8804
    @valentinebright8804 2 ปีที่แล้ว

    Awesome

  • @thohayvietnam1809
    @thohayvietnam1809 3 ปีที่แล้ว +1

    hi. I'm using Tia portal V14. The master Modbus block in my software dont have parameter "connect" as yours. Whether the library was wrong? Thank

  • @graemelee4449
    @graemelee4449 3 ปีที่แล้ว

    Hi, great vids - Subscribed!
    I have learned more from these few videos than other sources with heaps of guides on them.
    I do have one question, was there any relevance to using remote port 29999 and local port 2000 in Your vid? I noted You said that MB usually uses port 502, however, I cannot seem to get my modbus tool v2.0.2.2 to establish a connection despite having the port numbers match (502) - it simply states listening to port 502. I have tried setting up with 29999 in case it's windows specific, but no difference. I have set my laptop IP to 192.168.142.130 and pinged the PLC from the laptop, I also ensured the profinet name is set the same. As a precaution I created an exception in windows defender to open port 502 to both inbound and outbound connections - Stumped!

    • @industrialautomation3470
      @industrialautomation3470  3 ปีที่แล้ว

      Hi, I glad to hear it. No real relevance in using port 29999. Most of the time, problem is with firewall blocking the traffic, try to disable all firewalls/antivirus etc. If you can ping the device, then problem will be with something blocking the traffic.

    • @graemelee4449
      @graemelee4449 3 ปีที่แล้ว

      @@industrialautomation3470 You were spot on, I'd only disabled my private network firewall , and not the public network. Works a treat now - Cheers!

    • @industrialautomation3470
      @industrialautomation3470  3 ปีที่แล้ว

      @@graemelee4449 Don't worry, I made exactly same mistake few days ago.

  • @OT_ICS_Cybersecurity
    @OT_ICS_Cybersecurity 2 ปีที่แล้ว

    thanks a lot for the well illustrated and explained video, really appreciated. what is the name of the modbus tool i need to download it

  • @edisonaltamirano618
    @edisonaltamirano618 3 ปีที่แล้ว +1

    Hi do you know what it may cause error 80C5 in status ? I follow your video and change ip adress in modbusclient but i don't know what is happening, for now i am just using S7-PLCSIM for simulating my program, is it necessary to use the physical plc?

    • @industrialautomation3470
      @industrialautomation3470  3 ปีที่แล้ว

      Hi, sure you can use simulator, but you have to use PLCsim advanced version, check my other video th-cam.com/video/I-ToeEPMJyg/w-d-xo.html

  • @aminfamili5318
    @aminfamili5318 2 ปีที่แล้ว

    Hello and thanks for your helpful video.
    When I click on the link for the tool, it doesn't lead to a link for downloading or buying the software. Is there any other link you can share here to download? Thanks a lot.

    • @industrialautomation3470
      @industrialautomation3470  2 ปีที่แล้ว

      Seems like site is down, try this link dl.sisoog.com/download/ModbusTool.zip

  • @ronaldpena1589
    @ronaldpena1589 3 ปีที่แล้ว

    Thank u. Now, what do I have to do for communicate with several TCP slaves.
    If I change the address (MB_DATA_ADDRESS) while PLC is running, the module holds the communication only with the initially configured slave. I mean, the module only communicates with the originally configured device.

    • @industrialautomation3470
      @industrialautomation3470  3 ปีที่แล้ว

      Mb_data_address points to register not to different slave! Create new function, add new connection definition, change ID to unique number, set direct ip and port, load to plc, check values online

    • @ronaldpena1589
      @ronaldpena1589 3 ปีที่แล้ว

      ​@@industrialautomation3470 Lol srry. I knew MB_DATA_ADDRESS was the protocol register and the IP goes on the CONNECT element definition. I was wrong when typing in. By the way, I'd already tried what you said. Thank u for but it's still not working, I'm still checking for the problem. Maybe it's a small mistake

  • @danangprasetya1025
    @danangprasetya1025 3 ปีที่แล้ว

    Nice video, how about Communication PLC to DCS, can we use moodbus as protocol ?

    • @industrialautomation3470
      @industrialautomation3470  3 ปีที่แล้ว

      Sure you can, but just small amount of data.

    • @emmanueloluwadamilare6045
      @emmanueloluwadamilare6045 3 ปีที่แล้ว

      @@industrialautomation3470 do you have video tutorial on communication of PLC to DCS

    • @industrialautomation3470
      @industrialautomation3470  3 ปีที่แล้ว

      @@emmanueloluwadamilare6045 What kind of DCS you mean? Idea of communication is the same, no mater with which device you communicate.

  • @8ZER08
    @8ZER08 3 ปีที่แล้ว

    The firewall of my private network has blocking the communication, but i can connect the modbus poll and modscan with the modbus tool when my firewall is on, but not my plc, thx for the video!

  • @okelepoka
    @okelepoka 3 ปีที่แล้ว

    Nice video, where can i get this nice Modbus slave program?

    • @industrialautomation3470
      @industrialautomation3470  3 ปีที่แล้ว

      Link is in the description.

    • @hyy3434
      @hyy3434 ปีที่แล้ว +1

      @@industrialautomation3470 Link doesn't work,fyi

  • @edgarcin95
    @edgarcin95 4 ปีที่แล้ว

    Do I need to buy a Modbus TCP license or it is included with TIA Portal V14?

  • @binhang5874
    @binhang5874 4 ปีที่แล้ว

    hi,
    Can S7 1200 use Modbus TCP and Modbus RTU simultaneously?

  • @ansonkiek6471
    @ansonkiek6471 4 ปีที่แล้ว

    Hi ,
    I pull all input, output and analog signal in 1 DB for server , so my client read still need create different register ? Example read output from server ip is 10001 , then another block for client just 40001 ? It this possible create all combine dB by using 1 dB ?
    Please advise

    • @industrialautomation3470
      @industrialautomation3470  4 ปีที่แล้ว

      Hello, I don't know what is your modbus device. On the plc side, you can use only one DB for sending /receiving. Just adjust mb_data_addr number in mb_client function (in my example it's 0 #9:06). Make sure to set DB to non-optimized access, then you will be able to see addresses inside DB. Is that what you asking for?

    • @ansonkiek6471
      @ansonkiek6471 4 ปีที่แล้ว

      Industrial Automation my modbus device is Siemens A unit 1200 to b unit 1200 , in earlier I have old machine run with remote dcs which is modbus server tcp from A unit and data read and write was packed with Bit register , input ,output and real(mA) value all put in 1 dB as P#DB500.DBX0.0 int 30
      Inside table
      Array (0-10)
      Data_in 0-10 (Bool) ( bit)
      Data_out 0-10 (Bool) (digital input and output )
      Real_in (analog signal )
      Above from old plc data
      Now I write the Modbus Client and intended to get those DB500 data , so I just put the IP address of master , I can get read the value eventually but I not sure what If I can read all automatic without modified the MB_Data_Addr? I managed to read output when I change to address 100001 , I want read real value I have to make a change to 400001. I not is this can combine and auto address recognized which allow me only put register Addr and to read all ? Or I need to create separate Client tcp block ? 10001 to read output coil and another 400001 maybe read analog real data ?
      Last concern is my existing plc was using modbus server which is connected to another dcs system. I want connect exiting protocol with just add new Client server and pull the All DB packed inside DB500 and I not whether it can be connect by 2 Client at the same time ? If this possible I will not need to add any programming for A unit.
      That my intention.

    • @industrialautomation3470
      @industrialautomation3470  4 ปีที่แล้ว

      @@ansonkiek6471 I mixed things up. Mb_data_addr is address of modbus register, not address in DB. It's looks like you can't use single DB for different register. Maybe you could use string or pointer, but I never tested that. But you can have multiple mb_client functions, have separate DBs for each one and then just merge then into one., db500.

    • @ansonkiek6471
      @ansonkiek6471 4 ปีที่แล้ว

      Industrial Automation do you mean can use multiple modbus Client for serval register such example 3 modbus Client block all in read data
      1) MB_Data_TA_ADDR - 1 , for read output bits
      2) MB_Data_TA_ADDR- 10001 , for input
      3) MB_Data_TA_ADDR - 40001 , for analog signal ?
      For server site I still packed All data in 1 DB global block which is DB500
      Consisted with
      Data_in (0-10 array) bool
      Data_out (0-10 array ) bool
      Real in _ real
      3 modbus Client read the 1 same server ? Can I Combine input output and bit in 1 modbus Client ? Because input , output and bit can define as bool. What type of MB_DATA_ADDR to use if possible ?
      Thanks.

    • @industrialautomation3470
      @industrialautomation3470  4 ปีที่แล้ว

      @@ansonkiek6471 Yes, you can have multiple client functions for 1 server. Just CONNECT definition may have to be different.
      You could combine them, if all of them would be stored in same register, for example Input register.
      mb_data_addr depends on server, where do you store data #7:38