⬆Support this channel using the "Thanks" button⬆ or by making a donation through PayPal → www.paypal.com/donate/?hosted_button_id=7FBED5B26KT7S, or by becoming a Patron → www.patreon.com/sagatowski
If you want to instance many FB you will name them as the FB adding some number? For example EventLogger : EventLogger; EventLogger1 : EventLogger; EventLogger2 : EventLogger; ? Thanks for your videos!
Thanks! Jakob For the efforts and knowledge sharing on TwinCAT. I am a Siemens PLC programmer and looking to get Started in TwinCAT. Your introduction to TwinCAT PLC is of great information and are enough to get started without any blind spots. You have made it look very easy. I had very brief hands on implementation of OOPs using ST language. But your videos are of immense help to make further progress. Super Thanks not for only this video but for complete playlist.
I really appreciate your tutorial playlist. I haven't seen anything that's even remotely comparable in quality and understandability anywhere. I'm working on my first TwinCat3 Project at work and I only have minor experience with Siemens PLC's and zero with Beckhoff apart from the project I have been working on since a few months. It's hard finding people that have enough knowledge to teach me since the company I work at rarely uses Beckhoff. HUGE thank you for making this available for free without making any compromises on details and quality.
Hey Flavio, actually I am in the same situation. I've got some experience with Siemens PLC but now Beckhoff project awaits. This tutorial is awesome and I cannot thank Jakob enough to do that. I wish you good luck and I hope we both finish our project succesfuly .
I really appreciate your tutorial playlist. I haven't seen anything that's even remotely comparable in quality and understandability anywhere. I'm working on my first TwinCat3 Project at work and I only have minor experience with Siemens PLC's and zero with Beckhoff apart from the project I have been working on since a few months. It's hard finding people that have enough knowledge to teach me since the company I work at rarely uses Beckhoff. HUGE thank you for making this available for free without making any compromises on details and quality. I am learning Beckhoff first time, and your tutorial is the best and also the resources available on the net are few. Thank you and keep up the good work🙂
Excellent point about comments. Definitely something that new programmers need to understand. The other day I came across a piece of code with a series of comments which were simply not factually true. The programmer before me had read the comments and assumed they were accurate, but they weren't, and this introduced a host of new bugs. Only the code is authoritative, no programmer worth their salt will trust comments, and they will be sceptical of names and documentation too.
just finished all the videos from part 1 to part 6a, all i want to say is these videos are so informative, very simple to understand. i will be waiting for the upcoming parts. thanx a lot for doing videos on twincat3
To teach other and give away you Knowles, is much more worth than money. I have 20 years expirience of building automation, that knowles who i got for many years ago and all my time i have used, there no body who is intrested to learn for free. I tryed and was only person who garanted job anywere in world if you can catch my level. Becose than i know you are worth the job. No offer in live no god job. Dont think about money, the money will come, think the freedom you have when you have best knowledges. Best regards and thanks to Jacob
Great Job, Amazing. I've already watched all the previous Parts of the Tutorial and I'm waiting for the next part of the Tutorial. Thanks a lot, you are amazing keep continue.
I have been looking this video series and its very nice i have to say. I did TwinCAT 2 last time like many years ago and now learning TwinCAT 3 for maybe a new job. I have years of experience coding with structured text in ABB control builder and DCS systems but I have background in traditional automation engineering rather than software development so it is funny to see how different approach you have and I could actually do some things differently.
You are so GOOD!!! Saved my day. I was totally confused to see the constructor called again and again in the MAIN() function which is run over and over. I thought how many instances are they creating? After I saw your video I realized that's just updating the existing instance, not creating a new one.
hello what is that symbol you made at 29:25 you wrote ( and then what? if i try it with ^ nothing happenes like with your text .. if i write ' it changes into yellow color text
just an advice, you can teach it more simple. I can't understand where you get the parameters. You are changing continually pages(most probably it supposed to be) but really complicated.
Great work Jakob! The way you have structured this tutorial and your approach in presenting the concepts make it very enjoyable as well as informative. One suggestion if I may would be to zoom in a bit more on your code when possible.
Thank you for the tutorials! Question: What is the reason that things aren't zero indexed in structured text? Sorry if this has already been addressed.
Hi Rainat! I would say your normal PC! Your normal PC is most likely much more powerful than the Beckhoff PLCs, and for learning you really don't need a Beckhoff PLC. I would say start with your PC and do everything on the PC until you really need to play around with real physical inputs/outputs, but for programming there is really no need for a Beckhoff controller! But again, this all depends on your requirements :-)
Really appreciate for your efforts with your tutorials Jakob, I have some doubts regarding methods - Is it possible to declare 'optional input' in method? So far I know that not possible to declare optional input on methods - Thanks 😊
Actually the useage of FBs Like classes in oop languages, frees US from using plc structs? I have all my object members defined within my FB and that makes structs obsolete. Am I right?
Hi, thanks for all the great videos. I am trying to pass an instance of FB_A as part of the initialization of an instance of FB_A, is that possible? and if not what are other ways of doing so? thank you.
What is the model number of the beckoff controller and IO on your desk? I would like to test with some physical beckoff hardware and am interested in learning what you are using.
hi Jakob, Thank you for a great tutorial! How would you call the addEvent method from another program or another function block within the same PLCtask?
Hi! Simply by passing the interface(pointer) to anywhere you like! (you can exchange data between two programs by simply allocating an AT %I and AT %Q between them)
Question: I have read a bock suggesting a form of communication between Functionblocks: They the get Methode of a Property to check the state of the Funktionblock while changing it with a method. What kind of application would the set methode of a Property have?
This is a great series, I am only on the 6-th part. Do you have a video series where you go through a problem-solution design, like create a PLC code for a small machine!?
See 9m50s, calling function block directly. Does this have an equivalent in OOP languages like C++, Java, C#, Delphi, like calling static methods? Is it the same?
Hi Mr Jacob, I wish you all the best. Your course is very clear and great, but I wish you would put the ladder language explanations before the structure text, I think this will make the course simpler for us, as I am learning for the first time about Beckhoff. I love your videos so much
Thank you for the contents, I have a question : is it possible to load massive Fortran codes on a PLC to run in real-time? Or is it possible for the PLC to call a DLL compiled from these Fortran code ?
Hi Heidi! Really good question. I don't think it's possible as it would need to be a TcCom object so that TwinCAT could talk to it, and currently there are only compilers for the IEC languages, C++ (with Microsofts C++ compiler) and Matlab/Simulink projects (through an add-on) that can create these objects.
@@JakobSagatowski Thank you for the reply. Because some professors could establish a communication between the TwinCat3 environment and an external DLL from Fortran code thanks to an "interaction routine" written in C++. It seems not possible, but the "interface routine" seems made for solving this issue.
Amazing and super useful video. you mentioned in a previous video that the "MAIN" Program Loops continuously.. do Function Blocks also run continuously in loops, or do they only run the code in their body when the body is called by MAIN? If MAIN only instantiates but does not call A Function Block. Will the Function Block execute any code? -achintya
I have to ask have you a video about how read or write can value from any parameter or variable from a c++ program on PLC twincat3 varhable or from plc in to c++ methode/programm
Hello Jakob. Many thanks for your tutorials ! Just a question, in this tutorial you don't use C++ with TwinCAT but is it possible to program a master EtherCAT on TwinCAT by using C++ module ? I can't find any information about it unfortunately. Thank you and thanks again for your videos. Best. Nicolas
These tutorials are super helpful, thank you so much for making them Jakob. There's one thing I'm having trouble with though that maybe you or someone here can help me with - when developing a TwinCAT project in Visual Studio 2019, right-clicking on an object in DUTs or POU's does not give me the option to delete or rename it. Seems very strange, how do you rename or delete function blocks, structures, etc.?
Dear Jakob, again thank you so much for the lifesaving tutorial. I have one question. is it possible that we could have the codes? (I write the codes myself but I need to print them beforehand so I can take notes when I'm watching the tutorial.
Hi Maryam! Thanks for supporting this channel. I have unfortunately not saved the project files after creating each episode, other than possibly the latest one (ep9). I will remember to save all of them in the future and upload them to my GitHub account.
@maryam Nemas problemas. I'll update this comment as soon as I have uploaded it to my repo. You can also follow my GitHub account and then you will be notified on GitHub when I have uploaded the code: github.com/sagatowski. Cheers!
@@JakobSagatowski I'm already following you ;) I honestly cannot thank you enough, Jakob. Not only you share these amazing tutorials, you are supportive and responsive to comments too.
@@JakobSagatowski no please, we want it! i think all your subscribers would show up. just make sure you remind people of a specific time, so people will know when it is.
Perhaps I coming from awl siemens programmer Oop, and my question is what happend if inside the FB built a data memory of each event, and with the event instance call built inside FB a memory of every event , to keep the oop concept instead use an DB as Array of 100 outside FB And thank u , 4ur tutorial, I just learning twincat, Ian I'm trying to Match what I know from Siemens and B&R
We all knew assigning an upper bound to the number of episodes was a brave move. I mean, if the scope of your project isn't running away from you are you even really working with controls gear?
Of course scope of project can change. What is important is being able to have a process that allows for learning as much as possible and being able to do fast adaptions to changes.
@@JakobSagatowski I see that my terrible, dry british sense of humour has once again been taken too literally aha. I love the vids by the way, I've actually learnt some stuff which is a nice suprise.😃 Keep up the great work
I totally disagree with you about comments. You are arguing that comments are not necessary if your naming of data structures is optimal, which is a perfect world scenario. I have seen plenty of code without comments, and it is a pain to go through them. I would say that comments are necessary and their corresponding updates throughout versions as well.
Hey Redvenom! I was discussing comments in the context of variable names. Comments should never be an excuse for giving bad variable names or just generally not be an excuse for unclear code. With that being said, I wouldn't go to the other extreme and say that you should never write comments. stackoverflow.blog/2021/12/23/best-practices-for-writing-code-comments/
Great content again Jakob! Looks like you're making the most beloved videos on RUclips with lots of thumbs up and zero thumbs down! One question. Any particular reason why you use the IF ELSE for you IsEventBufferFull? Why not do IsEventBufferFull := (CurrentEventBufferIndex + 1) > MAXIMUM_SIZE_OF_EVENT_BUFFER?
@@JakobSagatowski I'm not sure if it is more beginner friendly. It might be. But regardless of this. You are putting a lot of effort to show best practices. For example with the comments and moving things into method. So I thought it might be good to show the short version of this. It might be my perfectionism, but I see the verbose version so often. When it also shows up in teaching material, then people never see the correct version. Maybe I should just write about it on my blog :p. Just a very minor point where it could be improved imo :). Stellar tutorials overall!
@Roald Ruiter. Sorry what I meant with beginner friendly was that I wanted the part of this tutorial to show new syntax, in this case ELSE. From a pure readiness perspective, then your suggestion is much more clear (and would normally be what I would use), but I just wanted to showcase the syntax ELSE as well (which ironically won't be discussed until part 7, that is a later part).
⬆Support this channel using the "Thanks" button⬆ or by making a donation through PayPal → www.paypal.com/donate/?hosted_button_id=7FBED5B26KT7S, or by becoming a Patron → www.patreon.com/sagatowski
If you want to instance many FB you will name them as the FB adding some number? For example EventLogger : EventLogger; EventLogger1 : EventLogger; EventLogger2 : EventLogger; ? Thanks for your videos!
The side jokes and little stories are hilarious. Paired with the great teaching and expertese. You earned a subscriber.
Thanks! Jakob For the efforts and knowledge sharing on TwinCAT. I am a Siemens PLC programmer and looking to get Started in TwinCAT. Your introduction to TwinCAT PLC is of great information and are enough to get started without any blind spots. You have made it look very easy. I had very brief hands on implementation of OOPs using ST language. But your videos are of immense help to make further progress. Super Thanks not for only this video but for complete playlist.
I'm very happy I managed to get you off to a good start in the world of TwinCAT. Thanks for the kind donation!
I really appreciate your tutorial playlist. I haven't seen anything that's even remotely comparable in quality and understandability anywhere. I'm working on my first TwinCat3 Project at work and I only have minor experience with Siemens PLC's and zero with Beckhoff apart from the project I have been working on since a few months. It's hard finding people that have enough knowledge to teach me since the company I work at rarely uses Beckhoff.
HUGE thank you for making this available for free without making any compromises on details and quality.
Thank you Flavio for the feedback. It's comments like these that keep me motivated to do more content!
Hey Flavio, actually I am in the same situation. I've got some experience with Siemens PLC but now Beckhoff project awaits. This tutorial is awesome and I cannot thank Jakob enough to do that. I wish you good luck and I hope we both finish our project succesfuly .
I really appreciate your tutorial playlist. I haven't seen anything that's even remotely comparable in quality and understandability anywhere. I'm working on my first TwinCat3 Project at work and I only have minor experience with Siemens PLC's and zero with Beckhoff apart from the project I have been working on since a few months. It's hard finding people that have enough knowledge to teach me since the company I work at rarely uses Beckhoff.
HUGE thank you for making this available for free without making any compromises on details and quality. I am learning Beckhoff first time, and your tutorial is the best and also the resources available on the net are few. Thank you and keep up the good work🙂
Amazing resource.
Thanks for the generous donation Szymon!
Excellent point about comments. Definitely something that new programmers need to understand. The other day I came across a piece of code with a series of comments which were simply not factually true. The programmer before me had read the comments and assumed they were accurate, but they weren't, and this introduced a host of new bugs. Only the code is authoritative, no programmer worth their salt will trust comments, and they will be sceptical of names and documentation too.
Very symphatic and perfect in explainig. Every teacher can learn from you!
Thank you very much Timo! Hope you have a nice day!
Thanks!
Thanks for this kind donation Darko, and I'm happy you find this course useful!
just finished all the videos from part 1 to part 6a, all i want to say is these videos are so informative, very simple to understand. i will be waiting for the upcoming parts. thanx a lot for doing videos on twincat3
Thanks Akshay! Stay tuned for the next episode.
outstanding tutorial. I see how much time and effort you put into your videos.
Can't believe you do it for free.
To teach other and give away you Knowles, is much more worth than money. I have 20 years expirience of building automation, that knowles who i got for many years ago and all my time i have used, there no body who is intrested to learn for free. I tryed and was only person who garanted job anywere in world if you can catch my level. Becose than i know you are worth the job. No offer in live no god job. Dont think about money, the money will come, think the freedom you have when you have best knowledges. Best regards and thanks to Jacob
The best PLC tutorials on RUclips
Thanks! If you like the content, please consider becoming a member. Thanks!
I love this: 22:46 - "Comments are generally bad".
YES!! OMG. FINALLY!
I've been waiting for this video.
Me too, I a never ever waited for any videos before.
thank you for these tutorials, one of the few real useful resources online about TwinCat3 !!
Excellent material! I enjoy the parts on software development - comments, name of variables, clean coding, etc. Tack så mycket!
Hi Alexandre! I'm very happy you find this tutorial useful. Hope you have a nice day!
Great Job, Amazing. I've already watched all the previous Parts of the Tutorial and I'm waiting for the next part of the Tutorial. Thanks a lot, you are amazing keep continue.
Thanks Vahid!
I have been looking this video series and its very nice i have to say. I did TwinCAT 2 last time like many years ago and now learning TwinCAT 3 for maybe a new job. I have years of experience coding with structured text in ABB control builder and DCS systems but I have background in traditional automation engineering rather than software development so it is funny to see how different approach you have and I could actually do some things differently.
I enjoyed this video very much, great detail. I (we) wait for the next.
Great series. Well structured, informative and easy to follow. Thanks for sharing your knowledge!
Glad it was helpful!
Great information! Can't wait for full series!
Thanks for teaching “As I need :- )” sales from 89 to 2010 learned a lot …. but not much programming.
It's never too late :-)
very easy to follow. Excellent training video. Appreciate your effort. Thank you very much.
Супер! Огромное человеческое спасибо!
Super! A huge human thank you!
You are so GOOD!!! Saved my day. I was totally confused to see the constructor called again and again in the MAIN() function which is run over and over. I thought how many instances are they creating? After I saw your video I realized that's just updating the existing instance, not creating a new one.
Happy I could be of help!
Very cool! I loved that you used '42' as the Event Identity ;)
Thank you Jakob for making this tutorial
Thank you!
Great work with your tutorials. Nicely explained concepts.
can I hug you?❤. Thanks mate, much appreciate all your effort
🤗
Excellent video, as usual!
hello what is that symbol you made at 29:25 you wrote ( and then what? if i try it with ^ nothing happenes like with your text .. if i write ' it changes into yellow color text
its * (star) ... i tried google but they showed /* xx */ .. but its (* xx *)
thank you jakob, this tutorial is amazing!
just an advice, you can teach it more simple. I can't understand where you get the parameters. You are changing continually pages(most probably it supposed to be) but really complicated.
Great work Jakob! The way you have structured this tutorial and your approach in presenting the concepts make it very enjoyable as well as informative. One suggestion if I may would be to zoom in a bit more on your code when possible.
Hi Kostas! Glad you enjoy the tutorial. Excellent suggestion with zooming in on the code. I'll take that into consideration for the next episode!
You're the best! Until next time...
Thanks for the kind words Aaron!
Awesome content, Jakob.
Thanks fellow RUclipsr!
Thank you for the tutorials!
Question: What is the reason that things aren't zero indexed in structured text? Sorry if this has already been addressed.
Loving this.
Hey Jakob. Thx for your tutorials. In terms of hardware what do you suggest to start play with?
Hi Rainat! I would say your normal PC! Your normal PC is most likely much more powerful than the Beckhoff PLCs, and for learning you really don't need a Beckhoff PLC. I would say start with your PC and do everything on the PC until you really need to play around with real physical inputs/outputs, but for programming there is really no need for a Beckhoff controller! But again, this all depends on your requirements :-)
what was that little pop up window at 36:43?
Really appreciate for your efforts with your tutorials Jakob,
I have some doubts regarding methods - Is it possible to declare 'optional input' in method? So far I know that not possible to declare optional input on methods - Thanks 😊
Actually the useage of FBs Like classes in oop languages, frees US from using plc structs? I have all my object members defined within my FB and that makes structs obsolete. Am I right?
I tend to use structures still for plain simple data structuring. stackoverflow.com/questions/54585/when-should-you-use-a-class-vs-a-struct-in-c
Hi,
thanks for all the great videos. I am trying to pass an instance of FB_A as part of the initialization of an instance of FB_A, is that possible? and if not what are other ways of doing so?
thank you.
What is the model number of the beckoff controller and IO on your desk? I would like to test with some physical beckoff hardware and am interested in learning what you are using.
Hi JandJ! I'm using a CX5140
hi Jakob, Thank you for a great tutorial! How would you call the addEvent method from another program or another function block within the same PLCtask?
Hi! Simply by passing the interface(pointer) to anywhere you like! (you can exchange data between two programs by simply allocating an AT %I and AT %Q between them)
Question:
I have read a bock suggesting a form of communication between Functionblocks:
They the get Methode of a Property to check the state of the Funktionblock while changing it with a method.
What kind of application would the set methode of a Property have?
This is a great series, I am only on the 6-th part. Do you have a video series where you go through a problem-solution design, like create a PLC code for a small machine!?
See 9m50s, calling function block directly. Does this have an equivalent in OOP languages like C++, Java, C#, Delphi, like calling static methods? Is it the same?
Hi Mr Jacob, I wish you all the best. Your course is very clear and great, but I wish you would put the ladder language explanations before the structure text, I think this will make the course simpler for us, as I am learning for the first time about Beckhoff.
I love your videos so much
can you please show how to use the pointer super^. to overwrite existing methods, please? I do not understand the example from the infosys website.
Thank you for the contents, I have a question : is it possible to load massive Fortran codes on a PLC to run in real-time? Or is it possible for the PLC to call a DLL compiled from these Fortran code ?
Hi Heidi! Really good question. I don't think it's possible as it would need to be a TcCom object so that TwinCAT could talk to it, and currently there are only compilers for the IEC languages, C++ (with Microsofts C++ compiler) and Matlab/Simulink projects (through an add-on) that can create these objects.
@@JakobSagatowski Thank you for the reply. Because some professors could establish a communication between the TwinCat3 environment and an external DLL from Fortran code thanks to an "interaction routine" written in C++. It seems not possible, but the "interface routine" seems made for solving this issue.
Amazing and super useful video. you mentioned in a previous video that the "MAIN" Program Loops continuously.. do Function Blocks also run continuously in loops, or do they only run the code in their body when the body is called by MAIN? If MAIN only instantiates but does not call A Function Block. Will the Function Block execute any code? -achintya
They run only if they are executed from a program.
So helpfull ! How would you recommend to do the messaging between Methods in TC?
Appreciate you Jakob. I was wondering where I can watch the rest of the videos after section 6a?
Hi Reza! Thanks. They are not posted yet. Part 6b will be published tomorrow 😀
@@JakobSagatowski Sounds great. I am enjoying watching your videos.
I have to ask have you a video about how read or write can value from any parameter or variable from a c++ program on PLC twincat3 varhable or from plc in to c++ methode/programm
Question: Should you check if Function Block is instantiated just one time with an If statement?
Hello Jakob. Many thanks for your tutorials ! Just a question, in this tutorial you don't use C++ with TwinCAT but is it possible to program a master EtherCAT on TwinCAT by using C++ module ? I can't find any information about it unfortunately. Thank you and thanks again for your videos. Best. Nicolas
I've made it this far. Let's go!!!
Great work!!
These tutorials are super helpful, thank you so much for making them Jakob. There's one thing I'm having trouble with though that maybe you or someone here can help me with - when developing a TwinCAT project in Visual Studio 2019, right-clicking on an object in DUTs or POU's does not give me the option to delete or rename it. Seems very strange, how do you rename or delete function blocks, structures, etc.?
Great job 💪
Thank you so much! it helped a lot
You're welcome!
Dear Jakob, again thank you so much for the lifesaving tutorial. I have one question. is it possible that we could have the codes? (I write the codes myself but I need to print them beforehand so I can take notes when I'm watching the tutorial.
Hi Maryam! Thanks for supporting this channel. I have unfortunately not saved the project files after creating each episode, other than possibly the latest one (ep9). I will remember to save all of them in the future and upload them to my GitHub account.
@@JakobSagatowski thank you Jakob. it would be really helpful.
@maryam Nemas problemas. I'll update this comment as soon as I have uploaded it to my repo. You can also follow my GitHub account and then you will be notified on GitHub when I have uploaded the code: github.com/sagatowski. Cheers!
@@JakobSagatowski I'm already following you ;) I honestly cannot thank you enough, Jakob. Not only you share these amazing tutorials, you are supportive and responsive to comments too.
Hi Jakob, Thank you very much for your great course. I have a question that if are there a lot of jobs for freelancer about TwinCAT programmer?
Hi Phuc! I guess this depends a lot on where you live and your skills, but yes I would say the market for TwinCAT developers looks good.
@@JakobSagatowski Thank you very much. You are doing a such great job
I think you accidently took off the 6b part. I can't find it anymore.
It's not been released yet
how about a livestream where we can ask questions?
Haven't considered livestreams to be honest. I don't think I would have enough viewers 😅
@@JakobSagatowski no please, we want it! i think all your subscribers would show up. just make sure you remind people of a specific time, so people will know when it is.
Sign me up for that
Eithernet on Steroids....MAN, you are killing it!😆😆😆
hey ive got my advanced automation application project 2 today and i dont know what to do and im watching you btw how do i open block fb testing
Very clear. Thx
AWESOME
Can someone please help me where to find parts 15 through 18 of this series ?
Hi Neil! Part 15 is now available on Patreon: www.patreon.com/posts/plc-programming-70831754
@@JakobSagatowski Thanks. Is it only on patreon or can access be gained by funding via "Thanks" button ?
@@neilbadenhorst8031 Why not both?
Im agreed with no over comment the code, but i like take steps with comment to explain what was my intencion whith that code
Perhaps I coming from awl siemens programmer Oop, and my question is what happend if inside the FB built a data memory of each event, and with the event instance call built inside FB a memory of every event , to keep the oop concept
instead use an DB as Array of 100 outside FB
And thank u , 4ur tutorial, I just learning twincat, Ian I'm trying to Match what I know from Siemens and B&R
We all knew assigning an upper bound to the number of episodes was a brave move. I mean, if the scope of your project isn't running away from you are you even really working with controls gear?
Of course scope of project can change. What is important is being able to have a process that allows for learning as much as possible and being able to do fast adaptions to changes.
@@JakobSagatowski I see that my terrible, dry british sense of humour has once again been taken too literally aha. I love the vids by the way, I've actually learnt some stuff which is a nice suprise.😃 Keep up the great work
Paradigm : Para - Dime, G is silent
The problem with being multilingual 😅 In Swedish the G is not silent.
@@JakobSagatowski Which makes more sense.
I totally disagree with you about comments. You are arguing that comments are not necessary if your naming of data structures is optimal, which is a perfect world scenario. I have seen plenty of code without comments, and it is a pain to go through them. I would say that comments are necessary and their corresponding updates throughout versions as well.
Hey Redvenom! I was discussing comments in the context of variable names. Comments should never be an excuse for giving bad variable names or just generally not be an excuse for unclear code. With that being said, I wouldn't go to the other extreme and say that you should never write comments. stackoverflow.blog/2021/12/23/best-practices-for-writing-code-comments/
Great content again Jakob! Looks like you're making the most beloved videos on RUclips with lots of thumbs up and zero thumbs down! One question. Any particular reason why you use the IF ELSE for you IsEventBufferFull? Why not do IsEventBufferFull := (CurrentEventBufferIndex + 1) > MAXIMUM_SIZE_OF_EVENT_BUFFER?
Thanks! I just wanted it to be beginner friendly, but yes it could be done your way.
@@JakobSagatowski I'm not sure if it is more beginner friendly. It might be. But regardless of this. You are putting a lot of effort to show best practices. For example with the comments and moving things into method. So I thought it might be good to show the short version of this. It might be my perfectionism, but I see the verbose version so often. When it also shows up in teaching material, then people never see the correct version. Maybe I should just write about it on my blog :p.
Just a very minor point where it could be improved imo :). Stellar tutorials overall!
@Roald Ruiter. Sorry what I meant with beginner friendly was that I wanted the part of this tutorial to show new syntax, in this case ELSE. From a pure readiness perspective, then your suggestion is much more clear (and would normally be what I would use), but I just wanted to showcase the syntax ELSE as well (which ironically won't be discussed until part 7, that is a later part).
Thanks!
Thanks for the generous donation Randall!