hexagon logo

Looping and keeping the numbers

I have a fixture that holds 10 parts. Let's say I have to run 50. How do I have the report continue with the eleventh part? Meaning once all 10 have run. It starts back at one in the report. I am new to the logic part of the software....obviouslyStuck out tongue closed eyes
Parents
  • You would build a loop within a loop.

    You start by making the program to inspect one part.

    Next you put that code in a loop that offsets the program for each position in the fixture.
    If your fixture is 10 parts right next to each other so you are only offsetting along one axis then this would be a single loop that just offsets by some increment along the axis each time to move to the next position. If your fixture is 2 rows of 5 then you would have a loop within a loop here. The inner loop would offset along the row from 1 to 5 and then the outer loop would offset down to the next row and then run the inner loop from 1 to 5 again.

    So now you have code to inspect the 10 parts that your fixture can hold. So now you put all of that in yet another loop that will repeat that code as many times as necessary.

    You could have an operator input comment that asks how many parts total will be run. It then takes that input and divides by the number of positions in the fixture. This gives you the number of times it needs to loop the program. Put in some instructions at the beginning for loading and at the end for unloading and you'll be all set.

    Once all runs have completed you have a print command to generate the reports and the runs of all parts will be in the report.
Reply
  • You would build a loop within a loop.

    You start by making the program to inspect one part.

    Next you put that code in a loop that offsets the program for each position in the fixture.
    If your fixture is 10 parts right next to each other so you are only offsetting along one axis then this would be a single loop that just offsets by some increment along the axis each time to move to the next position. If your fixture is 2 rows of 5 then you would have a loop within a loop here. The inner loop would offset along the row from 1 to 5 and then the outer loop would offset down to the next row and then run the inner loop from 1 to 5 again.

    So now you have code to inspect the 10 parts that your fixture can hold. So now you put all of that in yet another loop that will repeat that code as many times as necessary.

    You could have an operator input comment that asks how many parts total will be run. It then takes that input and divides by the number of positions in the fixture. This gives you the number of times it needs to loop the program. Put in some instructions at the beginning for loading and at the end for unloading and you'll be all set.

    Once all runs have completed you have a print command to generate the reports and the runs of all parts will be in the report.
Children
No Data