Learning how to program a PLC

Can anyone give me tips in how can I fast track my learnings in working with or programming PLCs. Is there any free simulation tool or software that I can work with, like If I want to control a control valve using a PLC can I do it in the simulation software? Thanks in advance.
 
try scilab...
there is some serial comms in it ....not ofay with that part of the package
There are some hydraulic/ pneumatic tools in there.
The child package is xcos
Also most of the major plc packages come with a sim package
Lastly...welcome to the world of PLC's...enjoy
 
Can anyone give me tips in how can I fast track my learnings in working with or programming PLCs. Is there any free simulation tool or software that I can work with, like If I want to control a control valve using a PLC can I do it in the simulation software? Thanks in advance.
Have a look on the real pars thema ( you tube site) for PLC traininng , they got goodf videos support for basic learning


James
 
What is most important, is that you know beforehand -what- you need to program. So don't start programming before you know almost 100% certain what you need to make.
So first make a functional specification of what the PLC program is going to do, with what sensors and actuators.
This is a specification that can be understood by the customer with another background (i.e. mechanical), otherwise they didn't hire you and did the PLC job themselves.
When that is ok and you (and the customer, in this case also you, haha) agree upon the functional specification, start translating that into a technical specification, for example a flowchart.

This flowchart of how the machine works (often called an SFC or a state machine) has many states in which the machine can position itself.
It moves between the states with changing conditions of the analog or digital input states.
In every state it drives the analog or digital outputs in a certain way.
So you only have states (that drive the outputs) and transitions (triggered by the inputs).

The machine can only move between states, but there can be asynchronous emergency states:
- emergency stop pushed, then it moves immediately to the emergency stop state (often with all outputs disabled=off)
- alarm condition state (temperature too high)
Such states I often call asynchronous states, since normally, the states run in a synchronous way from 1 state to the other.

When you -think- you're finished, scrutinize this state machine and think of possible problems that can occur and are yet not in this state machine/SFC.

And here's a -very- nice one to think about:
The machine powers up and starts, goes to the start state, and then what?
It doesn't know in which state it is at that moment.
Then you need to think for the next state transition and see what the inputs are so it can go to the next state.

Now there are situations where you don't see any input at all, then you must activate the machine in such a way that you start searching for a state. Like: moving the machine in a certain direction to see if it hits a certain position sensor (digital input).
Then you know in which state you are and go on from there.
But there is a possibility that somebody moved the machine by hand beyond its sensor, so you can only do this searching movement for a certain amount of time (to prevent crashing into something).

When that is all ok, call the customer (in this case you). And discuss the SFC/state machine, tell the mechanical guy of all the things you thought about.
Often he will be astonished, since he gave you a flowchart of only 5 steps, but that was only when the machine was running ok.
Often this is not the case (with broken sensors/actuators etc.)
So your state machine contains already for example 27 states, since you also thought of possible problems.

So you start discussing (and now the mechnical guy is -really- thinking about his machine) and he still finds a few more possible problems that can occur.
Also put those in the SFC/state machine.
So at the end, you both agree on the state machine of 32 states.

Don't forget to define the state of the outputs for each state.

Ok, this was the programming part and you are more or less ready, this was the difficult part.

Now you can take any PLC that supports SFC programming and just feed it in. You can also let a less experiened junior programmer do it for you, since it is 100% clear what must be done.

Then test it, add a few extra states to the SFC you didn't think about (often timeout problems, it takes a while before the input is active, jittering signals etc.)

You can also implement an SFC in ladder logic.
Define a variable as the state number. And change this number with changes of the inputs (state transitions).
Define the outputs depending on certain state numbers.
And move the right state number into the variable when an alarm or emergency occurs.

Is this somewhat clear to you?
With programming the difficult part is the functional specification and technical design of the SFC: the designing and thinking.
The rest is easy: just build it.
 
Top