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

Поділитися
Вставка
  • Опубліковано 13 вер 2024
  • #SQL #PLC #Database #S71200 #TDS (Tabular Data Stream)
    Next: COM13c. [3/5][Programming Section] • COM13c. [3/5]Sending I...
    COM13d. [4/5]V20 "Insert Into, Update, and Select" SQL via PLC [PLC Section]
    • COM13d. [4/5]V20 Conne...
    COM13a. [1/5] [SQL Section] • COM13a. [1/5]Connectin...
    Playlist: • PID and Process Object...
    The application example program is V11 of ID:109779336. V20 will be shown in another video.
    V11, V20, V21, and V30 of ID:109779336 can be downloaded from drive.google.c...
    - ID:109779336 Connecting an S7-1200 / S7-1500 to an SQL Database
    support.indust...
    - SQL Download www.microsoft....
    - SQL Server Management Studio (SSMS) docs.microsoft...
    Troubleshoot SQL port and Connection
    www.sqlshack.c...
    - mofcomp "%programfiles(x86)%\Microsoft SQL Server\150\Shared\sqlmgmproviderxpsp2up.mof"
    In this command, change the SQL Server version
    SQL 2008 - 100
    SQL 2012 - 110
    SQL 2014 - 120
    SQL 2016 - 130
    SQL 2017 - 140
    SQL 2019 - 150
    I appreciate you could buy me a coffee via the PayPal link below:
    www.paypal.com...
    V11, V20, V21, and V30 of ID:109779336 can be downloaded from drive.google.c...
    COM13a. [1/5]Connecting a Siemens PLC(S7-1200/S7-1500) to an SQL Database [SQL Section]
    • COM13a. [1/5]Connectin...
    COM13b. [2/5]V11 Connecting a Siemens PLC(S7-1200/S7-1500) to an SQL Database [PLC Section]
    • COM13b. [2/5]V11 Conne...
    COM13c. [3/5]Sending INT and Real from S7-1200 to an SQL Database [Programming Section]
    • COM13c. [3/5]Sending I...
    COM13d. [4/5]V20 Connecting a Siemens PLC S7-1500 to an SQL Database [PLC Section]
    • COM13d. [4/5]V20 Conne...
    COM13e. [5/5]V20 Connecting a Siemens PLC S7-1500 to an SQL Database [SELECT WHERE] (Wireshark, token) Reading From Database to PLC, • COM13e. [5/5]V20 Conne...

КОМЕНТАРІ • 113

  • @stevenma8616
    @stevenma8616 8 місяців тому

    Your English is very easy for me to understanding 👍👍👍

  • @MainlyWebStuff
    @MainlyWebStuff 2 роки тому

    Thanks for posting this - I was interested to see the process. Subscribed.

  • @matheusfarnese6306
    @matheusfarnese6306 2 роки тому

    Thank you very much!! Help me a lot!! Amazing!!

  • @Gerutosage
    @Gerutosage 6 місяців тому

    the files in industry mall siemens are diferent, can you help me with updated informacion, i need to make this conection.

  • @wahibkhiari5130
    @wahibkhiari5130 7 місяців тому

    Excellent work

  • @allansilva6772
    @allansilva6772 3 роки тому +1

    Amigo, muito obrigado! Você não faz ideia de quão grato estou por esse vídeo.
    Estava à muito tempo tentando comunicar meu S7-1200 com o SQL Server, mas não conseguia devido esse erro 8605.

    • @electricalautomation
      @electricalautomation  3 роки тому

      Thanks for watching! Welcome to my channel!

    • @orionjonas4455
      @orionjonas4455 3 роки тому

      Sorry to be so offtopic but does anybody know a tool to log back into an instagram account??
      I was dumb lost my login password. I would appreciate any assistance you can offer me

    • @aldojay8629
      @aldojay8629 3 роки тому

      @Orion Jonas instablaster :)

    • @orionjonas4455
      @orionjonas4455 3 роки тому

      @Aldo Jay i really appreciate your reply. I found the site thru google and im waiting for the hacking stuff atm.
      I see it takes quite some time so I will reply here later when my account password hopefully is recovered.

    • @orionjonas4455
      @orionjonas4455 3 роки тому

      @Aldo Jay It worked and I finally got access to my account again. Im so happy:D
      Thank you so much you saved my account :D

  • @taylanaltin4935
    @taylanaltin4935 Рік тому

    Hi, great tutorial. Thanks for your sharing. I have one question, is there any way to control the data is written succesfully?
    Thanks.

    • @electricalautomation
      @electricalautomation  Рік тому

      Please see ua-cam.com/video/Z8etx2h_pYw/v-deo.html, the token topic is the "Reading data" from database to PLC

  • @grupsautomation4888
    @grupsautomation4888 2 роки тому

    how to log more than 4 column. I have tried but upto 4 column are logged.

  • @georgekoutsoudakis2812
    @georgekoutsoudakis2812 3 роки тому +1

    Archive DB is not your system problem , there is a conflict. I also create it manually

    • @electricalautomation
      @electricalautomation  3 роки тому +1

      Thanks for letting me know. Yes, manually create it can solve it. Thanks again!

  • @leakersshakh9317
    @leakersshakh9317 Рік тому

    I do all of thing in this vedio but the error found 8602 whats the proplem ?

  • @krzysztofkwasniewski6858
    @krzysztofkwasniewski6858 3 роки тому

    Extremly useful. New version library has the same problem.

    • @electricalautomation
      @electricalautomation  3 роки тому

      Thanks for watching! Did you try the latest version V21, which is released 2021 Feb.18? Did it has the same issue on S7-1200? I am hoping the S7-1200 can also work for it. support.industry.siemens.com/cs/document/109779336/connecting-a-s7-1200-s7-1500-to-a-sql-database-?dti=0&lc=en-WW.

    • @krzysztofkwasniewski6858
      @krzysztofkwasniewski6858 3 роки тому

      @@electricalautomation I had version from 17.02.2021. So I think it is version that you showed on movie 4/5 or 5/5. Now I cann't open 1500 so I don't see oryginal version. I suppose that when S7-1500 is used everything is OK. The problem appers only on S7-1200. But I cann't check it.

    • @electricalautomation
      @electricalautomation  3 роки тому

      @@krzysztofkwasniewski6858 Pls try V21 release from Feb.18. I read the V21 manual and likely some glitches mentioned and solved.

    • @krzysztofkwasniewski6858
      @krzysztofkwasniewski6858 3 роки тому

      @@electricalautomation This was just test. Soon I will try on real existing system. Then I will try to use new version. I let you know the result.

    • @electricalautomation
      @electricalautomation  3 роки тому

      @@krzysztofkwasniewski6858 Thanks Krzy.

  • @robertbroere7626
    @robertbroere7626 10 місяців тому

    Hi, thanks for sharing your great tutorial!
    Can you maybe help me?
    I'm getting an error 8602 with status 809B and in the help it says "The local_device_id in the connection description does not match the CPU"
    Can you maybe tell me where i can fix something?

  • @bartpawlowski1124
    @bartpawlowski1124 3 роки тому

    Hi, do we have to use two different PC ? can this task be performed on the same TIA portal laptop ?

    • @electricalautomation
      @electricalautomation  3 роки тому +1

      Hi you need two PC or Virutal Machine, I think. Because it is using TCP/IP communication.

    • @lyaeusv3828
      @lyaeusv3828 2 роки тому

      you can use a virtual machine like vmware studio it's pretty good to test on

  • @user-or2wk6wx3s
    @user-or2wk6wx3s 10 місяців тому

    hello,
    my connection is fine between PLC and SQL . I also , can send data from SQL to PLC , but my only problem is that I can't send data from PLC to the SQL
    ( When trying to execute in SQL , nothing is happening ). Can anyone please help?
    thanks

  • @santoshmali8677
    @santoshmali8677 Рік тому

    Hello electrical Automation
    Can we do this for s7-1512-Sp1 ?
    I have used same code shared by you but not able to change the CPU.

    • @electricalautomation
      @electricalautomation  Рік тому

      The S7-1512 should be Ok, but you need to check your PLC firmware as I mentioned. And use a S7-1500 example to replace your S7-1512

    • @santoshmali8677
      @santoshmali8677 Рік тому

      @@electricalautomation
      Thanks for your reply. This is very good channel have came across over the UA-cam.
      Please confirm below points.
      This CPU is ET-200 series ie S7-1512 SP1.-?
      TIA Portal -V17 ?
      My application is to Read /data from MSSQL DB in PLC (Process the data ) and read / write in another MSSQL DB .
      Can you please help online ?
      I will pay your amount / Bill

  • @nabiltriaki8890
    @nabiltriaki8890 2 роки тому

    hello sir i'm having this error 16#8602 sub 80C6 while using tia V16 , when i start the program block in shows 7002 and valid busy turn true but after 5 seconds or so it stops and shows the error 16#8602 sub 80C6 p.s i'm using plcsim advanced cpu 1500

    • @electricalautomation
      @electricalautomation  2 роки тому

      Please check the error code by using TIA Portal, you can check the error code at TCP/IP communication section, e.g. TON, TSEND

  • @michawaszkowiak4960
    @michawaszkowiak4960 Рік тому

    hi, thanks for your video, its really helpfull. I hope it will help me in my study project about SQL Database but first I need permission to google drive to download V11 example on Tia Portal 16 cause I can find it anywhere.

  • @Sirojiddinaka
    @Sirojiddinaka 2 роки тому

    Hi, Please can you share the V16 example and ibrary files, because the existing link updated to V17 already and I don't have v17. Thank you!

    • @electricalautomation
      @electricalautomation  2 роки тому

      You can find the multiple revisions from the link just below my video

    • @Sirojiddinaka
      @Sirojiddinaka 2 роки тому

      @@electricalautomation Thank you so much.

  • @Bailly741
    @Bailly741 3 роки тому

    Hello sir, thank you four your video. I like !
    Please do you think that it will work on TIA15 ?

    • @electricalautomation
      @electricalautomation  3 роки тому +1

      Thank you sir. Unfortunately, I don't think TIA Portal V15 works for this example. The example project did by v16, you can not open this project via V15. Also V15 does not support the latest CPU firmware revision, e.g S71500 >= 2.5, S7-1200 >=v4.4. I highly recommend using v16 and S7-1500 for this application test.

    • @Bailly741
      @Bailly741 3 роки тому

      ​@@electricalautomation Thank you for your quick answer. I am looking for a way to export my data from a S7-1200. Do you have an idea maybe ? I am thinking about send data via HTTP to a external server. Do you think is it possible ?

    • @electricalautomation
      @electricalautomation  3 роки тому

      @@Bailly741 I would recommend using OPC Server software, e.g. Kepware. you could check the video ua-cam.com/video/KwS7_CyI0r4/v-deo.html.

    • @Bailly741
      @Bailly741 3 роки тому

      ​@@electricalautomation Thank you for your recommendation. I was thinking of a java server like Spring Boot. But I guess I need to use OPC Server. Or maybe do you think that there is an other way to store the data and will be accessible from external resource ? SQL was perfect but it looks like I am limited with a S7-1200.

    • @electricalautomation
      @electricalautomation  3 роки тому

      @@Bailly741 As I saw some projects before, the typical way is to use OPC Server software as a bridge, communicate with PLC downlayer and SQL player. Also for short term light weitght data storage, you could use the S7-1200 builtin function data logging. support.industry.siemens.com/cs/document/64396156/process-data-acquisition-and-monitoring-with-the-simatic-s7-1200-s7-1500-(data-logging)?dti=0&lc=en-WW

  • @khaihoanle5314
    @khaihoanle5314 3 роки тому

    Hello bro. When i active EnableLsql , tempSqlstatus =8602/ Can you help me fix it?

    • @electricalautomation
      @electricalautomation  3 роки тому

      8602 is the fault from TCON, means you have connection problem. Check you Connection parameter setting, also check the SQL side. It is not an easy job, Please Review all the COM13 five videos

  • @juliomarroquin3435
    @juliomarroquin3435 2 роки тому

    Hi, Very good tutorial, I Have a question can't pass over the last release version, tried both drive downloads V10 and V20, can you please help me out, thank you in advance

    • @electricalautomation
      @electricalautomation  2 роки тому

      Please find he goolge drive link below the video, it has V11, V20, V21 all files.

    • @juliomarroquin3435
      @juliomarroquin3435 2 роки тому

      @@electricalautomation thank you for reply, I tried with them, the problem I have is the TIA V16 the TCON_IP_V4 is not supported don't know if is the TIA or the CPU, but tried with different S7-1200 and same Error, do you think is the TIA or CPU?

    • @juliomarroquin3435
      @juliomarroquin3435 2 роки тому

      @@electricalautomation do you have an e-mail where I can share a screenshot? thanks for your help

    • @electricalautomation
      @electricalautomation  2 роки тому

      @@juliomarroquin3435 Please check the manual of each revision, check the firmware of the CPU you are using. May be your CPU firmware is lower than it needs, if yes, you can upgrade your CPU firmware.

    • @juliomarroquin3435
      @juliomarroquin3435 2 роки тому

      @@electricalautomation CPU firmware is 4.2.3 and tia Portal V16

  • @zederickvargas7254
    @zederickvargas7254 Рік тому

    the files from your drive are restricted, could you accept my request?

  • @gl2802
    @gl2802 3 роки тому

    Greetings, i follow your instruction and success with Tia Portal 16.. Is it possible to use this program intoTia V14? I use try to implement this and carefully set it same as V16 example but there is error 16#8602 sub 80C6 state 3.. Manual say error connection but when use V16 everything work..

    • @electricalautomation
      @electricalautomation  3 роки тому

      Hello Thanks! I don't think TIAPortal can work for this. Firstly, the V10, V11, and V20 of this example ID:109779336 they all programmed via TIAPortal V16. Also the TCP communication block TON, TRCV etc.. could not be the same. Also please note that the firmware of S7-1500 should be >=2.5 and S7-1200 >=4.4 , those limit us, we have to use TIA Portal V16.

    • @electricalautomation
      @electricalautomation  3 роки тому

      I also got the code 80C6, but after I toggle the connection enable and did again successfully. Oh, please note that if you try 'select' using V20 of ID:109779336, it will cause 80C6. I will launch a video in one or two weeks demonstrating how to use V20 'Insert', 'Update', and 'Select' .

    • @gl2802
      @gl2802 3 роки тому

      Thank you very much for your answer. I will tweak it again.. Waiting for your another video!!

    • @electricalautomation
      @electricalautomation  3 роки тому

      @@gl2802 I got V20 of ID:109779336 worked successfully. Some subscribers claimed that they got troubles on V20 especially on the 'SELECT' test. Yes, it does need some strategy. Give me a while to make a video to demonstrate the V20 SQL 'Select' Test.

    • @gl2802
      @gl2802 3 роки тому

      @@electricalautomation i used the program V20 that run on TIA version 16 ID : 109779336. I can transfer and make communication to SQL with this program. But when i am write this program to TIA version 14, the error code that i'm mention above is appear.

  • @andraspass4119
    @andraspass4119 2 роки тому

    When I inserted 1200 Plc then I copied first "Plc data types" and "Plc tags" and only after that the Blocks and there was not any error.

    • @electricalautomation
      @electricalautomation  2 роки тому

      Sorry, not quite understand your question.

    • @andraspass4119
      @andraspass4119 2 роки тому

      @@electricalautomation Sorry for my english... So
      1. I inserted the S7-1200 plc
      2. I copied the "Plc data types" and "Plc tags"
      3. I copied the blocks
      And it worked immediately :)
      By the way thanks for all videos, they are very-very useful and I learn a lot from them.

    • @electricalautomation
      @electricalautomation  2 роки тому

      @@andraspass4119 Got you. Thanks. Glad it is working and the video could be helpful! Good luck!

  • @geokou18
    @geokou18 3 роки тому

    Where is the third part ? Please upload it fast! thanks

    • @electricalautomation
      @electricalautomation  3 роки тому +1

      Hi Thanks for your watching, [3/3] will be launched in 24hours, welcome to subscribe and book the bell for notification.
      It comes: COM13c. [3/3]Sending INT and Real from S7-1200 to an SQL Database [Programming Section]
      ua-cam.com/video/Y0bLIpnuTQM/v-deo.html

    • @geokou18
      @geokou18 3 роки тому

      @@electricalautomation I did, great job anyway

  • @mrugeshprajapati6406
    @mrugeshprajapati6406 3 роки тому

    Hi, I am getting error 8602-TCON(80C5), what may be the reason?
    I am using TIA and MSsql in the same laptop, please help me!!

    • @electricalautomation
      @electricalautomation  3 роки тому

      8602 is TCON error means your PLC can not setup the connection with SQL. Are you using the hardware PLC? Also check the windows firewall and especially the SQL settings. Please review the SQL setting video VERY CAREFULLY ua-cam.com/video/fRKTqoNKcXU/v-deo.html

    • @mrugeshprajapati6406
      @mrugeshprajapati6406 3 роки тому

      @@electricalautomation hi, I am actually simulating the PLC, not using actual hardware.

    • @mrugeshprajapati6406
      @mrugeshprajapati6406 3 роки тому

      @@electricalautomation Hello, Now I have installed MSSql in another laptop and TIA is in different laptop and Simulating the 1500 PLC, but same error is there.. what should I do!?

    • @electricalautomation
      @electricalautomation  3 роки тому

      @@mrugeshprajapati6406 If you are using simulation PLC, it is really hard to say the reason. But I would recommend reviewing the video COM13a ua-cam.com/video/fRKTqoNKcXU/v-deo.html. There are many settings on SQL side. Please review carefully. If still not, the problem may come from your simulation PLC, using actual new firmware revision PLC instead.

    • @mrugeshprajapati6406
      @mrugeshprajapati6406 3 роки тому

      @@electricalautomation Hello Buddy, Finally Connected successfully, actually there was problem in Virtual Machine Network Adapter setting. Thanks for your responses :)

  • @electricalautomation
    @electricalautomation  3 роки тому

    Hello All, I got V20 of ID:109779336 worked successfully. Some subscribers claimed that they got trouble on V20 especially on the 'SELECT' test. Yes, it does need some strategy. Give me a while to make a video to demonstrate the V20 SQL 'Select' Test.

  • @williamvidorette3797
    @williamvidorette3797 Рік тому

    Hi friend
    Could you share the v11 that was tested in the video for me to test here in my application? I await your return. Thanks.

    • @electricalautomation
      @electricalautomation  Рік тому

      The share link via google drive is below the video

    • @williamvidorette3797
      @williamvidorette3797 Рік тому

      @@electricalautomation
      It's sending me to a link to request access to google drive, I've requested access a few times, if you can grant access, I appreciate it

  • @ivanlopeztorres2935
    @ivanlopeztorres2935 3 роки тому

    With the new version of that block they are supposed to have fixed the 8088 problem, but now it does not work for me and i have no way to solve it, because the new code statRcvData have changed xD

    • @electricalautomation
      @electricalautomation  3 роки тому

      Please send me an email, I could share the V11 for the test. I just knew the v20 got updated, likely the 'Select' is added, I assume it will allow the PLC to sort the data from the SQL and read back the data from SQL. I haven't tried v20 yet. You could try V11 for your test.

    • @ivanlopeztorres2935
      @ivanlopeztorres2935 3 роки тому

      @@electricalautomation In the v20 they have changed the data type of Data instance, but it´sstill not working. Like in your video, in the new version it is an structure with a bytes array in it, and if you swap the original code from Data:=#data to Data:=#data.bytes you can comunicate with the SQL server and use insert instruction. Unfortunatelly, select still not working for me. If you use select u get in data.Bytes array like 680 elements, so lets continue trying. I will let for here my progress.
      Thanks for your response

    • @electricalautomation
      @electricalautomation  3 роки тому

      @@ivanlopeztorres2935 Appreciate your sharing, please let me know if you find anything for the 'SELECT' functions from example V20. Thanks!

    • @vikasmaheshwari8176
      @vikasmaheshwari8176 3 роки тому

      Thanks! kindly share V11 for the test.

    • @electricalautomation
      @electricalautomation  3 роки тому +1

      @@vikasmaheshwari8176 Please send me a email mention V11 of SQL, my email can be found from the begginning of the video.