Hi all, i am currently writing a PLC program from scratch for an existing packaging machine. There is an S5 PLC installed but soon we are going to upgrade to an S7-300 PLC. Meanwhile i thought i would have a go at the code myself.
I have split the machine down into groups of functions and jotted down flowcharts for each step so i know exactly what the machine needs to have in place at each step etc.
To do the code using nothing but N/O & N/C contacts and coils would get very messy so ive created an FC for each function of the machine and used local variables to do all the internal checking, then each FC is called from a main program cycle FC using an "Empty Box" so that it keeps everything neat and tidy for interfacing all the real I/O.
My main query is with all the steps etc, what would the normal approach be to programming this?? i have started using a SHL_W shift register which will work fine. The other option i thought of was just moving a value to an Integer after each step is complete and then using this to start the next step.
Any other ideas??
I have split the machine down into groups of functions and jotted down flowcharts for each step so i know exactly what the machine needs to have in place at each step etc.
To do the code using nothing but N/O & N/C contacts and coils would get very messy so ive created an FC for each function of the machine and used local variables to do all the internal checking, then each FC is called from a main program cycle FC using an "Empty Box" so that it keeps everything neat and tidy for interfacing all the real I/O.
My main query is with all the steps etc, what would the normal approach be to programming this?? i have started using a SHL_W shift register which will work fine. The other option i thought of was just moving a value to an Integer after each step is complete and then using this to start the next step.
Any other ideas??