Announcement

Collapse
No announcement yet.

Air cannon project

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts


  • Air cannon project

    Hey folks,
    New guy here. New to PLC programming, or programming in general. I've been tasked with designing and automated air cannon for a buddy of mine, and thought a PLC would be the perfect way to control it. The gist of the project is the customer wants to push a button, have the carriage roll out and open the gun door at the same time, sound a timed blast, then retract back into place. Basically it's a huge air horn on a cannon carriage. And ridiculous.
    So, I've got the hardware figured out and ordered. I ordered a Click PLC C000DRD, with power supply, and got to work. I was able to get the automatic program written, have tested it on the bench, and it works! The issue I'm having is getting it to work manually. I have separate rungs under the automatic program for manual out, manual blast and manual retract. For some reason I cannot get these rungs to operate correctly. One thing I know I did wrong was to use different inputs to trigger single outputs. I'll be correcting that this morning. If anyone has any ideas, please let me know. Thanks!


  • #2
    The way I have it set up is using two inductive limit switches. When the PLC reads limit switch 2, this allows the auto button to activate. When activated, it engages a "set" contact to run the carriage out until it reads limit switch 1. This then engages the "reset" contact and stops the carriage, and begins a delay counter. When the counter runs out, it engages C1 which opens the air solenoid timer. When this timer runs out it activates C2 which is another delay counter. When this counter runs out it activates C3 which activates the "set" contact to retract the carriage until it reads limit switch 2 which activates the "reset" contact and stops the carriage and ends the program.

    What I'm finding is that when I activate limit switch 1 further down the rungs for the manual functions, it reads up the rungs and begins the counter sequence in the auto section of the program. Also, for some reason, even after giving the limit switches new input addresses for the manual functions, the outputs aren't working. The inputs on the PLC light up, but no joy on the outputs.

    Comment



    • #3
      Since both the auto and manual functions are sharing the same limit switches, should I write the auto function as a called for subroutine? In my mind it looks like this. Limit switch 2 is read, press buttons one and two on the remote to call for the subroutine, press button 1 to activate auto function in subroutine, use "end" to jump out of subroutine back to main program. Thoughts?

      Comment



      • #4
        This is what I have so far. Air cannon.zip

        Comment



        • #5
          It may be just for display, but the are end statements in the Main program that are above other ladder logic.
          All commands below that are ignored.

          You could put the manual and auto in different subroutines and call either one.
          Use the Return command in the subroutine to return to the Main program.

          Comment



          • #6
            Originally posted by RogerR View Post
            It may be just for display, but the are end statements in the Main program that are above other ladder logic.
            All commands below that are ignored.

            You could put the manual and auto in different subroutines and call either one.
            Use the Return command in the subroutine to return to the Main program.
            Thanks Roger. So I put the auto function in a subroutine, and ran the manual controls in the main program. The manual functions run correctly now. For some reason though, the subroutine will only run through one rung. Thoughts?
            Attached Files

            Comment



            • #7
              X2 is calling the subroutine Auto.
              Does X2 stay on?

              If not, then maybe have X2 set a C-Bit and have that C-Bit call Auto.
              Have some other logic to Reset the C-Bit when shutting off or going to manual.

              Comment



              • #8
                The challenge when using conditional subroutines is to turn off the bits when the subroutine is no longer being scanned. This is what Roger is talking about. The way I do this is to use a rung after the subroutine call with the "C" bit Roger alluded to.
                Attached Files
                Futti Utu

                Comment

                Working...
                X