LSS (Customer) asked a question.

How to Make a One Shot (ONS) in the click plc

Build the ladder logic program to turn ON or OFF the motor using single push buttons using one shot rising (ONR) instruction.


  • RBPLC (Customer)

    You don't need a rising edge instruction to accomplish this, you just need a latching circuit.

  • Todd Dice (Customer)

    My method is old school, but how I do it. Garry likely has a more elegant way to do it.

     

    Screenshot 2021-05-26 103440

      • Todd Dice (Customer)

        Shoot! I was hoping you'd supply something clever! 😎

         

        But, you're right, the only thing that matters is, does it work?

      • Mike@Forshock (Customer)

        Your example is great help for many, I would suggest using an internal coil/bit vs direct IO (Y/X) and utilize the MAPIO (or COPY) at the bottom/top of the scan/program.

         

        Should field connections change or just want a more modular code base it would not require a full code audit. Eg. Find/Replace every Y0, etc.

      • Garry (Customer)

        Good point Mike@Forshock.

        I have seen this done many times. This is usually done on some AB models that have asynchronous PLC scans. It will allow the status of the I/O not to change during the scan of the controller.

        Regards,

        Garry

         

         

        Expand Post
      • Todd Dice (Customer)

        I agree. I coded that way in RSLogix500; LAD 3 subroutine dedicated to inputs and outputs in the last subroutine. Then I got the one customer who had in their specs that this was not allowed.😠

    • LSS (Customer)

      Thank Todd & Garry :) :):)

       

  • dcharv (Customer)

    Generally I prefer not to use SET and RST instructions. I like OUT much better. Here 's how to do it without SET & RST

     

    single button ON-OFF