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