Announcement

Collapse
No announcement yet.

Stage programming: How to keep an initial stage on permanently?

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


  • Stage programming: How to keep an initial stage on permanently?

    Suppose I wanted to keep an initial stage on all the time to wait for an incoming signal to action. What is the best way to do this?

    Stage ISG0
    SP1--||------------------set(S0)
    C1---||------------------set(Y0)
                            |--jmp(S1)

    Does that make sense? I know the "set" and "rst" commands trump the "jmp" command flow. Any other suggestions?
    Last edited by norgechica; 04-02-2013, 04:39 PM.


  • #2
    JMP Sx means "disable ME, set the stage bit Sx
    SET Sx means "set the stage bit Sx" (i.e. do NOT do the first part of the JMP

    Hence, from your ISG, DON'T USE JMP, only use SET
    There are 10 kinds of people in this world, those who know binary, and those who do not.

    Comment



    • #3
      Code:
      [isg s0]
      .  c1
      ---||----------------+-set(y0)
                           |
                           +-set(s1)
      There are 10 kinds of people in this world, those who know binary, and those who do not.

      Comment



      • #4
        Originally posted by franji1 View Post
        JMP Sx means "disable ME, set the stage bit Sx
        SET Sx means "set the stage bit Sx" (i.e. do NOT do the first part of the JMP

        Hence, from your ISG, DON'T USE JMP, only use SET
        Okay, I see. So then my second stage will be on permanently ("set"), so I need to reset it as I "jmp" to my third stage, correct?

        Stage ISG0
        C1---||------------------set(Y0)
                               |--jmp(S1)

        Stage SG1
        C2--||-------------------set(Y1)
                               |--jmp(S2)
                               |--rst(S1)


        Like this?

        Comment



        • #5
          No. From S1 if you JMP to S2, this will reset S1 automatically.

          JMP Sx means

          RST Sme
          SET Sx

          So JMP S2 from S1 is the same as
          RST S1
          SET S2

          so you only need JMP.

          It is VERY RARE to use SET and less rare to use RST on stage bits. The "always runnig" ISG is one of those situations where you use SET. You have no situations where you need to use RST on a stage.
          There are 10 kinds of people in this world, those who know binary, and those who do not.

          Comment



          • #6
            Originally posted by franji1 View Post
            No. From S1 if you JMP to S2, this will reset S1 automatically.

            JMP Sx means

            RST Sme
            SET Sx

            So JMP S2 from S1 is the same as
            RST S1
            SET S2

            so you only need JMP.

            It is VERY RARE to use SET and less rare to use RST on stage bits. The "always runnig" ISG is one of those situations where you use SET. You have no situations where you need to use RST on a stage.
            Great, thank you for the clarification and help! Much appreciated.

            Comment



            • #7
              I use multiple branches off of a main processing series of stages. A branch may advance through multiple stages but then terminate (RST me) at the end stage.

              For clarity I use SET to start any branch series of stages. In many cases the start of the branch is not also the logical end of the originating stage.
              thePLCguy

              Bernie

              Comment



              • #8
                Definitely not unusual at all to use SET to start a stage. As Bernie said, sometimes you need to start parallel stages and the initiating stage is not ready to end yet.
                If you have an urgent issue, please contact AutomationDirect's Technical Support team.

                AutomationDirect.com Technical Support: 1(800) 633-0405 or (770) 844-4200 Email Tech Support

                Comment



                • #9
                  I tend to use Stage for sequencing, hence I tend to do "transitions" from one stage to the next, which means I use a lot of JMPs. If I need to do a bunch of parallel branches at the same time, I still use JMPs for each branch (basically STR X0, JMP S10, JMP S20, JMP S30).

                  As a "supervisory" condition, I may need to cancel a "flow". I don't care WHERE in the flow I am, I just know I need to stop it. I use RST with a range of stages (this implies the stage numbers in my flows are contigous), so I will do RST S10 S17.

                  In DL-land, I may need to "kick off" a "background" stage that, say, monitors alarms or does some of the "supervisory" monitoring mentioned in the previous paragraph. But I don't want to "transition" to the "monitor alarms" stage, I just want to "kick it off". Hence, I can't use JMP. This is where I use SET. That's not to say there aren't other conditions where you can use SET (there are, like the example here).

                  Because I tend to use Stage to model IEC's SFC, my stage diagrams are more "transition" oriented, with some "supervisory" halting and a few "kick-off that never-terminating stage".
                  There are 10 kinds of people in this world, those who know binary, and those who do not.

                  Comment



                  • #10
                    Originally posted by franji1 View Post
                    I tend to use Stage for sequencing, hence I tend to do "transitions" from one stage to the next, which means I use a lot of JMPs. If I need to do a bunch of parallel branches at the same time, I still use JMPs for each branch (basically STR X0, JMP S10, JMP S20, JMP S30).

                    As a "supervisory" condition, I may need to cancel a "flow". I don't care WHERE in the flow I am, I just know I need to stop it. I use RST with a range of stages (this implies the stage numbers in my flows are contigous), so I will do RST S10 S17.

                    In DL-land, I may need to "kick off" a "background" stage that, say, monitors alarms or does some of the "supervisory" monitoring mentioned in the previous paragraph. But I don't want to "transition" to the "monitor alarms" stage, I just want to "kick it off". Hence, I can't use JMP. This is where I use SET. That's not to say there aren't other conditions where you can use SET (there are, like the example here).

                    Because I tend to use Stage to model IEC's SFC, my stage diagrams are more "transition" oriented, with some "supervisory" halting and a few "kick-off that never-terminating stage".
                    Same here, an initial stage for the things that have to be done all the time regardless, with SET to start processes, they JMP from one stage to another, and for for instance an alarm situation, it's RST several stages at once.
                    Last edited by Herman; 04-07-2013, 09:44 PM. Reason: typo

                    Comment

                    Working...
                    X