Announcement

Collapse
No announcement yet.

BRX Do-more designer modes

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


  • BRX Do-more designer modes

    I have an application where I will need to be able to select maybe 20 different modes of operation. Basically I have a BCD thumbwheel switch to set mode, and 2 analog inputs (4-20ma input and 0-10v input) I need to toggle Y0 - Y13 in may different variation, often times the outputs will be timed. I'm good with setting up the inputs and decoding the BCD Switch and all the output logic. My problem is that Do-more/BRX does not seem to like repeating Y outputs, or any duplicate outputs. If I put everything on 1 main program, it works up until a certain point (maybe too many duplicates?) then outputs will not turn on. I tried subroutines, ie a subroutine per mode, but you cannot put timers in a subroutine. I also tried main program which calls another program, but couldn't get that to work reliably (seemed to get stuck in the last program called, and could not select a previous program) I tried a program per mode. I think I will completely start again tomorrow new with a five mode project and see what happens...I will also try the simulator to try to get some insight as to what's happening....Any input is appreciated !...


  • #2
    20 different programs should do the trick. You probably need a "clock" edge on the thumb wheel so that the program doesn't change 10 times as you scroll your thumb wheel (e.g. scroll to the program you want, then hit "RUN" button to take that current thumb wheel value).

    The first question, when you hit the "RUN" button, should the current program shut down immediately? Or do you want the current program to shut down gracefully, THEN kick off the desired program? Another related question, if you hit the RUN button with the SAME current program #, should it shut down and then re-start, or just ignore the RUN request since it is already running?

    The duplicate OUT Y is just a warning or information message, which can be ignored, if you know that two PROGRAMs can never run at the same time. That warning/message is there just in case they CAN run at the same time, because LAST ONE WINs, e.g. PGM A does OUT Y42, and PGM B also has an OUT Y42. If the Execution Order is that PGM A is in memory BEFORE PGM B, and BOTH are running on the same PLC scan, PGM B will "win" (since it is executed AFTER PGM A). Y42 image register will be temporarily be set by PGM A, but then changed by PGM B, and at the bottom of the PLC scan, PGM B (last) value of Y42 will be written to the physical discrete output.

    It sounds like your 20 programs will be mutually exclusive, so if the "supervisory" code in $Main is correct, those two should never be running on the same PLC scan anyway. Hence, that rule can be ignored (in the Program Check Output Window, just "Right Click on any rule violation to judiciously ignore that specific rule at the Rung, Code-Block, Project, or Global level").
    There are 10 kinds of people in this world, those who know binary, and those who do not.

    Comment



    • #3
      Thank you for the response! I will try the creating a program per mode. Once a mode is selected, that mode be used for a day or so...also there will be no danger in switching modes at any time. (for the most part modes will control lights) . Which command should be used to call and return from a program?

      Comment



      • #4
        See help topic DMD0231 in the Do-more Designer software. Most of your questions will either be answered there or in the User manual: https://cdn.automationdirect.com/sta.../brxuserm.html
        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



        • #5
          Originally posted by triggsargoai View Post
          Thank you for the response! I will try the creating a program per mode. Once a mode is selected, that mode be used for a day or so...also there will be no danger in switching modes at any time. (for the most part modes will control lights) . Which command should be used to call and return from a program?
          See the RUN command. So you will have a bunch of relational contacts comparing the current BCD thumb wheel value against a hexadecimal constant (e.g. 0x15 is the same as BCD 15) driving a specific RUN PgmXX (where XX is the "number"). Then in each program, at the first rung, have it compare that same value against ITs number, and then EXIT if it does NOT equal ITs number.

          For example, say you have mode 15. Make that be Pgm15. Say your BCD value is in V52. So in $Main, you would have one of the rungs look like

          V52 0x15
          -] = [------------------------------------[RUN Pgm15]


          Then at the top of Pgm15, have the rung

          V52 0x15
          -] <> [------------------------------------[EXIT]


          Since the thumb wheel will spin, many programs will start running and EXITing very quickly (e.g. changing from 15 to 09 might run/exit program 16, 17, 18, 19, then setting on 9 as the thumb wheel changes on each digit), which you said is acceptable. If this is not fine, let us know.
          There are 10 kinds of people in this world, those who know binary, and those who do not.

          Comment



          • #6
            If it as simple as lighting lamps, you could use some drums.
            Then it could be 'fill out a form'-type programming.
            cascade more drums for more lamps/functions
            Attached Files

            Comment



            • #7
              Thank you for the responses. I did get it working. I'm not sure why it was acting up, but came in the next day and was easy! Thanks again!

              Comment

              Working...
              X