Sign in to follow this  
Followers 0
quarter20

Project program approach suggestions?

8 posts in this topic

Hello everyone! I am not necessarily new to plc's but simply haven't had as much exposure to programming as I would like to have had over the years. I have a project that requires me to cycle three facility air compressors individually so that each one will aquire equal run time (approx) annually. Some requirements are: The start of the next one must overlap for a few minutes before the previous one shuts down, to avoid any loss of air pressure. Also, the system must run all three at once, upon power up, for a short period when the plant is first start up. The run times in this area are not critical either. I have a C200hs Omron PLC and I am using Cx Programmer to write the logic. So far I am using the one minute clock pulse to count down 5 or 6 hours between compressors and using timers to reset them. Does anyone think there is a way to use a shift register SFT to accomplish the same thing easier or? I am open to any suggestions as long as they're not vulgar. Lol. Thanks for any help!

Share this post


Link to post
Share on other sites
I think your approach is the easiest and I would probably do this myself for a simple task like this. With the latest models I would probably take a different approach. Shift registers are fine but they have to be set up and debugged. Like the KISS principle! Be a bit careful - they are now dinosaurs and are no longer supported by Omron. PCB components are no longer available. Plan for the longer term - the CS1 processor, power supply and rack will replace them directly - existing I/O cards are OK in the CS1 too. CX-P makes a pretty good job of converting the program for you too - depending on what is used in your program you may have to shift some stuff around. The biggest issue is the C200H analogue cards had scaling built in - the new ones do not so program scaling would be required. I am not sure if the old cards in the new rack with the new processor would continue to performk the scaling function, if implemented originally, or not.

Share this post


Link to post
Share on other sites
Bob is talking about the C200HS PLC system here. ie new parts are hard to come by (although I have some second hand ones lying around...) regards the programming you can use a SFT function, very flexible or you could simply increment a data register ( 1, 2, 3) and compare the value to see who is the duty one... or just use ladder logic...

Share this post


Link to post
Share on other sites
I understand that the sft has an index and a pulse going to it. When you say increment, which provides the incrementing input? The index or the pulse line? I haven't set one up before and that is sort of the reason i want to try this approach- so I can cut my teeth on it and identify some ways to apply it. Would you use the clock pulse to increment the sft or would you incorporate a counter or timer into the mix? Thank you for your responses, I value your insights here. Have a great day!

Share this post


Link to post
Share on other sites
The problem I see with a shift register is that they are not very convenient for anything that isn't an even multiple of 8 or 16. It might be easier just to write individual ladder logic. You will also have to deal with the conditions where one unit is offline that will require ladder logic. One method you could use to equalize runtime is to change the operating time of the lead compressor. For example you might run the compressor with the least hours as lead for six hours, the middle one for as lead 5 hours and the on with the most hours as lead for four hours. Of course you would need to have the run time stored in the PLC. I have used this trick with pumps to equalize runtime and it works very well.

Share this post


Link to post
Share on other sites
by increment I mean an entirely diff instruction... ie @INC (the @ means to do only on the positive edge) for example - using D100 as the duty select word so on power up to PLC, use a First scan bit to initialise the D100 to #0 (ie LD P_FirstScan MOV #0000 DM100) then write your logic to notice the first power up cycle for all three compressors... (I am assuming that the compressors cycle them selves (on off) or do they run continuously ?) hold the startup lockout until you are happy with pressure (do they drop out automatically ? if so look at the running feed back of the compressors and when all three off then dropout start up lock out condition) now since #000 is in D100, CMP D100 #0000 if true then Comp 1 is the duty CMP D100 #0001 if true then Comp 2 is the duty CMP D100 #0002 if true then Comp 3 is the duty when duty compressor stops (use a DIFD here) or after a set time period use a DIFU, then INC D100 ( ie D100 = D100 + 1) make sure to CMP D100 #0004 if true then reset D100 with MOV #0000 D100 to start again... NOW the trick is... ask you self what to do if a compressor is unavailable..... you need to figure out the logic how to handle this....

Share this post


Link to post
Share on other sites
Thanks for the replies on this topic.I haven't responded lately because I got pulled away to do another project. I work in at injection molding / assembly manufacturing facility and priorities are constantly changing. I like sleepy wombats approach on the project. It reminds me that I will have to spend a significant amount of time designing the program to address every possible scenario that i can think of. The compressors can be called up and shut down within a few minutes by wiring to specific inputs in their controls. I am trying to consider what to do if one of them goes down for any reason, such as a motor overload tripping, etc. I was really looking for a simple approach to just cycling the compressors systematically every 6-8 hours so that they will aquire even run time and maintenance/repairs can be scheduled conveniently. Power outages are frequent during thunderstorms in our area- so that is another consideration I will need to write into the program. What to do when there is a cold start up condition is another consideration. Maybe there is a way to subroutine a two compressor option if one of the others goes down or needs repairs using a selector switch in the panel (i.e. select an offline compressor input)? Thanks for your input and feedback it is valued very much! Have a great day. I will let you know what I come up with and see what you think.

Share this post


Link to post
Share on other sites
There are many different program approaches to what you want to achieve, however you are on the right path of now questioning all the alarms, what if scenarios that might affect the operation of the program. This is good project design, and unfortunately, one that a lot of so called system designers miss. They prefer to react to write code rather than be proactive, and they end up with spaghetti code. Good program design results in a robust and reliable system, albeit you generally have to tweak your code a little when commissioning. Sounds like you might have the knack... (google it - Dilbert - The Knack The Curse of the Engineer)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0