Тёмный

S7 1200 TCP/IP Communication with windows terminal 

Industrial Automation
Подписаться 1,8 тыс.
Просмотров 77 тыс.
50% 1

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...

Опубликовано:

 

30 сен 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 59   
@yudipatriot7765
@yudipatriot7765 4 года назад
Thank you very much, you giving me a good guidance, hope good healthy for you.
@user-wd5cb2up4q
@user-wd5cb2up4q 2 года назад
Thank you for your work and video!
@user-zf8px4pf7d
@user-zf8px4pf7d 3 года назад
Thank you for your sharing. it is great information.
@claude.r
@claude.r 4 месяца назад
very instructive tutorial, thanks a lot
@sachinchandel5032
@sachinchandel5032 3 года назад
Very well explained sir
@suniladhikari1029
@suniladhikari1029 4 года назад
thank you its really working
@felipepaiva4798
@felipepaiva4798 4 года назад
Thanks so much! Help me a lot.
@industrialautomation3470
@industrialautomation3470 4 года назад
Happy to help
@bakiapaydn3598
@bakiapaydn3598 8 месяцев назад
thanks for this great video :))
@josehuaman8734
@josehuaman8734 3 года назад
THAK YOU SO MUCH
@chenggong2373
@chenggong2373 3 года назад
Why I downloaded your program change to PLC S7-1515 2PN, and when I run it, The TCON outputs shows Busy and #TCONSTATUS=0x7002?
@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
@jackspart64
@jackspart64 3 года назад
And if I want set my computer as client and the Siemens CPU 1200 as server how I can configurate?
@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.
@alirezagerdabi5530
@alirezagerdabi5530 2 года назад
is it possible to implement ascii over tcpip using this method? do you have any video on that
@seiftamazerti4547
@seiftamazerti4547 2 года назад
thanks ^^☺☺☺
@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
@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
@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 года назад
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 8 месяцев назад
One Question @@industrialautomation3470 if I want to Use another TCON block where is the best way to use it?
@raulmartinez8743
@raulmartinez8743 Год назад
great
@PlayWithZookkoo
@PlayWithZookkoo 3 года назад
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?
@ThuyHoang-vc8qi
@ThuyHoang-vc8qi 3 года назад
Me too
@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?
@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 !
@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 года назад
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.
@bakiapaydn3598
@bakiapaydn3598 8 месяцев назад
hello sir, i did everytihng same but connection not establish. how can i find the way
@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 :(
@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.
@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
@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
@MikelOli
@MikelOli 7 месяцев назад
How do you now witch port is free? Or witch one to use?
@angcao4166
@angcao4166 3 года назад
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 11 месяцев назад
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 года назад
@@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.
Далее
Qizim 58-qism | Anons |Nimaga meni bolam o'ladi ?
00:47
ПОЮ НАРОДНЫЕ ПЕСНИ🪗
3:19:41
Просмотров 1,9 млн
TSEND_C & TREC_C | Part 1 | TIA Portal
23:31
Просмотров 9 тыс.
What is a Protocol? (Deepdive)
18:14
Просмотров 161 тыс.
FC & FB : YOU KNOW THIS DIFFERENCE !
4:15
Просмотров 7 тыс.
Qizim 58-qism | Anons |Nimaga meni bolam o'ladi ?
00:47