Тёмный

COM13a. [1/5]Connecting a Siemens PLC(S7-1200/S7-1500) to an SQL Database [SQL Section] 

Electrical Automation Hands-On
Подписаться 24 тыс.
Просмотров 37 тыс.
50% 1

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

 

22 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 65   
@liazepolnartleb314
@liazepolnartleb314 Год назад
You don't know how helpfull and awsome video you have done. It felts good to follow a video when everything is going good. Thanks a lot man 🙌
@electricalautomation
@electricalautomation Год назад
So Appreciate, this is really encourage me to keep going! Will do Thanks again!
@industrialautomationkotttu8841
@industrialautomationkotttu8841 3 года назад
after seeing this video , dont know how to appreciate you. Going too great...
@electricalautomation
@electricalautomation 3 года назад
Thanks! I am glad the video would be helpful! Welcome!
@logicmindautomation1458
@logicmindautomation1458 2 года назад
Nice tutorial. Thanks. One question though...What is your configuration to make your select query to work ? Thanks
@electricalautomation
@electricalautomation 2 года назад
Please view the video COM13e [SELECT WHERE] ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Z8etx2h_pYw.html
@ugljessa
@ugljessa 3 года назад
First of all, congrats on great channel. This is one the channels on RU-vid which needs to be recomended. I have a question regarding Select command. How to read data if Dabase contains String or Real values?
@electricalautomation
@electricalautomation 3 года назад
As I remembered, this example just provide 'Integer/Bool' demonstration. To implement the 'string' and 'Real', we need to analyze the data frame by using the wireshark and program the sorting code by yourself.
@ugljessa
@ugljessa 3 года назад
@@electricalautomation Just to update this post. It seams that Siemens has a problem with their example. If you select for example 3 columns with real number inside you can't use data type other than bytes. Number of bytes is defined by number of columns you want to select from your SQL database. In my example I had to define data type as follows: Row (Byte), Lenght 1 (Byte), D11 (Byte), D12 (Byte), D13 (Byte), D14 (Byte), Lenght 2 (Byte), etc... By the way your videos helped me a lot.
@electricalautomation
@electricalautomation 3 года назад
@@ugljessa I agree, using 4 bytes for transferring float/real data. Thanks very much for sharing
@JoyEEE-p9u
@JoyEEE-p9u Год назад
Hey !! SQL server is not Running!! stopped mode, i've tried to start but showing error
@4483841
@4483841 Год назад
What decides in Sql commands how many rows you can monitor
@MahadiHasan-qi1cb
@MahadiHasan-qi1cb 2 года назад
while Selecting the permissions 26:48, is it ok to grant all the permission for the 'admin' and restrict 'some' for other users?
@electricalautomation
@electricalautomation 2 года назад
I think it should be fine for assigning all permissions for your account.
@sabbirjunk6059
@sabbirjunk6059 2 года назад
In siemens support portal, the project is unavailable,could you please guide me from where I could get the total project?? Thanks in advance.
@electricalautomation
@electricalautomation 2 года назад
You can find the google drive share link under the video.
@sabbirjunk6059
@sabbirjunk6059 2 года назад
@@electricalautomation Thank you very much for the quick response. Wish to see more videos like this in the future.
@wahibkhiari5130
@wahibkhiari5130 9 месяцев назад
Very good job, very useful.
@electricalautomation
@electricalautomation 8 месяцев назад
Thanks and Welcome!
@felipepaiva4798
@felipepaiva4798 3 года назад
One more time, congratulations for the awesome video I learned a lot with your videos! Tks.
@electricalautomation
@electricalautomation 3 года назад
Thanks my friend! Hope you enjoying them. Thanks for your encourage!
@samsundar427
@samsundar427 2 года назад
Hi, I've been stuck in Error code 80C6 ("The connection partner cannot be reached') for siemens S7 - 1500. I can open the port for the SQL server IP through telnet. It's failing in the connection state and doesn't get beyond there. Are there any recommendations to tackle this? Thanks in advance
@electricalautomation
@electricalautomation 2 года назад
Are you using real S7-1500 hardware? Have you checked your CPU firmware as the manual required. Check if the S7-1500 can login the SQL successfully. The username, password, permissions assignment.
@samsundar427
@samsundar427 2 года назад
@@electricalautomation I'm trying these on the PLC Sim for S7-1500 and the firmware is 2.9. I solved the SQL login error but got stuck with these token issues #8606 (wrong token status) and #8607 (wrong token type). I tried monitoring that IP address using Wireshark and saw a lot of random packets but when I filter just for port 1443 I don't see anything (even though the SQLserver is configured to use that IP at 1443 for transactions). I'm actually receiving back some data of length 54 on TDS telegram but that array is in hex bytes and it doesn't make sense when I convert it to ASCII. Since I'm getting stuck at the SQL send state for the main LSql block there is no insertion happening.
@rafaelwilianrosa7498
@rafaelwilianrosa7498 2 года назад
Hi! Do you think its possible to connect PLC to SQL through OPC UA?
@electricalautomation
@electricalautomation 2 года назад
I am not sure if SQL support OPC UA. But it should have many software supports connecting the SQL while running as OPC UA Server for the PLC OPC UA Client Connection.
@patriknilsson4352
@patriknilsson4352 Месяц назад
Yes if you use kepserverex opc ua and then opc router to sql. Pretty easy to set up.
@gl2802
@gl2802 3 года назад
Hello, i want to ask, sql command data interupt OB1. I have error area length error in OB1 because of Sql command array data length. Any idea to solve?
@electricalautomation
@electricalautomation 3 года назад
Please review carefully about this series videos. there are five videos talking about this topics. You can find the links under the video.
@geokou18
@geokou18 3 года назад
You should do another tutorial for MQTT client for simatic s7 there is an example from siemens for tia 16 using s7 1200 and s7 1500
@electricalautomation
@electricalautomation 3 года назад
Thanks for your feedback. I will think about it and MQTT would be my plan in near future.
@edsonanjos5797
@edsonanjos5797 2 года назад
Bom dia, voce poderia informar se foi simulado com PLCSIM ou se foi CPU fisica, o meu não funciona virtual e minha CPU e V3.0, o modelo que encontrei não roda na minha CPU
@electricalautomation
@electricalautomation 2 года назад
Hello, I was using a real CPU for the testing. The PLCSIM Adv should be also Ok but PLCSIM may not be.
@edsonanjos5797
@edsonanjos5797 2 года назад
@@electricalautomation meu sistema não funcionou com PLC ADV, banco de dados na mesma maquina que esta rodando o PLC SIM erro 8602 depois de 30 segundos no status 7002
@edsonanjos5797
@edsonanjos5797 2 года назад
@@electricalautomation você teria este exemplo salvo, pois no site siemens so tem para o V17
@electricalautomation
@electricalautomation 2 года назад
@@edsonanjos5797 I would appreciate if you donate via the link under the video or the 'Thanks' button for my time for organizing the files for you. Please let me know the TIA Portal version you are using.
@colinliew1400
@colinliew1400 2 года назад
V16 sql library is nolonger available. can you upload please?
@electricalautomation
@electricalautomation 2 года назад
I would appreciate if you donate via the link under the video or the 'Thanks' button for my time for organizing the files for you. Please let me know the TIA Portal version you are using.
@lamsonlemai6516
@lamsonlemai6516 4 года назад
which barcode RS232 can i use with S7-1200 ? thanks
@electricalautomation
@electricalautomation 4 года назад
Hello, RS232 is a physical port, it is not protocol. To use S7-1200 for RS232 communication, you can use CM1241(6ES7 241-1AH32-0XB0), it has RS232 port. Then program S7-1200 to follow the protocol (telegram) from the barcode reader. But I highly recommend using profinet device, after all the code can be much easier to processed.
@lamsonlemai6516
@lamsonlemai6516 3 года назад
@@electricalautomation hi thanks your reply. I have a barcode device with usb port (RS232) . i dont know can I use convert USB jack to rs232 DB9 for CM1241 ? and then from your video, Can I use Select query statement ?
@electricalautomation
@electricalautomation 3 года назад
@@lamsonlemai6516 Regarding the PTP communication of S7-1200, please check the instruction Port_Config, Send_Config, and Receive_Config, Section 7.10.3 euroec.by/assets/files/siemens/s71200_easy_book_en-US_en-US.pdf
@geokou18
@geokou18 4 года назад
can we do this using only one pc with both sql and TIA 16?
@electricalautomation
@electricalautomation 4 года назад
Yes you can but not highly recommended. The reason I used two systems are mainly demonstrate SQL and S7-1200(TIA Portal) are two individual system and they are communicating via TDS, this is common case in practice. It is highly recommend you use a 'pure' system especially preparing for Siemens TIA Portal. If you have to install TIA Portal and SQL together, probably you could install TIA Portal STEP7 Basic or Professional with SQL. Note: DO NOT install TIA Portal WinCC Professional together with SQL, because WinCC Professional will come with SQL and this SQL would not run standalone and would conflict with other version SQL.
@geokou18
@geokou18 4 года назад
@@electricalautomation Thanks
@felipepaiva4798
@felipepaiva4798 3 года назад
I have a doubt in this case! At one PC there are installed SQL Server that i downloaded as you recomended and at another PC is installed the TIA PORTAL V16 with WinCC also installed. So that is some chance to me have problems with this configuration of TIA, when i begin the tests? Or i need to re-install the TIA PORTAL V16? (note that TIA PORTAL is installed at another PC as you recommended, but my main doubt is about the WinCC)
@binor2286
@binor2286 Год назад
Guys I got an interesting error , so when I enable the SQL. The code turn to 7002 which is completely normal but after 17s (yes I've count and each time it's 17sec) it turns to the error code 8602, sub function status 80C6 in state 3 . Does anyone had an idea on how to fix this problem ?
@electricalautomation
@electricalautomation Год назад
Are you using the real hardware PLC and the a computer (SQL) for the test? Most likely it is the software system SQL side blocks/drops the PLC connection request
@binor2286
@binor2286 Год назад
@@electricalautomation yes I'm currently have the real hardware PLC, so what do you think i have to do to correct this error
@Takehiko87
@Takehiko87 2 года назад
you are awesome
@electricalautomation
@electricalautomation 2 года назад
Thanks Bro!
@kaoutaraitzaoui8878
@kaoutaraitzaoui8878 2 года назад
is this possible for plc s7 300 and 400
@electricalautomation
@electricalautomation 2 года назад
No, only for S7-1200/S7-1500
@tranngoctam8419
@tranngoctam8419 2 года назад
I ask you to guide how to connect PLC S7-1200 with SQL server using domain name, Thanks you!!!
@tranngoctam8419
@tranngoctam8419 Год назад
drive.google.com/file/d/1-a6xviayGJEZVSmbh1zdTp3TXozCEG1C/view?usp=sharing
@yormanjorcetquispechavez3330
@yormanjorcetquispechavez3330 2 года назад
subtitules desactived :( please actived
@electricalautomation
@electricalautomation 2 года назад
Hello, I set it but it can't. Not sure what's going on from RU-vid. Only this video has this issue.
@sabirabdulhadi5704
@sabirabdulhadi5704 3 года назад
is this possible for plc S7_315? tia portal V15.1
@electricalautomation
@electricalautomation 3 года назад
Hello, according to this example, it does not fit for the S7-315 CPU. I would recommend using S7-1500.
@sabirabdulhadi5704
@sabirabdulhadi5704 3 года назад
@@electricalautomation Thanks for your kind replay
@cn_kitt
@cn_kitt 6 месяцев назад
中国人?
@electricalautomation
@electricalautomation 6 месяцев назад
欢迎欢迎!
@ravitejakonathala
@ravitejakonathala 3 года назад
ARE U TRIED V2O CODE , can u try out with latest code and made available for" really helpful and appreciable
@electricalautomation
@electricalautomation 3 года назад
Pls check COM13 [4/5] and [5/5]. They are V20 version. You can find the link under the video.
Далее