Hi all.
I know the answer to the title is probably that there is no definitive "right" way to program. But there probably is many definite "wrong" ways to program.
Anyway, I have been experimenting with PLC's at work for a while now and can usually get a plc to do what I wish with a bit of trial and error along the way: Try something, see if it works, if it doesn't, work out why, alter this, tweak that, learn from it, try again, and so the cycle repeats. I always suspected / knew, there was a much more organised way to doing this, and have recently been avidly reading through Hugh Jack's book as recomended by most people on here. What a great book - and for free! The section on state based programming particularly sparked my interest and made a lot of sense. Very straight forward structured way of converting logical process into states and transitions between states. The difficult part is realising what each state actually is.
I tried applying this to a couple of (hypothetical) real world projects and found it's a little bit trickier than the examples in the book.
I was hoping that somebody may have a look at my attached example for a three conveyor sequenced start and stop system and give me some feedback on it. I am sure it has many flaws, but would like the input from you guys that know much more than me, as I will hopefully learn something from the exercise.
I hope all that made sense, and thanks in advance.
I know the answer to the title is probably that there is no definitive "right" way to program. But there probably is many definite "wrong" ways to program.
Anyway, I have been experimenting with PLC's at work for a while now and can usually get a plc to do what I wish with a bit of trial and error along the way: Try something, see if it works, if it doesn't, work out why, alter this, tweak that, learn from it, try again, and so the cycle repeats. I always suspected / knew, there was a much more organised way to doing this, and have recently been avidly reading through Hugh Jack's book as recomended by most people on here. What a great book - and for free! The section on state based programming particularly sparked my interest and made a lot of sense. Very straight forward structured way of converting logical process into states and transitions between states. The difficult part is realising what each state actually is.
I tried applying this to a couple of (hypothetical) real world projects and found it's a little bit trickier than the examples in the book.
I was hoping that somebody may have a look at my attached example for a three conveyor sequenced start and stop system and give me some feedback on it. I am sure it has many flaws, but would like the input from you guys that know much more than me, as I will hopefully learn something from the exercise.
I hope all that made sense, and thanks in advance.