Announcement

Collapse
No announcement yet.

Reset Coil Questions

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


  • Reset Coil Questions

    I have a code that controls an end effector with 3 switches and a sensor. I'm having trouble where rungs 2 and 3 will be true, but the set won't happen. Rungs 6 and 7 won't be true (C5 and X003 aren't "ON") but the reset will be "on". I've attached a PDF showing my code and a screenshot of the status monitor. This is the first real code I've written and my first forum post so apologies if I did anything wrong. Thank you in advance for the help.
    Attached Files


  • #2
    Cannot tell from posted docs, Are we in RUN MODE. PLC switch/Software ?

    Comment



    • #3
      What stands out to me, your using Y103 and Y104 output in 2 places. This will not work. Rungs 2 & 3 and rungs 8 & 9.

      Comment



      • #4
        Originally posted by kewakl View Post
        Cannot tell from posted docs, Are we in RUN MODE. PLC switch/Software ?
        Yes, the screenshot was taken in Run Mode, and I am using the CLICK programming software.

        Comment



        • #5
          Originally posted by daakers View Post
          What stands out to me, your using Y103 and Y104 output in 2 places. This will not work. Rungs 2 & 3 and rungs 8 & 9.
          Even with SET and RESET? I know that I couldn't use a normal output coil for the same output on multiple rungs, but I thought SET and RESET were different. I am mainly curious why the RESET is toggling even though not everything on the rung is true

          Comment



          • #6
            Set and Reset can have multiple instances. Take care how/when you enable them.
            I always use multiple S/R coils in sequencing.

            Comment



            • #7
              Originally posted by kurt_r View Post

              Even with SET and RESET? I know that I couldn't use a normal output coil for the same output on multiple rungs, but I thought SET and RESET were different. I am mainly curious why the RESET is toggling even though not everything on the rung is true
              Yea but you are setting Y103 & Y104 on rungs 2 & 3, and a normal output of the Y103 & Y104 on rungs 8 & 9. That will not work. Replace Y103 & Y104 on rungs 8 & 9 with a C coil and rungs 2 & 3 will work as your wanting them to.

              Comment



              • #8
                Looks like daakers has something.
                OUT instructions follow rung state.
                SET "ONLY" set when rung is true.
                RESET "ONLY" reset when rung is true.

                Comment



                • #9
                  Ok, first rung. Canít start machinery by releasing emergency stop. Letís have the sequence of operations first:
                  1. Disengage emergency stop. Machine is ready, no energy of any nature is accumulated
                  2. Engage a momentary start button. Assuming no error from master control relay ( usually doors and emergency stops), then no error due to sensor indicating wrong sequence ( like a penumatics cylinder extended while expected retracted), then you y101 relay turns on
                  3. Rungs 2 and 3 set the clamps. Donít use set instruction, use regular coil.
                  4. Then the vacuum turns on. At this moment, you have the airflow, the clamps and the vacuum.
                  5. If something triggers a sensor and a clamp sensor is made, a pass through control bit is set.
                  i apologize, this canít be followed.
                  Only one thing I can say: please beware that while a control bit being changed during scan cycle will affect any rung in which the bit appears further, the actual output can not be updated in the middle of scan time and will be updated only at the end. For this reason, if an output is set and reset any number of times, any change will affect the next rung where the ouput appears as a contact, however the actual output is only changed subsequent to the last change in the program, during scan cycle. Say you set, reset then set again: the output will be set at the end of scan cycle, however any rung between first set and first reset will be affected by the set, then any rung between reset and next set will be affected by reset, then only the rungs after second set will be affected by last set. This needs be confirmed on click plc, but I donít think usin the set/reset is good programming practice.
                  Last edited by Alexandru; 08-31-2018, 05:43 PM.

                  Comment



                  • #10
                    Originally posted by Alexandru View Post
                    but I donít think usin the set/reset is good programming practice.
                    HERESY!
                    Unless you mean Set/Reset on physical outputs.

                    Using Set/Reset: It depends on what you intend to do!

                    Maybe the project isn't ready for actual estop/safety. I usually do not program for estop/safety control in a 'Proof Of Concept' project unless that is the project!
                    That would be added after I determine that it is appropriate.

                    Comment



                    • #11
                      Originally posted by kewakl View Post

                      HERESY!
                      Unless you mean Set/Reset on physical outputs.

                      Using Set/Reset: It depends on what you intend to do!

                      Maybe the project isn't ready for actual estop/safety. I usually do not program for estop/safety control in a 'Proof Of Concept' project unless that is the project!
                      That would be added after I determine that it is appropriate.
                      Donít exactly understand what is in contention here. If you know better then by all means, weíre all listening, eager to learn. If not, maybe we should all focus to solve the issue. I already stated that I donít follow the sequence, would you kindly explain it to me? In exchange, Iíll do the program for free.

                      Comment



                      • #12
                        Originally posted by Alexandru View Post

                        Donít exactly understand what is in contention here. If you know better then by all means, weíre all listening, eager to learn. If not, maybe we should all focus to solve the issue. I already stated that I donít follow the sequence, would you kindly explain it to me? In exchange, Iíll do the program for free.
                        I may be misunderstanding your tone here, so I offer my apologies in advance, if this is the case. Maybe you didn't see or misunderstood the smiley

                        Alexandru> Donít exactly understand what is in contention here. If you know better then by all means, weíre all listening, eager to learn
                        Challenge accepted.
                        CONTENTION: Your statement that using Set and Reset is bad programming practice.
                        Alexandru> but I donít think usin(sic) the set/reset is good programming practice.
                        You did not qualify in any way what if any Set/Reset usage qualifies as bad programming practice. I did! Setting physical outputs is something that I consider as bad practice.

                        Alexandru> If not, maybe we should all focus to solve the issue.
                        Please. By all means, let's do that!
                        CONTENTION: Your opening line was to pick apart OP's estop reset or lack of. Which was not exactly the OP's stated issue.
                        OP did not ask for help in getting the ESTOP implemented. OP wanted help to understand why the specific rungs did not function as expected. Mixing SET and OUT seem to be the issue.
                        Maybe OP is connected to a mega-uber-super estop monitor/controller that handles everything and it reports to the PLC that its world is shiny and happy. I do not know.
                        I did not in any way say that proper safety/estop/estop reset methodologies was NOT required on a project. I inferred from OP's text that the ESTOP was not the issue at hand.
                        ------- kurt_r> This is the first real code I've written and my first forum post so apologies if I did anything wrong.
                        ------- I think that daakers had already made a decent observation to that end. Waiting for OP to respond.
                        ------- daakers> Yea but you are setting Y103 & Y104 on rungs 2 & 3, and a normal output of the Y103 & Y104 on rungs 8 & 9.

                        I did not make statements to the estop resetting methodology inasmuch as I did not ask OP to specify air pressure, electrical service, fusing and wire size. These items are not related to Y103 and Y104 not turning on as expected.

                        As mentioned previously, I use SetReset C-bits extensively.
                        I copied this from a post that I made months ago.
                        I have used a something similar to the excerpts below ( SetReset state machine scheme) for years. I know that it works. --- I did NOT post something that was minimally tangential to the OP's primary issue..
                        Code:
                        . 'THIS IS THE STATE MACHINE SECTION
                        . 'NO other logic in this part
                        .
                        . 'Seq_Init inhibits re-entry
                        . 'clear sequence state bits
                        . 'SET Seq_Step_01 - start of sequence/state machine/process cycle
                        .
                        .          Seq_Trig        Seq_Init                      Seq_Init
                        .------------] [-------------]/[--------------------+-------(S)
                        .                                                   |
                        .                                                   | 'whatever it takes to ensure an empty sequence
                        .                                                   +-------(R)
                        .                                                   |
                        .                                                   | CycleComplete
                        .                                                   +-------(R)
                        .                                                   |
                        .                                                   | Seq_Step_01
                        .                                                   +-------(S)
                        .
                        . 'FloodValve ON - required to advance to the next state
                        . 'SET Seq_Step_02 - advance to next state
                        . 'RESET Seq_Step_01 - clear current state
                        .
                        .        Seq_Step_01     FloodValve                   Seq_Step_02
                        .------------] [-------------] [--------------------+-------(S)
                        .                                                   |
                        .                                                   | Seq_Step_01
                        .                                                   +-------(R)
                        .
                        . 'FloodValve Time Elapsed - required to advance to the next state
                        . 'SET Seq_Step_03 - advance to next state
                        . 'RESET Seq_Step_02 - clear current state
                        .
                        .        Seq_Step_02          T1                      Seq_Step_03
                        .------------] [-------------] [--------------------+-------(S)
                        .                                                   |
                        .                                                   | Seq_Step_02
                        .                                                   +-------(R)
                        .
                        . 'condition is _whatever_ condition required to advance to the next state
                        . 'SET Seq_Step_04 - advance to next state
                        . 'RESET Seq_Step_03 - clear current state
                        .
                        .        Seq_Step_03     FloodValve                   Seq_Step_04
                        .------------] [-------------]/[--------------------+-------(S)
                        .                                                   |
                        .                                                   | Seq_Step_03
                        .                                                   +-------(R)
                        .
                        .
                        .''''''''''''''''''Continue state machine until desired states have been achieved
                        .''''''''''''''''''in this example 20 states
                        .
                        .
                        . 'condition is _whatever_ condition required to advance to the next state
                        . 'TEST CycleComplete
                        . 'RESET Seq_Step_20 - clear current state
                        .
                        .        Seq_Step_20     CycleComplete                Seq_Step_20
                        .------------] [-------------] [--------------------+-------(R)
                        .                                                   |
                        .                                                   | Seq_Init
                        .                                                   +-------(R)
                        .
                        . 'END OF THE STATE MACHINE
                        .
                        . 'THIS IS THE ACTION SECTION
                        .
                        .
                        .
                        .
                        .       Seq_Step_01              Seq_Step_03            FloodValve
                        .------------] [-----------+----------]/[-------------------(S)
                        .                          |
                        .        FloodValve        |
                        .------------] [-----------+
                        .
                        .
                        .        Seq_Step_02                                      |
                        .------------] [------------------------------------------+ T1
                        .                                                         | DS1
                        .                                                         +------------------
                        .
                        .
                        .       Seq_Step_20             optional_condition      CycleComplete
                        .------------] [-----------------------] [-------------------(S)
                        .
                        .
                        Code:
                        .
                        .         step_01      condition_01        step_02
                        .-----------] [-------------] [----------+--------(S)
                        .                                        |
                        .                                        | step_01
                        .                                        +--------(R)
                        .
                        .         step_01      condition_02        step_10
                        .-----------] [-------------] [----------+--------(S)
                        .                                        |
                        .                                        | step_01
                        .                                        +--------(R)[
                        .
                        Code:
                        .
                        . ' I usually perform a before-count test and an after-count test
                        . ' Test if we have done this three or more times
                        .         step_01          CT 3            step_02
                        .-----------] [-------------]< [---------+--------(S)
                        .                                        |
                        .                                        | step_01
                        .                                        +--------(R)
                        .
                        . 'Wait for condition
                        .        step_02      condition_02         step_03
                        .-----------] [-------------] [----------+--------(S)
                        .                                        |
                        .                                        | step_02
                        .                                        +--------(R)
                        .
                        .
                        .
                        . 'Test that we have the Counted memory bit on
                        .         step_10        Counted           step_11
                        .-----------] [-------------] [----------+--------(S)
                        .                                        |
                        .                                        | step_10
                        .                                        +--------(R)
                        .
                        . ' after-count test
                        . ' Test if we have done this three or more times
                        . 'if not go do it again
                        .        step_11           CT 3            step_01
                        .-----------] [-------------]< [---------+--------(S)
                        .                                        |
                        .                                        | step_11
                        .                                        +--------(R)
                        .
                        . 'if so, continue to next step
                        .        step_11           CT 3            step_12
                        .-----------] [-------------]>=[---------+--------(S)
                        .                                        |
                        .                                        | step_11
                        .                                        +--------(R)
                        .
                        .
                        .'''''''''''''''''''
                        . 'action section
                        .
                        .          Start                                
                        .-----------]^[-----------------------------------+ Copy
                        .                                                 | 0 CT
                        .                                                 +------------
                        .
                        .
                        .         step_10
                        .-----------] [--------------------------+--------+ MATH CT
                        .                                        |        | CT + 1
                        .                                        |        +-------------
                        .                                        |
                        .                                        |         Counted
                        .                                        +------------(O)
                        .



                        Comment



                        • #13
                          Sequence of operations please

                          Comment



                          • #14
                            t looks like Y104 is being reset on every scan after it has been set. Look for the RESET Y104 and look at that line.

                            Comment



                            • #15
                              Originally posted by daakers View Post

                              Yea but you are setting Y103 & Y104 on rungs 2 & 3, and a normal output of the Y103 & Y104 on rungs 8 & 9. That will not work. Replace Y103 & Y104 on rungs 8 & 9 with a C coil and rungs 2 & 3 will work as your wanting them to.
                              This was it! I changed all my Y103s and Y104s to C coils, so the set and reset used C1 and the Out command used C2, then put C1 and C2 in parallel so either could turn on the solenoid. Thank you daakers!

                              Thanks to everyone else who replied. Sorry if my code wasn't very clear, I was more just curious why I was having issues with the reset rung. It also is a proof of concept for a prototype, so although I called it an e-stop its more a a Run/Stop mode button for the prototype.

                              Comment

                              Working...
                              X