Cmmxyz: Nested loops video: General questions

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

  • Cmmxyz: Nested loops video: General questions

    I'm not great at loops.
    1. When looping, what do you do to make sure each report is separate and individually labeled?

    2. I'm attempting to loop a program which requires the operator to flip the part(s) upside down half way through the program. There are 3 parts on my new fixture. How do I know the report is generating correctly, connecting the first part UP with first part DOWN and so on....?
    For clarity, my first loop checks 3 pcs UP, there is a pause, the operator turns the parts DOWN, then the machine goes back to the beginning and checks the same parts DOWN.
    How do I know corresponding UP and DOWN parts will generate the matching report?
    sp5
    3. I've added my loops. When I try to run the part in offline, PCDMIS crashes. Any ideas? 2018 R1 CAD++ sp5






    HI TREVOR!
    Last edited by BIGWIG7; 10-07-2020, 03:02 PM.
    Che Guevara is a communist scumbag.

  • #2
    quick bump
    Che Guevara is a communist scumbag.

    Comment


    • KIRBSTER269
      KIRBSTER269 commented
      Editing a comment
      I've commented 7 times already, are you on a smoke break???????

    • KIRBSTER269
      KIRBSTER269 commented
      Editing a comment
      slower than molasses in January

    • KIRBSTER269
      KIRBSTER269 commented
      Editing a comment
      How many LOOP commands in there? Where is your LOOP end? "Where o where are you tonight? Why did you leave me here all alone?, I searched the world over and thought I found true love, you met another and PHHT!!! you were gone.

  • #3
    How do you export the report? What's inside the LOOP, stays in the LOOP. If you use STATS, you put the STATS end right before the LOOP end. If you export it like PDF or Xcel, then you put Print Commands at the beginning and one at the end (inside the LOOP). One to KEEP instances and one to DELETE instances.
    Last edited by KIRBSTER269; 10-09-2020, 02:48 PM.
    (In Memory of my Loving wife, "Ronda" who I lost March 7, 2016. I love you baby.)
    They say "Nobody's Perfect." I must be Nobody.

    Comment


    • #4
      Can you Post the code that your using? The LOOP and PRINT Commands or STATS or whatever. Don't really need the Program Code.
      (In Memory of my Loving wife, "Ronda" who I lost March 7, 2016. I love you baby.)
      They say "Nobody's Perfect." I must be Nobody.

      Comment


      • #5
        Originally posted by KIRBSTER269 View Post
        How do you export the report? What's inside the LOOP, stays in the LOOP. If you use STATS, you put the STATS end right before the LOOP end. If you export it like PDF or Xcel, then you put Print Commands at the beginning and one at the end (inside the LOOP). One to KEEP instances and one to DELETE instances.
        I export the report using standard method: SAVE/PRINT THE REPORT button in Report window
        Not sure what the question is here?
        Che Guevara is a communist scumbag.

        Comment


        • KIRBSTER269
          KIRBSTER269 commented
          Editing a comment
          My apologies thought you were having problems with print exporting. So I guess my question is what are you trying to accomplish? You have lets say 3 parts you run all 3 up and you then run 3 parts down and you want to align results 1 with 1, 2 with 2, and 3 with 3?

        • BIGWIG7
          BIGWIG7 commented
          Editing a comment
          yes.
          if I loop the first half and loop the second half but then report everything at the end, will the report combine loop1x1 to loop2x1. loop 1x2 and loop 2x2, and so on?

        • KIRBSTER269
          KIRBSTER269 commented
          Editing a comment
          That might be tough to pull off. Be like adding pages in the middle of a book. I would think it could be done, by sending results to the very end of the program and grouping it there. I will mess around with it, and see if I can't come up with something.

      • #6
        ok kirbster I can't figure this out. I put the looping commands where I think I need them, I have moved the reporting features around so they are split into the two looping commands.

        the software (2018 R2) crashes the instant I execute the program. why?

        how do I post code over 10000 characters?

        Code:
         TIP/TIP1, SHANKIJK=0, 0, 1, ANGLE=0
        COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
        **********************
        PUT PROBE CENTERED TO TAB
        FLUSH TO TOP OF TAB
        LOCATED TOWARDS BACK EDGE OF TAB
        
        AS SEEN ON SCREEN SHOT
        ***********************
        COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
        ****************
        READY FOR DCC
        this PRG used 2 0.7mm probes 02.03.2020
        ****************
        MODE/MANUAL
        START =FEAT/POINT,CARTESIAN
        THEO/<0,0,0>,<0,0,1>
        ACTL/<0,0,0>,<0,0,1>
        READPOINT/
        A1 =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
        ALIGNMENT/TRANS,XAXIS,START
        ALIGNMENT/TRANS,YAXIS,START
        ALIGNMENT/TRANS,ZAXIS,START
        ALIGNMENT/END
        V1 =LOOP/START,ID=YES,NUMBER=3,START=1,SKIP=,
        OFFSET:XAXIS=0,YAXIS=3.25,ZAXIS=0,ANGLE=0
        MODE/DCC
        CLEARP/ZPLUS,0.2,ZPLUS,0,ON
        MOVE/CLEARPLANE
        START_1 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
        THEO/<0,-0.045,0>,<0,0,1>
        ACTL/<0,-0.045,0>,<0,0,1>
        TARG/<0,-0.045,0>,<0,0,1>
        SNAP=NO
        SHOW FEATURE PARAMETERS=NO
        SHOW CONTACT PARAMETERS=YES
        AVOIDANCE MOVE=NO,DISTANCE=0.3937
        SHOW HITS=NO
        A2 =ALIGNMENT/START,RECALL:A1,LIST=YES
        ALIGNMENT/TRANS,ZAXIS,START_1
        ALIGNMENT/END
        MOVE/CLEARPLANE
        START_2 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
        THEO/<-0.05,-0.045,-0.02>,<-1,0,0>
        ACTL/<4.5914,4.4098,-24.9535>,<-1,0,0>
        TARG/<-0.05,-0.045,-0.02>,<-1,0,0>
        SNAP=NO
        SHOW FEATURE PARAMETERS=NO
        SHOW CONTACT PARAMETERS=YES
        AVOIDANCE MOVE=NO,DISTANCE=0.3937
        SHOW HITS=NO
        MOVE/CLEARPLANE
        START_3 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
        THEO/<0.05,-0.045,-0.02>,<1,0,0>
        ACTL/<4.6914,4.4098,-24.9535>,<1,0,0>
        TARG/<0.05,-0.045,-0.02>,<1,0,0>
        SNAP=NO
        SHOW FEATURE PARAMETERS=NO
        SHOW CONTACT PARAMETERS=YES
        AVOIDANCE MOVE=NO,DISTANCE=0.3937
        SHOW HITS=NO
        WORKPLANE/ZPLUS
        START_MID =FEAT/POINT,CARTESIAN,NO
        THEO/<0,-0.045,-0.02>,<0,0,1>
        ACTL/<4.6414,4.4098,-24.9535>,<0,0,1>
        CONSTR/POINT,MID,START_2,START_3
        MOVE/CLEARPLANE
        CIRSTART =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,OUT,LEAST_SQR
        THEO/<0,-1.3991,-0.9>,<0,0,1>,2.88,0
        ACTL/<4.6414,3.0557,-25.8335>,<0,0,1>,2.88,0
        TARG/<0,-1.3991,-0.9>,<0,0,1>
        START ANG=0,END ANG=360
        ANGLE VEC=<1,0,0>
        DIRECTION=CCW
        SHOW FEATURE PARAMETERS=NO
        SHOW CONTACT PARAMETERS=YES
        NUMHITS=5,DEPTH=0,PITCH=0
        SAMPLE METHOD=SAMPLE_HITS
        SAMPLE HITS=0,SPACER=0
        AVOIDANCE MOVE=NO,DISTANCE=0
        FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
        SHOW HITS=NO
        STARTCLOCK =FEAT/LINE,CARTESIAN,UNBOUNDED,NO
        THEO/<0,-1.3991,-0.46>,<0,1,0>
        ACTL/<4.6414,3.0557,-25.3935>,<0,1,0>
        CONSTR/LINE,BF,2D,CIRSTART,START_MID,,
        OUTLIER_REMOVAL/OFF,3
        FILTER/OFF,WAVELENGTH=0
        A3 =ALIGNMENT/START,RECALL:A2,LIST=YES
        ALIGNMENT/ROTATE,YPLUS,TO,STARTCLOCK,ABOUT,ZPLUS
        ALIGNMENT/TRANS,XAXIS,CIRSTART
        ALIGNMENT/TRANS,YAXIS,CIRSTART
        ALIGNMENT/END
        ************************************************************
        ************************************************************
                    LOOP/END
        Last edited by BIGWIG7; 10-15-2020, 01:02 PM.
        Che Guevara is a communist scumbag.

        Comment


        • #7
          can you not have two loops in the same program if they don't overlap?
          Che Guevara is a communist scumbag.

          Comment


          • KIRBSTER269
            KIRBSTER269 commented
            Editing a comment
            You can have 2 Loops, one inside another or a loop and later in the program another loop. I have done both.

          • BIGWIG7
            BIGWIG7 commented
            Editing a comment
            can the LOOP/END command be the very last line of code in the program?

        • #8
          YA this is so bizarre.
          I open my program.
          add first loop,
          simulate and execute in offline
          simulate and execute 5x more in offline mode
          add second loop
          simulate and execute in offline
          simulate and execute 5x more in offline mode

          no problems

          save program
          save program and relabel so I can continue editing program

          rerun program again with no changes otherthan change to program name

          software crashes

          open previously saved program that was running fine before.....

          software crashes.

          have to start all over again.
          Che Guevara is a communist scumbag.

          Comment


          • #9
            Can you provide the program here so others can test it (to see if it crashes)?
            PC-DMIS CAD++ 2o19 R1 SP10

            Comment


            • BIGWIG7
              BIGWIG7 commented
              Editing a comment
              how do I do that?

          • #10
            I don't know what relabel means but you can try the following to get past the cash.

            There is a registry setting "Option", "SavePreviousInstances" which is defaulted to 1. This causes pcdmis to save all duplicated (looped) commands. It could be that the duplicated ones are not correctly re-attached.
            Set this value to 0 while pcdmis is NOT running.

            Run pcdmis.
            Load the PRG in question.
            File/Save As, give some other name.
            This should save the file without any extra instances of the command.
            File/Quit to close the PRG.
            You can then try to load and execute the newly named PRG to see what happens.
            The only difference is there are no extra instances to delete and try to reconnect properly internally.
            Last execution mode of the report would also not display those commands since they do not exist yet.

            Prior to v4.0, pcdmis never saved the duplicated command instances.
            It is now on by default (registry setting). It is up to the user if they wish to perform this type of saving.

            Just something to try to get past the crash.

            Comment

            Related Topics

            Collapse

            Working...
            X