S7 1200 TCP/IP Communication with windows terminal

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2019
  • Basic TCP/IP communication between Siemens S7 1200 PLC and windows terminal
    Updated video with using PLCSIM instead of real PLC
    • TIA V15.1 TCP/IP Commu...
    Step by step guide, project archive provided
    I forgot to mention one important thing. For testing purposes, you have to set your PC network adapter IP address to match IP address set in Connect function (in my example 192.168.142.130/24).
    Make sure your firewall is not blocking the traffic.
    When you modify any parameters related to connection, restart PLC (menu online/download and restart PLC).
    PLC program archive, TIA V15.1
    drive.google.com/file/d/1472h...
    Siemens TIA Portal V15.1
    support.industry.siemens.com/...
    SocketTest V3.0.0 software:
    sourceforge.net/projects/sock...
    Hercules socket test software:
    www.hw-group.com/software/her...
    .
    Example program TCON communication, Siemens:
    support.industry.siemens.com/...
    Info on forum:
    plc.myforum.ro/open-user-commu...
    Behaviour of TSEND_C and TRCV_C
    support.industry.siemens.com/...
    support.industry.siemens.com/...
    Manual TCP/IP Coms
    cache.industry.siemens.com/dl...

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

  • @user-wd5cb2up4q
    @user-wd5cb2up4q 2 ปีที่แล้ว

    Thank you for your work and video!

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

    Thank you very much, you giving me a good guidance, hope good healthy for you.

  • @claude.r
    @claude.r 4 หลายเดือนก่อน

    very instructive tutorial, thanks a lot

  • @user-zf8px4pf7d
    @user-zf8px4pf7d 3 ปีที่แล้ว +1

    Thank you for your sharing. it is great information.

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

    Very well explained sir

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

    thank you its really working

  • @bakiapaydn3598
    @bakiapaydn3598 8 หลายเดือนก่อน

    thanks for this great video :))

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

    Thanks so much! Help me a lot.

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

    THAK YOU SO MUCH

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

    thanks ^^☺☺☺

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

    Why I downloaded your program change to PLC S7-1515 2PN, and when I run it, The TCON outputs shows Busy and #TCONSTATUS=0x7002?

  • @raulmartinez8743
    @raulmartinez8743 ปีที่แล้ว

    great

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

    is it possible to implement ascii over tcpip using this method? do you have any video on that

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

    And if I want set my computer as client and the Siemens CPU 1200 as server how I can configurate?

  • @danielg.j.2099
    @danielg.j.2099 ปีที่แล้ว

    Thanks for the video. Really good. Is there any way to conect the PLC to any Python aplication? thanks

  • @TruongNguyen-vp9de
    @TruongNguyen-vp9de 3 ปีที่แล้ว

    Thanks so much for this video. I have some question, can you help me ?
    1. Can We send string and character over socket tcp/ip only ?
    2. I need send/received some bytes to/from PC. How to encoding and decoding bit in bytes ( Bit in bytes are command and information to/from PC)

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

      Sure we can send a string, that's what we're doing in video! I'm not sure how numbers are encoded. I think it's just coded as ASCII char.

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

    Hi bro, my english not well, can you tell me on s7 1200, how many blocks TCP Client can we use, thank so much

  • @bakiapaydn3598
    @bakiapaydn3598 7 หลายเดือนก่อน

    hello sir, i did everytihng same but connection not establish. how can i find the way

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

    Hi sir thank you for sharing tutorial. I have one question. Can i use this system for multiple program?

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

      Sure, just change the address. This is basically same as computer network, you can have as many devices as how much of IP address you have.

    • @danielperezcastano777
      @danielperezcastano777 7 หลายเดือนก่อน

      One Question @@industrialautomation3470 if I want to Use another TCON block where is the best way to use it?

  • @PlayWithZookkoo
    @PlayWithZookkoo 3 ปีที่แล้ว +2

    I cant get connection. Do you have any idea why? Same adress and port on the socket test and tcon and it still it does not connect. Could you help me?

  • @tienat2215
    @tienat2215 ปีที่แล้ว

    Hi sir, can I use your code as a server ? I have a application need send a string from PLC (Server) to a app (Client) . Thank you !

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

    Hi thanks for sharing this video.
    I have a problem that sockettest v3 is not connecting to the ip address of the virtual plc (plcsim).
    It accepts only the address of the localhost or the ip address of the pc.
    Is there any solution?

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

      Hi, you have to use PLCSIM advanced. Sockettest is server it this case, it's accepting connection from PLC #12:38

  • @MikelOli
    @MikelOli 7 หลายเดือนก่อน

    How do you now witch port is free? Or witch one to use?

  • @janezstravs8214
    @janezstravs8214 ปีที่แล้ว

    When I connect TCP IP device just to SocketTest v 3.0.0, I receive string [1]T000000000003
    in SocketTest as Client
    Then I connect separately PLC to SocketTest v 3.0.0. and I receive also string [1]T000000000003
    on PLC Client and SocketTest as Server.
    But when I connect just PLC and TCP IP server device to read string on PLC, I receive in PLC on TCON block STATUS 16#7002 »Connection is being established (REQ irrelevant).« But connection is not established. TCP IP server device is connected directly to PLC. What could block the connection?

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

    when you enabled clock you must install that page if you dont install and fast make main your clock not work. sorry for my english

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

    What are the application in realtime based on that ,
    Siemens to modbus tcp/ip to Windowns

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

      communication with cameras

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

    Very good tutorial
    I have still one question.
    When i send a string then i see in the Sockettest terminal the same string with on the beginning 2 strings characters
    What is the reason, and how can i solve this issue?
    thanks in advance
    Frans

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

      Siemens add some unprintable characters at begging of the string. Just figure out length of the string with LEN and then use command RIGHT with length size Length-2.

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

      @@industrialautomation3470 Maybe a stupid question, but were must i place that right command?
      thanks in advance

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

      @@fransvanenschot3286 check the manual cache.industry.siemens.com/dl/files/465/36932465/att_106119/v1/s71200_system_manual_en-US_en-US.pdf , page 269

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

      @@industrialautomation3470 Thanks for the fast response.
      I know how to use the right string command, but were must i place this command in my program that's now clear for me.
      also everywhere in the program i see the correct string without the 2 leading char., only in the sockettest window i see that 2 weird char.
      thanks in advance,
      Frans

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

      @@fransvanenschot3286 Ok, you mean sending string from PLC to terminal. Try inserting new line at beginning of the string. Create new string variable with starting value '$L' and then CONCAT it with your variable.

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

    Hello thanks for your effort.
    My problem is tcon busy state turns true to false and there is no signal from tcon.done or tcon.error status changes from 7002 to 7000. Allowed port 29999 from firewall. Any idea ? Thanks

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

      same here, may i know do you have any solution yet?

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

      @@demopen7041 Same problem :(

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

    Sir,Thank you so much for the detailed explanation.In my application,I want to send commands to my external card from s71200 and waiting for response from it, before sending next command from PLC. By using your code,I can able to make communication but getting response but its not proper,Not giving exact response.Extra strings also coming with response.Kindly help.

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

      Hi, generally I first test the communication with Socktet tester Windows app, to make sure, other device is communicating correctly and then switch to plc. I would connect just pc and your device, to isolate that string is not coming from some other device on the network.

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

      @@industrialautomation3470 Okay,I will check it again sir.

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

      Sir,I have checked code with socket test.Its working fine.but with PLC code it's not happening,Only telnet welcoming message came after that no response from third party device.

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

      then problem is with your plc code. Try to compare commands going from socket tester versus plc. Plug plc into computer and watch commands from plc with socket tester.

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

      @@industrialautomation3470 Sir,
      Issue got solved.Instead of sending string as input data,we tried with characters as input data.Its working fine now.Thank you so much.

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

    Hello Bro. I have followed your step but when i pressed "listening button", I couldn't have connection. A message pop up "cannot assign requested address jvm_bind". Many thanks ^^

    • @robbjosh
      @robbjosh ปีที่แล้ว

      I get the same error. Any help?

    • @dineshkumarsingh186
      @dineshkumarsingh186 10 หลายเดือนก่อน

      Yes same problem
      How can solve this problem

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

    After receiving string, Data receive had additional 2 characters $R and $L. How can i fix it, sir ?

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

      Use string modification funtctions. For example MID, they can be find in TIA right panel under Insturctions/Extended instructions/String

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

      @@petrbroza7029 Many thanks to u, but i wonder why did string have 2 characters mentioned at comment?

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

      @@angcao4166 It's Carriage return and Linefeed. You have to go back to the history of typerwrites, but those control characters are still used in these days, usually signaling end of the transfer. So they are added by device you are communicating with.

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

      @@industrialautomation3470 thanks sir :D. Can you make a video about programming a tool such as sockettest by c#. I have tried to create connection tcp/ip between 2 terminals

    • @robbjosh
      @robbjosh ปีที่แล้ว

      How did you fix the connection error with SocketTest? JVM_bind error

  • @kB-hg2ci
    @kB-hg2ci 4 ปีที่แล้ว

    It would've been great tutorial but SocketTest didn't work and that I meant I would have to waste more time troubleshooting more crap that had nothing to do with what I set out to do.

  • @sparklee6994
    @sparklee6994 ปีที่แล้ว

    Can't see anything clearly on your screen, which makes this video less useful.