Control viewsets with flow control?

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

  • Control viewsets with flow control?

    I have parts that we have different setups for. One setup uses clamps and the other uses vacuum cups. When I programmed the part, I used flow control to alter the programmed path depending on the setup used. I also have the setup CAD in the program so I could program around it. In other programs I use a viewset at the beginning of the program to show the part with the setup then a different viewset after the DCC alignment to show just the part. The question for this program is if I make two viewsets (one for each setup) at the beginning of the program, can I control which one is shown using flow control? If I can, how would it be done.

    If it can be done and it's a stupid simple answer, I'm going to kick myself...
    Remembering my beautiful wife Taz who's life was lost on 6-13-2020. I love you and I miss you.

  • #2
    I use viewsets, have never tried to use flow control with them.

    I have an idea, am working out some code now, will check back soon.

    SF7107(PCD), SF454(PCD), 152614(Quindos), 9159(Quindos), 7107(Quindos), B&S Manual, M&M Gear Checker

    Comment


    • #3
      Originally posted by DAN_M View Post
      I use viewsets, have never tried to use flow control with them.

      I have an idea, am working out some code now, will check back soon.
      So am I and I thing I've got it!!! Testing the program offline now. If it works, I'll post up the code.

      Edit to add: DAN_M IT WORKED!!! I will post the code in the next comment.
      Last edited by A-machine-insp; 03-10-2021, 02:41 PM.
      Remembering my beautiful wife Taz who's life was lost on 6-13-2020. I love you and I miss you.

      Comment


      • #4
        A-machine-insp

        Just whipped this up, seems to work, what do you think?

        Code:
        VIEWSET1 =VIEWSET/
        VIEWSET2 =VIEWSET/
        FIXT_TYPE_QUES =COMMENT/INPUT,NO,FULL SCREEN=NO,
        What type of fixture are you using?
        
        1--> Clamps
        
        2--> Vacuum Cups
        
        Press CANCEL to cancel
        IF_GOTO/LEN(FIXT_TYPE_QUES.INPUT)<>1,GOTO = FIXT_TYPE_QUES
        IF_GOTO/FIXT_TYPE_QUES.INPUT>2,GOTO = FIXT_TYPE_QUES
        ASSIGN/VAR_VIEWSET=STR("VIEWSET")+FIXT_TYPE_QUES.INPUT
        RECALL/VIEWSET,VAR_VIEWSET
        viewsets get defined, question is asked, input is vetted to make sure it is ONLY 1 character long, input is vetted again to make sure the input value is NOT greater than 2 (forcing it to be only 1 or 2), variable that is a text string gets defined and then used to control the viewset name being called up
        Last edited by DAN_M; 03-10-2021, 02:50 PM.
        SF7107(PCD), SF454(PCD), 152614(Quindos), 9159(Quindos), 7107(Quindos), B&S Manual, M&M Gear Checker

        Comment


        • #5
          I love it when I answer my own questions!

          I use the tracefield to control everything. Normally there are more tracefields for other information but that's not important right now. I only included the code that got me the desired result. This is how I did it. It has been tested offline both ways (selecting clamps and vacuum) and it works perfectly.

          This could be done more easily with a yes/no comment but I choose to do it with a tracefield. It makes life easier on the operators when they have 5 dropdowns in one window instead of 5 separate comments to answer.

          Edit to add: When you put the variable name (in this case "VIEW") after the recall/viewset command, DMIS gave me a window saying "VIEW" is not a viewset name and asked me if it is a variable. I clicked yes and all was well. Figured I'd add that incase anybody tries this code and gets that window.

          Code:
          TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=SETUP WITH CLAMPS OR VACUUM ; sp : VACUUM
          
          ASSIGN/SU=GETTRACEVALUE("sp")
          
          VC =VIEWSET/
          VV =VIEWSET/
          VP =VIEWSET/
          
          IF/SU=="CLAMPS"
          ASSIGN/VIEW="VC"
          END_IF/
          
          IF/SU=="VACUUM"
          ASSIGN/VIEW="VV"
          END_IF/
          
          RECALL/VIEWSET,VIEW
          Last edited by A-machine-insp; 03-10-2021, 03:26 PM.
          Remembering my beautiful wife Taz who's life was lost on 6-13-2020. I love you and I miss you.

          Comment


          • #6
            Originally posted by A-machine-insp View Post
            I love it when I answer my own questions!

            I use the tracefield to control everything. Normally there are more tracefields for other information but that's not important right now. I only included the code that got me the desired result. This is how I did it. It has been tested offline both ways (selecting clamps and vacuum) and it works perfectly.

            Code:
            TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=SETUP WITH CLAMPS OR VACUUM ; sp : VACUUM
            
            ASSIGN/SU=GETTRACEVALUE("sp")
            
            VC =VIEWSET/
            VV =VIEWSET/
            VP =VIEWSET/
            
            IF/SU=="CLAMPS"
            ASSIGN/VIEW="VC"
            END_IF/
            
            IF/SU=="VACUUM"
            ASSIGN/VIEW="VV"
            END_IF/
            
            RECALL/VIEWSET,VIEW
            good stuff
            SF7107(PCD), SF454(PCD), 152614(Quindos), 9159(Quindos), 7107(Quindos), B&S Manual, M&M Gear Checker

            Comment


            • #7
              Originally posted by DAN_M View Post
              A-machine-insp

              Just whipped this up, seems to work, what do you think?

              Code:
              VIEWSET1 =VIEWSET/
              VIEWSET2 =VIEWSET/
              FIXT_TYPE_QUES =COMMENT/INPUT,NO,FULL SCREEN=NO,
              What type of fixture are you using?
              
              1--> Clamps
              
              2--> Vacuum Cups
              
              Press CANCEL to cancel
              IF_GOTO/LEN(FIXT_TYPE_QUES.INPUT)<>1,GOTO = FIXT_TYPE_QUES
              IF_GOTO/FIXT_TYPE_QUES.INPUT>2,GOTO = FIXT_TYPE_QUES
              ASSIGN/VAR_VIEWSET=STR("VIEWSET")+FIXT_TYPE_QUES.INPUT
              RECALL/VIEWSET,VAR_VIEWSET
              viewsets get defined, question is asked, input is vetted to make sure it is ONLY 1 character long, input is vetted again to make sure the input value is NOT greater than 2 (forcing it to be only 1 or 2), variable that is a text string gets defined and then used to control the viewset name being called up
              Looks like we found two ways to skin a cat! As an idea, you could use a yes/no comment (yes=clamps, no=vacuum) and bypass the vetting process. Other than that, it looks like we pretty much did the same thing using variables.
              Remembering my beautiful wife Taz who's life was lost on 6-13-2020. I love you and I miss you.

              Comment


              • #8
                Originally posted by A-machine-insp View Post

                Looks like we found two ways to skin a cat! As an idea, you could use a yes/no comment (yes=clamps, no=vacuum) and bypass the vetting process. Other than that, it looks like we pretty much did the same thing using variables.
                I have a lot of situations where I will give the operator more than 3 things to choose from (and I don't want them f*ckin around with weird selections/breaking stuff) so I've just grown accustomed to input vetting to completely lock down the process lol
                SF7107(PCD), SF454(PCD), 152614(Quindos), 9159(Quindos), 7107(Quindos), B&S Manual, M&M Gear Checker

                Comment


                • #9
                  Originally posted by DAN_M View Post

                  I have a lot of situations where I will give the operator more than 3 things to choose from (and I don't want them f*ckin around with weird selections/breaking stuff) so I've just grown accustomed to input vetting to completely lock down the process lol
                  You could also try tracefields with dropdown selections. I used to use comments but now I use tracefields exclusively since I finally figured out how to use them properly.

                  Now if I could just figure out how to put the part on the machine right side up...
                  Remembering my beautiful wife Taz who's life was lost on 6-13-2020. I love you and I miss you.

                  Comment

                  Related Topics

                  Collapse

                  Working...
                  X