ChatGPT and PLC programming

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ต.ค. 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

  • @SoCalFreelance
    @SoCalFreelance ปีที่แล้ว +4

    An entire TH-cam 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.

  • @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.

  • @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.

  • @garethsmith7628
    @garethsmith7628 ปีที่แล้ว +6

    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 15 วันที่ผ่านมา

      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

  • @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 😂

  • @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.

  • @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

  • @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.

  • @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.

  • @timzalusky
    @timzalusky ปีที่แล้ว

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

  • @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

  • @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.

  • @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. :)

  • @larsjordan4459
    @larsjordan4459 10 หลายเดือนก่อน +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.

  • @malikmamen
    @malikmamen ปีที่แล้ว

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

    • @sabersabrinaacademy-vs9fb
      @sabersabrinaacademy-vs9fb หลายเดือนก่อน

      how to write plc program ladder language by chatgpt plz help me

  • @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 15 วันที่ผ่านมา

      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

  • @doylepatterson4376
    @doylepatterson4376 11 หลายเดือนก่อน

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

  • @TohidAlizadeh
    @TohidAlizadeh ปีที่แล้ว +2

    Very nice Video Jakob 😊

  • @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

  • @geliasr2562
    @geliasr2562 11 หลายเดือนก่อน

    I like the bossa nova as background music

  • @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.

  • @softwaredefinedautomation
    @softwaredefinedautomation ปีที่แล้ว +1

    Great video, Jakob!

  • @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

  • @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 😜

  • @MrDawen1997
    @MrDawen1997 ปีที่แล้ว +1

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

  • @santosh1207
    @santosh1207 11 วันที่ผ่านมา

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

  • @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!

  • @mesutsirincan5523
    @mesutsirincan5523 ปีที่แล้ว

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

  • @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

  • @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.

  • @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 😅

  • @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.

    • @Chiricuazo701
      @Chiricuazo701 4 หลายเดือนก่อน

      Can we get a follow up?

  • @griffinkirkland9087
    @griffinkirkland9087 ปีที่แล้ว

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

  • @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?

  • @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 👍

  • @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.

  • @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. .

  • @benid696
    @benid696 ปีที่แล้ว

    Cool video and amazing what ChatGPT could already do!

  • @The_Nehir.
    @The_Nehir. ปีที่แล้ว +1

    Thank you 🙏

  • @BayYolal
    @BayYolal ปีที่แล้ว

    24:00 oh no :D

  • @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.

  • @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.

  • @abdulqhader814
    @abdulqhader814 ปีที่แล้ว

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

  • @Y234-t2c
    @Y234-t2c ปีที่แล้ว

    Any idea how to get ladder from it ?

  • @robertomelo8815
    @robertomelo8815 ปีที่แล้ว

    good topic

  • @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

  • @brunocastronunes
    @brunocastronunes ปีที่แล้ว

    Very Good!!!

  • @mattweger437
    @mattweger437 ปีที่แล้ว +1

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

  • @powervoodoo
    @powervoodoo ปีที่แล้ว

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

  • @johngrikis9049
    @johngrikis9049 ปีที่แล้ว

    You should ask if ST or SCL is better ;)

  • @ypkapo2
    @ypkapo2 ปีที่แล้ว

    anazing!

  • @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.

  • @iNireus
    @iNireus ปีที่แล้ว

    Ask it can you write a chatGPT in plc structured text

  • @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.

  • @paulo.galvao
    @paulo.galvao ปีที่แล้ว

    It may helps, but it is not perfect

  • @nhibbs3
    @nhibbs3 ปีที่แล้ว

    4026 is coming soon! lol

  • @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,