OK,
Here we go, now the ribbing can start!
First, a huge thanks to BobB for the help so far, it has been great, and I appreciate it, thanks also to those who have already helped on this thread, again the help is appreciated.
So here we go with the essay, sorry, but I’m addled.
Never programmed Omron before.
Done, “some” S5, “some” S7 & “some” AB, 99.9% mods of other peoples code, plus some on the CUPROC controls below.
Spent most of my life doing commissioning & field service, primarily on machine tools, for a machine builder, Landis Lund, small regional UK 3rd party repair company, a controls system manufacturer, Indramat, and the last few years on my own, doing anything that pays, and sometimes doesn’t, mechanical, electrical, software, & electronics, repairs & small mods!
So not much PLC writing from scratch, bar large mods on the old Landis CUPROC 16 & 3200 systems which were done in reverse Polish notation & written in text files, along with BASIC code for the main programme.
We never did PLC programs @ Indramat as they were done by the machine builder, we were just taught to programme so we could follow the existing code, it was not our code to mod as it were.
As I have said above, I have no one else to discuss this with.
I’ve got a method in my head & I am going round in circles, I can’t think of another way to do it anymore.
I have a “simple”, mod to do to a machine, it is a one off machine & the builder is no more.
No electrical drawings & no info on the PLC code.
I have done a download of the PLC, manually traced the I/O & commented up the original programme & studied until I understand it, I think!
We are disabling the existing feeder on the machine, but leaving it there to be switched back to if needed.
A new feeder is being fitted, again which can be disabled and the machine reverted back to the old unit as above.
I have sussed out the code for the disabling of the old, and the enabling of the new, OK I believe.
I have only one switch on the whole new feeder thing, it is 2 air cylinders with spring return valves, so when powered off the valves revert to a set position which reverts the cylinders to a pre-defined position, which is the start cycle state.
The switch is on the existing output conveyor and detects the indent for the part to be loaded into.
So I am using this to keep the feeder in sequence. I hope.
This switch will also stop the conveyor once started.
I have sussed out the code to swap the conveyor control from the “old feeder” to the “new feeder”.
The motions of the air cylinders and the triggering of the conveyor start all has to be done off timers, I am a little worried about timing drift, so I have used high speed timers (TIMHH) I hope this will keep the timing as tight as possible, we are looking for say 30 parts per minute from this, so a tac time for the feeder & conveyor of 2 seconds
I got a state machine into my head, now I can’t think down any other road.
Did my state diagrams, flow charts etc. got my state transition conditions, and the state outputs.
Have programmed the outputs OK.
Have got the conditions for the transitions OK.
Have programmed the timers to create dwells for the air cylinders to move OK.
As I have said above, I believe I have the conveyor control sussed.
Also the feeder selection sussed.
I just can’t get my “state machine” to go from state to state!!!
I’ve never done this before either!
I have had two goes at logic, for you to laugh at.
They are pdf’d and I hope attached to this post as V1 & V2, neither work when simulated.
I know the CPM2A does not have a simulation option, but, I have changed the processor type for one that uses a very similar memory map so I can simulate it, or at least that is what it seems to have done anyway!
My code is unstable, and doesn’t change states correctly, doesn’t start the timers when needed, just loads of errors, I just can’t think any more, my brain is addled.
I have also attached pdf of my state transition requirements, I know that this will not run as logic, well it would not & I would not have expected it to, I have done this so I could get my head around what was needed, & included it so that my thought process can be seen & what I see as the requirements of the transitions between states.
Sorry for the essay, & thanks for reading if you have got this far.
Next thing, HELP, PLEASE!!!
Thanks,