Hello all,
I'm new to the Click PLCs and to be completely honest I haven't had much practical experience with any PLC's since college. That being said I recently started a new job that we use Click PLC's exclusively and I'm trying to help clean up some of our 'Common Code'.
We use the PLC to control air solenoids for clamps. On any given product we will have 2-6 clamps and sometimes even 8 clamps that could be used. We have a program that releases all clamps at the same time but inside the logic we basically have the same code copied several times over depending on how many valves we use on the job.
I'm wondering if there is a way to write one set of "generic" code that could be automatically configured inside the PLC. That way instead of having 30 lines of code for 6 valves we could use one set of 5 lines that repeats and changes outputs 6 times.
Like I said its been awhile since I've really programmed PLCs so I'm not even sure this is possible but any ideas/suggestions/comments would be awesome.
Thank you for reading!
D
I'm new to the Click PLCs and to be completely honest I haven't had much practical experience with any PLC's since college. That being said I recently started a new job that we use Click PLC's exclusively and I'm trying to help clean up some of our 'Common Code'.
We use the PLC to control air solenoids for clamps. On any given product we will have 2-6 clamps and sometimes even 8 clamps that could be used. We have a program that releases all clamps at the same time but inside the logic we basically have the same code copied several times over depending on how many valves we use on the job.
I'm wondering if there is a way to write one set of "generic" code that could be automatically configured inside the PLC. That way instead of having 30 lines of code for 6 valves we could use one set of 5 lines that repeats and changes outputs 6 times.
Like I said its been awhile since I've really programmed PLCs so I'm not even sure this is possible but any ideas/suggestions/comments would be awesome.
Thank you for reading!
D
Comment