First of all, congrats on great channel. This is one the channels on RUclips which needs to be recomended. I have a question regarding Select command. How to read data if Dabase contains String or Real values?
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.
@@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.
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
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.
@@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.
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.
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?
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 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 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.
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.
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 ?
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
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.
@@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 ?
@@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
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.
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)
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 🙌
So Appreciate, this is really encourage me to keep going! Will do Thanks again!
after seeing this video , dont know how to appreciate you. Going too great...
Thanks! I am glad the video would be helpful! Welcome!
Hey !!
SQL server is not Running!! stopped mode, i've tried to start but showing error
Nice tutorial. Thanks. One question though...What is your configuration to make your select query to work ?
Thanks
Please view the video COM13e [SELECT WHERE] ruclips.net/video/Z8etx2h_pYw/видео.html
First of all, congrats on great channel. This is one the channels on RUclips which needs to be recomended. I have a question regarding Select command. How to read data if Dabase contains String or Real values?
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.
@@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.
@@ugljessa I agree, using 4 bytes for transferring float/real data. Thanks very much for sharing
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
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.
@@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.
In siemens support portal, the project is unavailable,could you please guide me from where I could get the total project?? Thanks in advance.
You can find the google drive share link under the video.
@@electricalautomation Thank you very much for the quick response. Wish to see more videos like this in the future.
What decides in Sql commands how many rows you can monitor
while Selecting the permissions 26:48, is it ok to grant all the permission for the 'admin' and restrict 'some' for other users?
I think it should be fine for assigning all permissions for your account.
One more time, congratulations for the awesome video I learned a lot with your videos! Tks.
Thanks my friend! Hope you enjoying them. Thanks for your encourage!
Hi! Do you think its possible to connect PLC to SQL through OPC UA?
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.
Yes if you use kepserverex opc ua and then opc router to sql. Pretty easy to set up.
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?
Please review carefully about this series videos. there are five videos talking about this topics. You can find the links under the video.
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
Hello, I was using a real CPU for the testing. The PLCSIM Adv should be also Ok but PLCSIM may not be.
@@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
@@electricalautomation você teria este exemplo salvo, pois no site siemens so tem para o V17
@@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.
Very good job, very useful.
Thanks and Welcome!
V16 sql library is nolonger available. can you upload please?
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.
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
Thanks for your feedback. I will think about it and MQTT would be my plan in near future.
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 ?
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
@@electricalautomation yes I'm currently have the real hardware PLC, so what do you think i have to do to correct this error
which barcode RS232 can i use with S7-1200 ? thanks
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.
@@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 ?
@@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
you are awesome
Thanks Bro!
is this possible for plc s7 300 and 400
No, only for S7-1200/S7-1500
can we do this using only one pc with both sql and TIA 16?
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.
@@electricalautomation Thanks
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)
I ask you to guide how to connect PLC S7-1200 with SQL server using domain name, Thanks you!!!
drive.google.com/file/d/1-a6xviayGJEZVSmbh1zdTp3TXozCEG1C/view?usp=sharing
subtitules desactived :( please actived
Hello, I set it but it can't. Not sure what's going on from RUclips. Only this video has this issue.
is this possible for plc S7_315? tia portal V15.1
Hello, according to this example, it does not fit for the S7-315 CPU. I would recommend using S7-1500.
@@electricalautomation Thanks for your kind replay
ARE U TRIED V2O CODE , can u try out with latest code and made available for" really helpful and appreciable
Pls check COM13 [4/5] and [5/5]. They are V20 version. You can find the link under the video.
中国人?
欢迎欢迎!