ChatGPT and PLC programming

Поделиться
HTML-код
  • Опубликовано: 24 дек 2024

Комментарии • 91

  • @Paragonatore1670
    @Paragonatore1670 Год назад +7

    One important thing is also that is designed to hold an conversation. For example if you're not sure about something it wrote or how it would handle a situation (like the button pressed). You can ask it and it will most of the times improve the existing, which is even more magical imo

  • @garethsmith7628
    @garethsmith7628 Год назад +8

    If you want it to write ladder just ask it to do it in XML for import.
    Same trick also works for translating from, say, AB to Siemens, in ladder - give it XML and ask for XML back.

    • @juliocesaranez3853
      @juliocesaranez3853 2 месяца назад

      Hi, can you please explain how do you import it, and where ? I need details if you don’t mind please I’m a little slow . I need it to look like in the computer ladder logic. Thank you

  • @Perius
    @Perius Год назад +4

    I used ChatGPT during the Christmas holidays to generate some code for my home automations in YAML. To get somewhat usable results, you want to give it very precise instructions.
    It didn't understand that it had to turn heating off, when the max temperature was reached. Or to turn it back on if the temperature go below the threshold at a later time.
    After a bit of fiddling and being very precise in my descriptions and telling it to fix certain errors, I got a very good starting point that saved me a lot of time writing code.
    In the relatively near future I see it as a wonderful tool to help developers.
    In the future I can see this as a completely automated factory, where you input text or speech input in one end. The AI makes a bunch of simulations and gives you options of what you want, it then choose manufacturing processes, writes it's own code on the way and spits out a complete physical product in the other end.
    Very cool stuff. But remember to not ask for the most efficient machine to fix the world's problems, and tick off the box for auto accept. That's how we get Terminators!

    • @igormalev2871
      @igormalev2871 Год назад

      😮😅😊 2:46 2:53

    • @leeham6230
      @leeham6230 Год назад

      It's the end of human memory and skills. This is terrifying to me.

    • @YouToobeism
      @YouToobeism Год назад

      @Perius said "....and being very precise in my description." The lesson learned by any systems developer reading the specs for a new system to be bid on........ How many times I've sat in meetings listening to in-house "experts" describe how their business works, only to find later that there were many, many exceptions to how things really work. That's why a good systems developer is also a good people person with lots of billable patience.

  • @SoCalFreelance
    @SoCalFreelance Год назад +4

    An entire RUclips channel on PLC programming -- fascinating. I actually learned a fair amount on the topic just watching your Q&A session. My background is in INFOSEC so I would be curious on your thoughts about ICS/SCADA security to include advanced PLC attacks like STUXNET.

  • @drorodriguez2827
    @drorodriguez2827 Год назад +1

    very good video, you are right, this can enhance our abilities to do more in shorter time.

  • @cod3nam3
    @cod3nam3 Год назад +2

    Great video. Increadible that it can produce more or less correct structured text. One hint though, at the left you see your past conversations so when restarting you can continue where it crashed.

  • @alexchiosso221
    @alexchiosso221 Год назад +16

    Hi Jackob.
    Great video on this specific topic.
    I was skeptical about ChatGPT OpenAI for Industrial Automation Software Programming.
    Now I do believe that it can be a side helper mostly for some particular algorithm integration.
    The complexity of the PLC programming related to the processes, ,machines, equipments or so specific applications cannot lead to a solution coming from this kind of AI.
    Anyway ChatGPT is so impressive and scary at the same time.

    • @TheYayabrian
      @TheYayabrian Год назад +2

      I can totally see process engineer writing control narrative and GPT based tool converting that into logic. Just a matter of time. Lets see who will do it first, Siemens Emerson, Honeywell or someone else. Now, GPT cannot do whole design for you (for now) but can definitely fill up the gaps and speed up the design process.

  • @timzalusky
    @timzalusky Год назад +1

    The ladder diagram stuff it outputs is pretty funny, I tried it myself a couple weeks ago, will watch this video in full later!

  • @TohidAlizadeh
    @TohidAlizadeh Год назад +2

    Very nice Video Jakob 😊

  • @softwaredefinedautomation
    @softwaredefinedautomation Год назад +1

    Great video, Jakob!

  • @ricky4129
    @ricky4129 Год назад +12

    Confidently burping out a slightly WRONG answer. It's so convincing you still need a specialist to tell it's wrong or not 😂

  • @tommyhuffman7499
    @tommyhuffman7499 Год назад +2

    Very cool video!
    I've used Google Translate as a language study tool for almost a decade. It's been insanely helpful. I see ChatGTP's potential as an extension of this. Want to learn PLC programming? Add to your study routine coming up with challenges, trying to solve them, then asking ChatGTP to solve them and compare.

  • @malikmamen
    @malikmamen Год назад

    I knew this, I've been asking chatGPT to make program a month ago. And it's working

  • @KamenTcholakov
    @KamenTcholakov Год назад +1

    Nice video!
    I asked it about configuring opcua in m241. It went in quite wrong direction. Suggested me to use a expansion module for a different plc (different manufacturer)!
    I agree though, it is amazing how much it knows and how well it communicates it.

  • @robertboone4798
    @robertboone4798 Год назад

    Sure, here's an example of a ladder logic program for a smart home using Siemens SIMATIC STEP 7 software and a Siemens S7-1200 PLC.
    Assumptions:
    - The smart home includes several devices, such as lights, fans, and air conditioners, which are connected to the PLC.
    - The PLC receives commands from a user interface to turn specific devices on or off or adjust their settings.
    - The PLC continuously monitors the status of all devices and reports any changes to the user interface.
    Ladder Logic Program:
    | Network | Symbol | Description |
    | --- | --- | --- |
    | 1 | I0.0 | Start button |
    | 1 | Q0.0 | Living room light |
    | 1 | Q0.1 | Living room fan |
    | 1 | Q0.2 | Living room AC |
    | 1 | M0.0 | User interface ready |
    | 1 | M0.1 | Living room light command |
    | 1 | M0.2 | Living room fan command |
    | 1 | M0.3 | Living room AC temperature command |
    | 1 | M0.4 | Living room light status |
    | 1 | M0.5 | Living room fan status |
    | 1 | M0.6 | Living room AC status |
    | | | |
    | 1.0 | A | I0.0 |
    | | | |
    | 1.1 | A | M0.0 |
    | | | |
    | 2.0 | X0.0 | Living room light |
    | | | |
    | 2.1 | A | M0.1 |
    | 2.1 | O | Q0.0 |
    | 2.1 | A | Q0.0 |
    | 2.1 | A | M0.4 |
    | | | |
    | 3.0 | X0.1 | Living room fan |
    | | | |
    | 3.1 | A | M0.2 |
    | 3.1 | O | Q0.1 |
    | 3.1 | A | Q0.1 |
    | 3.1 | A | M0.5 |
    | | | |
    | 4.0 | X0.2 | Living room AC |
    | | | |
    | 4.1 | A | M0.3 |
    | 4.1 | A | M0.6 |
    | 4.1 | O | Q0.2 |
    | 4.1 | A | Q0.2 |
    | | | |
    | 5.0 | X0.3 | Living room AC temperature too high |
    | | | |
    | 5.1 | I0.1 | Living room temperature sensor |
    | 5.1 | GT | 25 |
    | 5.1 | A | X0.3 |
    | | | |
    | 6.0 | X0.4 | Living room AC temperature too low |
    | | | |
    | 6.1 | I0.1 | Living room temperature sensor |
    | 6.1 | LT | 18 |
    | 6.1 | A | X0.4 |
    | | | |
    | 7.0 | X0.5 | Living room AC too long |
    | | | |
    | 7.1 | M0.7 | Living room AC timer |
    | 7.1 | TIM | 00:05 |
    | 7.1 | A | X0.5 |
    | | | |
    | 8.0 | X0.6 | Living room AC too short |
    | | | |
    | 8.1 | M0.8 | Living room
    ? write me a ladder logic smart home program using siemans

  • @ansonkiek6471
    @ansonkiek6471 Год назад +2

    Perhaps computer science or c language can be replace some day but plc still had hard time due to many method and internal ladder built by each manufacturer

  • @HelioCamposMellodeAndrade
    @HelioCamposMellodeAndrade Год назад +2

    Hi Jakob,
    You can use the history on the left side to bring back the context you had previously added to chatgpt so it remember the correct context you were talking about earlier. I asked get and it said it can't get the context off other conversations.

    • @HelioCamposMellodeAndrade
      @HelioCamposMellodeAndrade Год назад +1

      It gives you better answers when you do that. Also, if you think it could continue the answer, ask it to 'continue from line: "the line context"' and it continues from there.

  • @plantnerdsa
    @plantnerdsa Год назад +3

    Very Interesting video. Curious as to what your thoughts are regarding ladder and function block programming? what do you think is the future? or do you think Structured Text will take over?
    I live in South Africa and here the standard is ladder as it is easier for the electrician to also fault find.

    • @MR-nl8xr
      @MR-nl8xr Год назад

      FunctionBlock>LadderLogic>ScriptedText

  • @villujokinen8490
    @villujokinen8490 Год назад +2

    It can make complete ladder logic programs. You just need to define the question well and to ask to give it in XML.

    • @JakobSagatowski
      @JakobSagatowski  Год назад

      Thanks for the suggestion!

    • @juliocesaranez3853
      @juliocesaranez3853 2 месяца назад

      Can you please explain how to import the XML file to convert it in ladder logic, like what program to use and stuff, details or steps if you don’t mind please . Thank you

  • @BayYolal
    @BayYolal Год назад

    24:00 oh no :D

  • @benid696
    @benid696 Год назад

    Cool video and amazing what ChatGPT could already do!

  • @Bulkje
    @Bulkje Год назад +2

    It can generate a start for a project, but ChatGPT can be confidently incorrect. That and personally the code I write (for work) is really dependent on the other code, and not so much on general functions.

  • @LuLuNehir
    @LuLuNehir Год назад +1

    Thank you 🙏

  • @gothakkar
    @gothakkar Год назад +5

    Jakob, you are the Tony Stark of industrial automation, and this video is your Iron Man suit. Keep building those awesome robots! 🤩

    • @JakobSagatowski
      @JakobSagatowski  Год назад +1

      Tony Stark of industrial automation!!!! 🤣🤣🤣 This made my week!!! 🤣

    • @gothakkar
      @gothakkar Год назад

      @@JakobSagatowski 😜

  • @griffinkirkland9087
    @griffinkirkland9087 Год назад

    you are not alone 😂
    I've been dreaming and breathing it in and out 😂 every day

  • @jancatalinnicoara485
    @jancatalinnicoara485 Год назад +2

    Nice challenge for ChatGPT...One step forward and automation guys are out. :) Just kidding. But anyway, nice to get documentation regarding IL, ST, SFC, FB, FBU, LD. :). And for AI also. :)

  • @santosh1207
    @santosh1207 2 месяца назад

    Can it be done with PLC LADDER LOGIC diagrams in chat gpt?

  • @larsjordan4459
    @larsjordan4459 Год назад +1

    Hi Jakob, thanks for the great video. It really made me wanna try it out too. However, my feeling regarding the answers is a bit different compared to yours. I agree they read very comprehensive and "knowledgable". But on second sight they could also have been given in another (probably more general) context using the same pattern. So, my feeling is that they are rather superficial. They read impressive, but do for my taste not exceed the level of a search engine with a good user interface.

  • @doylepatterson4376
    @doylepatterson4376 Год назад

    Great Sense of Humor Jake// That Helps with Hi-Tech " Jelly-Rolls", Haha

  • @MrDawen1997
    @MrDawen1997 Год назад +1

    Actually you can write a program in Ladder, you need to define it as (Ladder Logic)

  • @espenb4135
    @espenb4135 Год назад

    You can copy youre code in to chatGPT and ask for hjelp on how to make youre code. It can take long programs. Or you can get help to make functionblocks etc. I have tride it with C, python and codesys

  • @brunocastronunes
    @brunocastronunes Год назад

    Very Good!!!

  • @justinturner93
    @justinturner93 Год назад +1

    If you are looking for a video sponsor PLC related. Add a business inquiry email in your about section and I will ping you. Thanks for all you do 👍

  • @mesutsirincan5523
    @mesutsirincan5523 Год назад

    That keyboard caught my attention.. I guess they are pbt keycaps. What's the brand of the keyboard?

  • @ipadize
    @ipadize Год назад +2

    8:05 others probably already mentioned this, but you actually got logged off for some reason^^ happens to me also relatively often

  • @Skaagarak
    @Skaagarak Год назад +3

    I asked it how to connect to Beckhoff PLC using Python and it came up with pyads and example code to connect.

  • @geliasr2562
    @geliasr2562 Год назад

    I like the bossa nova as background music

  • @Y234-t2c
    @Y234-t2c Год назад

    Any idea how to get ladder from it ?

  • @abdulqhader814
    @abdulqhader814 Год назад

    I'm the plc programing in auto mechan . what help ai to PLC

  • @robertomelo8815
    @robertomelo8815 Год назад

    good topic

  • @xKrantzzy
    @xKrantzzy Год назад +5

    Fun video, never expected it to understand IEC 61131-3 languages! That ladder programming looks about as good as i'm writing it 😂
    I agree in the way that this type of AI won't take our jobs directly in the near future. But it can be that makes us much more efficient that what was previously possible, as you said. But if 1 Automation Engineer can now work as fast as 3 current Automation Engineers, then these AIs can make us indirectly loose our jobs. But just like when computers became mainstream and a lot of jobs became obsolete, a lot of new jobs will appear in its place. So I don't see it as a problem either, for a good while at least 😉 Would love to hear a deeper insight about this subject from you in the future.
    Hade gött!

  • @qzorn4440
    @qzorn4440 Год назад

    this is a nice show me video. However the true capabilities of ChatGPT would be demonstrated by having more experienced placing the text request to ChatGPT. 😎 Thanks.
    If you ask ChatGPT the same question twice the second answer might be worded a little different as the AI is still learning. 🥳

  • @Art0r1a
    @Art0r1a Год назад

    The company I work for intends to use ChatGPT to fill the gap in manpower instead of hiring additional programmers.
    I'm not convinced that it'll reduce the workload on us, but we'll see I guess... he's the boss.

  • @GuyFromJupiter
    @GuyFromJupiter Год назад

    What's crazy to me is that not only can it write valid code but that it can also modify and troubleshoot the code upon request. And it's not even meant to be good at it, it just happens to be.

  • @adrianjenkner2775
    @adrianjenkner2775 Год назад

    Nice video Jacob. Maybe V2 with C# (and ADS communication to Beckhoff) ?

    • @JakobSagatowski
      @JakobSagatowski  Год назад

      If I manage to get into ChatGPT 😅 It's overwhelmed 😅

  • @PlayAutomation
    @PlayAutomation Год назад

    Its too bad it buzz out when asked to write in ladder diagram. It might have been simpler to do an IL or XML.

  • @BigTimeCharley1956
    @BigTimeCharley1956 Год назад

    Am I the only one that noticed the mistake in the LCG random number generator? It should be
    seed := (seed * A + C) mod M;
    random_number = seed / M;
    inside the loop, no?

  • @mattweger437
    @mattweger437 Год назад +1

    Whelp time to move to the woods and get used to the taste of deer jerky.

  • @amazlin8271
    @amazlin8271 Год назад

    Google gives better answers in this case than Chatgpt, you had test and show this point here. In addition your questions were simple, like write for me a function in struct text. Automation is more than one function block. If you ask Chatgpt to give you a design of a while system, including plcs, scada and communications protocols it could not give this design. .

  • @Aitimoney
    @Aitimoney Год назад

    I have started trying to use this for Automation Direct PLC. If there is anyone who would like to talk about it over phone let me know.

  • @abdulqhader814
    @abdulqhader814 Год назад

    Goot Morgan sir

  • @johngrikis9049
    @johngrikis9049 Год назад

    You should ask if ST or SCL is better ;)

  • @powervoodoo
    @powervoodoo Год назад

    I there, try another video and ask for code in ST but with norma IEC 61131-3 and you love the answer.

  • @ypkapo2
    @ypkapo2 Год назад

    anazing!

  • @ashkelly449
    @ashkelly449 Год назад +1

    Here we go haven't even graduated yet ai can take my job

    • @JakobSagatowski
      @JakobSagatowski  Год назад

      😅

    • @primi22
      @primi22 Год назад

      Don’t worry, chatgpt cannot, by definition, acquire tacit knowledge, which is where most value in engineering comes from. Also code generation has been around for a while. By the time you get chatgpt to output something usable, you could have configured a code generation tool or rolled your own, which many people have been doing since the 90s.

  • @niclash
    @niclash Год назад

    You actually contradicted yourself a bit; When YOU get more productive, someone doesn't get any work at all. I.E if we become 10x more productive eventually, one of two things happens, a) a large portion will not get any work, or b) downward pressure on what one can charge for the output, or a combination of both.

    • @JakobSagatowski
      @JakobSagatowski  Год назад +2

      You are assuming the amount of work is constant and will not increase, and that this will not bring more opportunities and shift what we will do instead. From what I can see, there has never been more automation work to do and I don't see it decrease. I can already see me and others doing more work on other value-bringing things instead that are lacking in the world of industrial automation, such as writing proper tests for our code.

    • @niclash
      @niclash Год назад

      @@JakobSagatowski True... Although I am looking at the entire IT sector, not only industrial automation.

  • @iNireus
    @iNireus Год назад

    Ask it can you write a chatGPT in plc structured text

  • @BigTimeCharley1956
    @BigTimeCharley1956 Год назад +1

    Not bad:
    please describe the scan cycle of a plc
    The scan cycle is the process by which a PLC (Programmable Logic Controller) periodically reads input data, processes that data, and updates output data. The scan cycle is typically broken down into several steps:
    Input Scan: The PLC scans the input devices and reads their current state. The input data is then stored in the PLC's memory.
    Program Execution: The PLC then executes the program stored in its memory. The program uses the input data to make decisions and perform calculations.
    Output Scan: The PLC scans the output devices and updates their state based on the results of the program execution. The output data is also stored in the PLC's memory.
    Housekeeping: The PLC performs any necessary housekeeping tasks, such as checking for errors or updating diagnostic information.
    Repeat: The entire process is repeated, typically at a high frequency, such as every few milliseconds, to ensure that the PLC is continuously monitoring and controlling the process or system.
    The duration of the scan cycle can vary depending on the PLC model and the complexity of the program, but typically is between 1-10 milliseconds.

  • @nhibbs3
    @nhibbs3 Год назад

    4026 is coming soon! lol

  • @paulo.galvao
    @paulo.galvao Год назад

    It may helps, but it is not perfect

  • @JNET_Reloaded
    @JNET_Reloaded Год назад

    chat gpt sucks now it only lets you have n number of tries then it shuts down an wants money!

  • @AFuller2020
    @AFuller2020 Год назад

    Another loud typer,