Need help with Looping Program

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

  • Need help with Looping Program

    Good morning All.

    First of all, Thank you very much for all your help in adv.

    I never write a program with looping. Customer just sent a fixture with 10 part on it.

    5pcs on top row and 5pcs on the bottom row. And they are all 3.00 even space of all.

    My question is where should I start to loop and where should I ended in the program.

    If chance can you please post the Program code for sample. Please.

    Again, Thank you so much for all your time.


  • #2
    I would start by programming one part entirely at first fixture position, unless your routine will require probe rotations.
    Save that routine.
    Then save as a new file.
    After your initial DCC alignment of either the fixture or the first part (fixture preferred)... insert a loop/start command. Change quantity to 2 and change your offset value in y to 3. this will be the loop for your two rows of 5 parts.

    Insert another loop/start command. change quantity to 5 and change your offset value in x to 5.
    save again, making sure your loop/end commands are placed after dimensions and whatever data output you use.

    Now, set that PRG file as read only and test at a super super slow speed, just to be sure it runs as intended.

    Helpful Hints:
    -Insert a Move/Clearplane at start and end of loop, as well as a recall of your fixture alignment at start and end of loop.
    -If you need to make changes, be sure you reset your loop counts to 1 and execute prior to acting on changes.
    -If you use move/increments, it's better than move/points for looped moves. they get weird when you change looped code.
    -If you align, recall active alignments within loop routine, it helps make sure the recall align doesn't get hung up within the loop.

    Comment


    • #3
      Run a quick example program something like ........

      Loop1 x distance 3
      Loop 2 y distance 3
      generic circle
      end loop
      end loop

      Check your graphics screen.

      See if this creates pattern you need. If not, adjust values.

      B&S CHAMELEON/PCDMIS CAD++ V2011

      There are no bugs, only "UNDOCUMENTED ENHANCEMENTS!"

      sigpic

      Comment


      • #4
        Thank you. I don't know where is my loop should be? can you post an example code?

        Comment


        • #5
          Originally posted by Harry_Nguyen View Post
          Thank you. I don't know where is my loop should be? can you post an example code?
          Right at the beginning of MODE/DCC or somewhere shortly after that (if you have move points or comments or something).

          Whatever a man sows, he shall reap.

          Comment


          • #6
            Something to note. Your first loop will encompass the entire program (starting after MODE/DCC), your second loop will encompass the first loop.

            The first loop will loop the program 4 times (original location then the 4 offset locations) then the second loop will offset the second loop to the next row of parts.

            I don't have any examples handy so I quickly threw this together as an example. There are no features in it. I used operator comments to show what goes where.

            Also, take a look at the help file and the core manual.


            Attached Files
            Remembering my beautiful wife Taz who's life was lost on 6-13-2020. I love you and I miss you.

            Comment


            • Harry_Nguyen
              Harry_Nguyen commented
              Editing a comment
              Thank you. I will going to test it out soon.

          Related Topics

          Collapse

          Working...
          X