What can i do to get better at coding controls logics?

Jrivers010

Member
Join Date
Aug 2017
Location
Washington
Posts
20
Long story short, I am a 2016 graduate in chemical engineering. having a hard time finding a job so i decided to learn PLC programming.

I went to udemy and finished PLC 1 by Paul Lynn.

because of that course, I know the basics of PLC, such as what each command does, how to somewhat read code, etc.

However, after i finished that, I am taking PLC 2 by Paul Lynn. its a course where it uses what you learned in PLC 1 to complete projects prepared by the instructor. However, I am having a VERY hard time even doing the 1st problem. (after couple hours of attempt, I was only able to clear 3 out of 5 test criteria and gave up and went ahead to look at instructors solution. Which was ALOT more cleaner than mine...)

I understand what the project statement is asking, but I cant code that into logic. and I dont even know where to look to get an idea of what to do.

How can i get better at this? I am seeing the disadvantages of Online courses through this.

Sure, normally, the answer would be "do more problems." But I am sitting here looking at this problem given and have no idea where to even start after setting up my JSR in main and IO in its own program files. really fighting the urge to look ahead at solutions.
 
Last edited:
You have to break the task down into small parts.
And before you even start programming, you have to write down the sequence (as you understand it)
Write it in your own words and style so you understand each step.

ie: the grab must be above the pick-up area before it can go down
check 'in correct position proxy' input is on

-|X0|----grab can go down.

Then program each step as a mini program that leads on to another mini program

It's a start
 
What Ronnie said is really good advice. Programming large projects is really like eating an elephant, you do it one bite at a time. Break pieces down to simple individual components and then add complexity to it as you go. The way I tend to program is start with the output since an output can only be used one time in a program. I then setup the manual functions and then add all the other pieces such as all the faults that make it stop, etc.

However, the most important part is to draw a road map and have a plan of how you think the code should look/work before you start programming. If not, you will end up with either lots of rewrite or horrible spaghetti code.
 
Ronnie and Helliana have already said a lot.
I would only like to add a link to wikipedia finite state machine and to suggest to read the turnstile example.

I'm still a begineer but I share my three golden "rules":
1. use pulses as less as possible
2. use memories as less as possible
3. use finite state machines if possible
 
Thank you for your advice. Quick Question however.

When working on programming, is it possible that a logic in a lower rung will cause a previously correct (before the later logic was added) rung before it to fault?

on this project online course from Udemy, there are "test criterias" once you think u finished the assignment, to make sure it works as it was asked. the first run would often make the 1-3 of the criteria work, but fail on the rest. So i would go back and add more logic lower down in the rung. but I be cautious and think hard because I am afraid that adding a new logic to solve the next test criteria would make the ones that passed the previous criteria to fault.
 
Humm.. we probably went to the same school and program since you are in WA.

Here are some advice I would have given myself. I graduated into a recession and had tough time finding "real job". However, this is a good market right now so your post is bit alarming.

- I will be of the only one here advising you not to spent too much effort learning PLC. PLC is a tool, not a career. You should know the basic theory of control-system from your control class. As good as some of the onlline courses are, PLC isn't one of those topic that can be easily learned by going through courses without real project to work on.

- Be willing to relocate, especially for Chem E, there aren't a lot of opportunity on the West Coast.

- You are more than qualified for a most job that lists as Mech E.

- Be willing to work ANY jobs. There are opportunity for just about any job.

- There are a lot more software programming jobs available. Rather than PLC programming, I would rather invest time in learning one of the hot language right now.

- Get your foot in the door, again, be willing to take a technician job with local county, etc..

PM me if you like. I can review your resume and give you more detailed advice.
 
PLC is a tool, not a career.

Maybe not so much on the west coast, lots of software design demand out there... But here in the rust belt, the demand for PLC programmers is alive and kicking. As a contractor working with a distributor, you can easily work 40 hours a week making over $100/hour.

Obviously, it helps to know HMI programming and data collection/distribution as well, but the PLC programming will usually get you in the door.
 
The best PLC programmers:
>Can see the end result in their mind
>Havve good logic abilities
>Are well versed in mechanical design
>Understand hydraulics & pneumatics
>Are willing to work long hours
>Understands basic math, algebra & geometry
Last, not least.
>Are willing to fix others problems with liittle to no complaining.
>Are "thick-skinned" as all problems are blamed on "the code".

Work on any of these that you may need.
 
Last edited:
Well not sure if I can add anything to what Russ just said, for my self I worked 10 years with mechanical engineering before getting into programming.

I have never taken any course, got my hands on a used SLC_505 and some logix software and spend every hour I was awake beating on this thing :)

Today I earn my living solving control task :)

My best advice is to simplify the small task, before adding them all up in a complicated solution, getting you own PLC is a must, simulation will only take you halv way.

Good luck
 
Get a PLC so you get hands on practice, Automation Direct has some cheap PLC's or you can find other used PLC's online (Ebay etc) too.
 
it is possible for rungs after to affect the rungs above if you have a race condition or if you are using the same addresses in the logic above or duplicate coil, the best thing to do is grab the hardware and start playing with it, this is something you get better at by experience, if you can't afford the software use plc software with a built in simulator to get your feet wet 2 that i know do are the brx series and the ezlogix these are free.
 
Codesys from 3S Software is free and comes with simulator so you can run code without hardware. It has ladder, fbd, sfc, cfc and structured text. Not sure how much it is being used in your area.
 
So far, all good advice in my opinion (take that pc forums!).

Been doing it since 1997. 1996 if you count modifying a program as an electrical maint. tech thinking i could program.
1997 I went to a company that wrote plc programs for Good Year and Firestone.

I lucked out. They were the best mentors. What is that, 20 years? Probably haven't run into better mentors since.

KISS principle. Many have mentioned keep it simple by breaking it into its smaller parts.
Many benefits to this. One comes to mind: If something has to get changed, it is less likely to affect your small section of code that just checks to see if the part is there for example. Oh, the conveyor twice as long now, i don't care, not my job.

mentor mentor mentor

easiest way to learn a new platform: do a project for work vs i'll teach myself at home on my time off.

read all the manuals.

keep coming here.
 
and never never ever assume something that you haven't done before to be simple! ever!

even a simple gate arm that goes up and down to let cars in can keep you up nights.
 

Similar Topics

I am making massive headway into the PLC replacement i have mentioned in various threads, its all running and even the AB stepper drive was easy...
Replies
18
Views
8,505
Good Afternoon , It seems like we always have problems with using Type J Thermocouples with our slip rings . Would using a RTD at 10...
Replies
6
Views
1,622
I am beginner in B&R Automation Studio and TIA Portal. Have an experience in electrical part of PLC cabinets. Now its time to get a new skills...
Replies
8
Views
1,632
Bla Bla Bla, why doesn't it work, l need help and l don't understand PLC's. Or better they understand everything, but can't understand +1 -1 = 6...
Replies
22
Views
5,959
I rarely need to add a network card to the drives we install... very rarely. But my sales-guy said he needs to quote a network-connected ACH580...
Replies
6
Views
2,555
Back
Top Bottom