Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all,
Vanilla are planning an update to the site on April 24th (next Wednesday). It is a major PHP8 update which is expected to boost performance across the site. The site will be down from 7pm and it is expected to take about an hour to complete. We appreciate your patience during the update.
Thanks all.

Programming for electrical engineering

  • 27-03-2020 2:20pm
    #1
    Moderators, Regional Abroad Moderators Posts: 5,374 Mod ✭✭✭✭


    I am currently a second year student in a level 8 electrical/electronic engineering degree. I am having difficulties with learning or even liking the C programming part of the course. I have no problems with most other parts of the course as I was an electrician before starting the course and previously studied electronics after leaving school.
    How important is for an electrical engineer to be a able to program?


Comments

  • Registered Users Posts: 3,863 ✭✭✭mikhail


    It's very helpful during your studies at least, and if you don't take a shine to it, it'll limit career choices afterwards. That said, there are plenty of roles EEs do that don't require any programming.

    I struggled with programming initially, and then one day it just clicked for me. Stick with it. It'll come right.


  • Moderators, Regional Abroad Moderators Posts: 5,374 Mod ✭✭✭✭aido79


    mikhail wrote: »
    It's very helpful during your studies at least, and if you don't take a shine to it, it'll limit career choices afterwards. That said, there are plenty of roles EEs do that don't require any programming.

    I struggled with programming initially, and then one day it just clicked for me. Stick with it. It'll come right.

    Thanks. It's good to know it's not the be all and end all. I have no problem so far in reading code and understanding what is happening but writing anything from scratch is what I find hard. What I am struggling most with at the moment is the software we are using(sourceboost).
    I hope it will all click with me at some stage.


  • Registered Users Posts: 8,406 ✭✭✭RedXIV


    aido79 wrote: »
    Thanks. It's good to know it's not the be all and end all. I have no problem so far in reading code and understanding what is happening but writing anything from scratch is what I find hard. What I am struggling most with at the moment is the software we are using(sourceboost).
    I hope it will all click with me at some stage.

    If you understand it and can read it then you're not in too bad shape. At this point then, its more about just practice to get comfortable writing it. Honestly. If you write a piece of code every day, even a few lines, you'll be surprised how quick it comes together, especially if you start from scratch each time.


  • Closed Accounts Posts: 3,292 ✭✭✭TheBoyConor


    Depends on the job you go into afterwards whether it is relevant.

    If you are doing any sort of research or component design and modelling then yeah it would be good to have, maybe even essential.

    On the other hand if you go into scheme design or contracting it would probably of little if any relevance at all.


  • Moderators, Regional Abroad Moderators Posts: 5,374 Mod ✭✭✭✭aido79


    Depends on the job you go into afterwards whether it is relevant.

    If you are doing any sort of research or component design and modelling then yeah it would be good to have, maybe even essential.

    On the other hand if you go into scheme design or contracting it would probably of little if any relevance at all.


    My plan is to try to get into controls/industrial automation. Can't see myself looking for roles in research or component design to be honest.


  • Advertisement
  • Moderators, Regional Abroad Moderators Posts: 5,374 Mod ✭✭✭✭aido79


    RedXIV wrote: »
    If you understand it and can read it then you're not in too bad shape. At this point then, its more about just practice to get comfortable writing it. Honestly. If you write a piece of code every day, even a few lines, you'll be surprised how quick it comes together, especially if you start from scratch each time.

    That's good to know. I'll keep working on it.


  • Closed Accounts Posts: 3,292 ✭✭✭TheBoyConor


    aido79 wrote: »
    My plan is to try to get into controls/industrial automation. Can't see myself looking for roles in research or component design to be honest.

    In that case I'd say programming skills would be very desirable.


  • Moderators, Regional Abroad Moderators Posts: 5,374 Mod ✭✭✭✭aido79


    In that case I'd say programming skills would be very desirable.

    I would have thought plc programming would be more useful than c though or are they both desirable?


  • Closed Accounts Posts: 992 ✭✭✭Bikerman2019


    We have done PLC programming, c, Java, Embedded and now are learning Verilog. It all comes together in the end.


  • Closed Accounts Posts: 3,292 ✭✭✭TheBoyConor


    aido79 wrote: »
    I would have thought plc programming would be more useful than c though or are they both desirable?

    I wouldn't know. Im a civil engineer. Roads and commodes.


  • Advertisement
  • Registered Users Posts: 21,517 ✭✭✭✭Tell me how


    aido79 wrote: »
    I would have thought plc programming would be more useful than c though or are they both desirable?

    Both desirable. The amount of systems which are just pure PLC (Ladder Logic) are less and less even I would say.


  • Registered Users Posts: 3,863 ✭✭✭mikhail


    aido79 wrote: »
    I would have thought plc programming would be more useful than c though or are they both desirable?
    Language specific skills are nice on a CV, but once you get the hang of two languages, learning a new one is handy enough.


  • Moderators, Regional Abroad Moderators Posts: 5,374 Mod ✭✭✭✭aido79


    We have done PLC programming, c, Java, Embedded and now are learning Verilog. It all comes together in the end.

    I have done a bit of plc programming as part of another course and during my apprenticeship and hoping to get some more experience with it. We're doing c as part of embedded and also vhdl. I can see how it's all useful. I'm just wondering about the importance of being able use c programming.
    The course has been more electronics this year. Next year is more electrical and the 4th year is a combination of both.
    Is your course purely electrical or electrical/electronic?


  • Registered Users Posts: 5,366 ✭✭✭DublinDilbert


    aido79 wrote: »
    I would have thought plc programming would be more useful than c though or are they both desirable?

    Even if your working with plcs, knowing a bit of c code can be very handy when you come across a problem.

    For example I was working on a project which had a very high spec encoder feeding into a control system. There was issues with the value being read in by the controller, the mech team blamed the controls guys and vice versa. After a couple of days I programmed up an Arduino to generate the pluses the same as the encoder, two nice for loops to count up to 10000 and down 0. It was less than 30mins work. I then connected the ttl outputs to the control system, and it was reading the position spot on. There was a mechanical problem with the encoder.

    The Arduino uses a variant of C, maybe register for tinkerCad and do some exercises there, flash some leds, read switches, will definitely help with C.

    I find many people struggle with C programming due to not fully getting what functions are, so I always make sure people fully understand functions.


  • Registered Users Posts: 743 ✭✭✭KeithTS


    I would urge you to stick with the coding based things.
    Every day it's becoming more and more important. I'm sure you'll get jobs without it but you'll have more options if you stick with it.

    I'm assuming if you're using sourceboost then you're doing something with PICs?

    It sounds like there are two things at play here, getting up and running with sourceboost and getting up to scracth with C.
    Try separating out the two problems, try a different IDE to practice C with. Once you get more comfortable with the language you can go back to sourceboost if it's a specific requirement for the course.

    I would suggest CodeBlocks to start with, it's free to use and very simple to set up a simple windows application, it may help you focus on writing bits of code rather than being frustrated by the IDE. There are also a lot more tutorials and things available with CodeBlocks which may help.

    Once you get more comfortable with writing the code or you need to flash a PIC (if you're even doing that) then you can switch back to sourceboost.

    If you're able to read and understand the code, you're more than able to write it, it's just practice that's needed by the sounds of it.


  • Moderators, Regional Abroad Moderators Posts: 5,374 Mod ✭✭✭✭aido79


    Even if your working with plcs, knowing a bit of c code can be very handy when you come across a problem.

    For example I was working on a project which had a very high spec encoder feeding into a control system. There was issues with the value being read in by the controller, the mech team blamed the controls guys and vice versa. After a couple of days I programmed up an Arduino to generate the pluses the same as the encoder, two nice for loops to count up to 10000 and down 0. It was less than 30mins work. I then connected the ttl outputs to the control system, and it was reading the position spot on. There was a mechanical problem with the encoder.

    The Arduino uses a variant of C, maybe register for tinkerCad and do some exercises there, flash some leds, read switches, will definitely help with C.

    I find many people struggle with C programming due to not fully getting what functions are, so I always make sure people fully understand functions.

    Well done on coming up with the fix and getting one over on the mechanical guys! It's good to hear of C being used for practical uses like that. I have a couple of Ardunios and some kits that I play around with so even better to hear of people using Arduinos in the field. I find the Arduino stuff easy to work with so I'll continue to play around with it and have a look at tinkerCad.

    Thanks


  • Moderators, Regional Abroad Moderators Posts: 5,374 Mod ✭✭✭✭aido79


    KeithTS wrote: »
    I would urge you to stick with the coding based things.
    Every day it's becoming more and more important. I'm sure you'll get jobs without it but you'll have more options if you stick with it.

    I'm assuming if you're using sourceboost then you're doing something with PICs?

    It sounds like there are two things at play here, getting up and running with sourceboost and getting up to scracth with C.
    Try separating out the two problems, try a different IDE to practice C with. Once you get more comfortable with the language you can go back to sourceboost if it's a specific requirement for the course.

    I would suggest CodeBlocks to start with, it's free to use and very simple to set up a simple windows application, it may help you focus on writing bits of code rather than being frustrated by the IDE. There are also a lot more tutorials and things available with CodeBlocks which may help.

    Once you get more comfortable with writing the code or you need to flash a PIC (if you're even doing that) then you can switch back to sourceboost.

    If you're able to read and understand the code, you're more than able to write it, it's just practice that's needed by the sounds of it.

    You've actually hit the nail on the head there to be honest. I have a lot more trouble figuring out the Sourceboost software than the actual C code itself. Unfortunately for now as we are dealing with PICs, as you correctly guessed, I am stuck using Sourceboost as it is the preferred software. However as the semester is effectively over due to coronavirus I will put it on the long finger for now.
    I'll have a look at Codeblocks. Hopefully their IDE is less confusing. I have used the Arduino IDE a bit and find it easy to use so it may be the same with Codeblocks.


  • Registered Users Posts: 1,621 ✭✭✭Turbulent Bill


    Just like a spoken language, you need to practice to improve at it. From the sounds of it you've a good handle on what the code is doing, which is the main bit.

    The Arduino suggestion is perfect, especially for someone interested in embedded.


  • Moderators, Regional Abroad Moderators Posts: 5,374 Mod ✭✭✭✭aido79


    Just like a spoken language, you need to practice to improve at it. From the sounds of it you've a good handle on what the code is doing, which is the main bit.

    The Arduino suggestion is perfect, especially for someone interested in embedded.

    Thanks. I've signed up to a udemy course on C but haven't had time to get around to starting it. I'm hoping it will help.

    I've been playing around with Arduino for a couple of years on and off as a hobby but I wouldn't say I have an interest in embedded. It's part of the course so need to learn about but I am electrician so would be going for jobs that are more electrically based once I'm finished. However I understand it may be useful to know some embedded knowledge.


Advertisement