How to load #NOUT or =NUMOUTTOL() into PCDMIS variable

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

  • How to load #NOUT or =NUMOUTTOL() into PCDMIS variable

    I want to load the number of out-of-tolerances into a PCDMIS assigned variable. Something along the lines of:

    Code:
                ASSIGN/V1 = NOUT
                ASSIGN/V1 = NUMOUTTOL()
    I tried to put these in but none seem to work. I also tried to get to this number through a SCRIPT, but no luck either.

    You can do this through the REPORT and add to a label, but that is not what I want. I want to get this number in my program and then do some "what-if" scenarios like:

    Code:
    IF V1<>0
    COMMENT, SEE QUALITY BEFORE PROCEEDING
    END_IF

    I also tried something listed below, because I know that 191 is the PART_NAME. But it only seems to get a number out of the FILEHEDR. How do I get to the FOOTER??


    Code:
                ASSIGN/NUMBER_OUTTOL = STR(GETTEXT(195,1,{FILEHEDR}))
    Any help would be appreciated!



    Thanks, Jan.
    ***************************
    PC-DMIS/NC 2010MR3; 15 December 2010; running on 18 machine tools.
    Romer Infinite; PC-DMIS 2010 MR3; 15 December 2010.

  • #2
    Wow - I've been working on this same thing for a stats record per line that I'm trying to track with WinSPC. I hope someone has some answers to this. All I can do is get the number to prompt to the screen.
    sigpic

    Comment


    • #3
      Not sure yet on the number out thing, but I have tried to reference the footer with the numerations you mention in the header. I don't think the footer is exposed.
      <internet bumper sticker goes here>

      Comment


      • #4
        Just thinking out loud here.
        Wouldnt the data in the Footer and Number of Out of Tolerance be a "final" value in PCDMIS program. If so how would you be able to access this inside the running program? Is this something that you would have to access from external to the program - ie, save the program and then look at it from another program?
        Links to my utilities for PCDMIS

        Comment


        • #5
          This makes the number out of tolerance pop up on the screen if you can capture something in the script :

          CS1 =SCRIPT/FILENAME= C:\PCDMISW37MR3\OUTTOL.BAS
          FUNCTION/Main,SHOW=YES,,
          STARTSCRIPT/
          ENDSCRIPT/

          Everyone may already know this, but it is all the further I have had time to play with it.
          sigpic

          Comment


          • #6
            Create a True/false (0/1) assignment for each dimension your concerned about, make the assignment for each dimension turn true when that dimension is outtol. At the end (or whenever you like), add up the sum of your assignments, use that variable as your "numouttol" your looking for.

            This method would give you the flexibilty to "ignore" dimensions that you might not be concerned about also.

            Just a suggestion.
            Mr. Comment
            SCIROCCO-NT 13-20-10
            B3C-LC Controller (Leitz Protocol), SP600M, TP200
            PCDMIS CAD++ v4.3 MR1(Build: 12/11/08)
            sigpic

            Comment


            • #7
              Originally posted by MrComment View Post
              Create a True/false (0/1) assignment for each dimension your concerned about, make the assignment for each dimension turn true when that dimension is outtol. At the end (or whenever you like), add up the sum of your assignments, use that variable as your "numouttol" your looking for.

              This method would give you the flexibilty to "ignore" dimensions that you might not be concerned about also.

              Just a suggestion.
              Thanks. This looks like a very good idea. Very flexible.

              It may only be a lot of typing? How can I implement your idea with a minimum amount of typing?

              Maybe I should bundle all required dimensions at the bottom of my program and evaluate them through some sort of a loop command???? Or maybe have all required dimension names start with REQ (like REQDIM145 for example) and then have a script go through all the dimensions that start with REQ?

              Any better ideas????


              Jan.
              ***************************
              PC-DMIS/NC 2010MR3; 15 December 2010; running on 18 machine tools.
              Romer Infinite; PC-DMIS 2010 MR3; 15 December 2010.

              Comment


              • #8
                Originally posted by djayne View Post
                This makes the number out of tolerance pop up on the screen if you can capture something in the script :

                CS1 =SCRIPT/FILENAME= C:\PCDMISW37MR3\OUTTOL.BAS
                FUNCTION/Main,SHOW=YES,,
                STARTSCRIPT/
                ENDSCRIPT/

                Everyone may already know this, but it is all the further I have had time to play with it.
                Can you post the text code of your OUTTOL.BAS file. I do NOT have this file on my computer.....


                Thanks, Jan.
                ***************************
                PC-DMIS/NC 2010MR3; 15 December 2010; running on 18 machine tools.
                Romer Infinite; PC-DMIS 2010 MR3; 15 December 2010.

                Comment


                • #9
                  Originally posted by Jan d. View Post
                  Thanks. This looks like a very good idea. Very flexible.

                  It may only be a lot of typing? How can I implement your idea with a minimum amount of typing?

                  Maybe I should bundle all required dimensions at the bottom of my program and evaluate them through some sort of a loop command???? Or maybe have all required dimension names start with REQ (like REQDIM145 for example) and then have a script go through all the dimensions that start with REQ?

                  Any better ideas????


                  Jan.
                  Do you have tons of dimensions to look at.

                  And are you any good with the VBA in Excel?

                  I could post a few code snipets for you if your interested, but It might be easier to see your program.
                  Mr. Comment
                  SCIROCCO-NT 13-20-10
                  B3C-LC Controller (Leitz Protocol), SP600M, TP200
                  PCDMIS CAD++ v4.3 MR1(Build: 12/11/08)
                  sigpic

                  Comment


                  • #10
                    Yes, i have some programs that have hundreds of them... It would be nice to have a script race through them in one shot...

                    I can do VBA in Excel. I have done quite a few (non-PC-DMIS I must admit) programs in the past. However, I do not think this will work with NC-Server, since NC-Server launches PC-DMIS and I can not use Excel to launch NC-Server at the same time.

                    Still, some code samples would be very helpful.

                    Right now, I have implemented your idea and it works nicely. But that's on a small program. I am just trying to figure out how i can get this done for a larger program....


                    Thanks, Jan.
                    ***************************
                    PC-DMIS/NC 2010MR3; 15 December 2010; running on 18 machine tools.
                    Romer Infinite; PC-DMIS 2010 MR3; 15 December 2010.

                    Comment


                    • #11
                      I'd have a problem with doing this as there are some programs that report this number incorrectly on our machines. It happens randomly but it happens.
                      Xcel & MicroVal Pfx & Global 37mr4 thru 2012mr1sp3
                      Contura Calypso 5.4

                      Lord, keep Your arm around my shoulder and Your hand over my mouth. Amen.

                      Comment


                      • #12
                        Originally posted by dwade View Post
                        I'd have a problem with doing this as there are some programs that report this number incorrectly on our machines. It happens randomly but it happens.
                        I bet it is certain TP dimensions. (I think)
                        <internet bumper sticker goes here>

                        Comment


                        • #13
                          Originally posted by Jan d. View Post
                          Yes, i have some programs that have hundreds of them... It would be nice to have a script race through them in one shot...

                          I can do VBA in Excel. I have done quite a few (non-PC-DMIS I must admit) programs in the past. However, I do not think this will work with NC-Server, since NC-Server launches PC-DMIS and I can not use Excel to launch NC-Server at the same time.

                          Still, some code samples would be very helpful.

                          Right now, I have implemented your idea and it works nicely. But that's on a small program. I am just trying to figure out how i can get this done for a larger program....


                          Thanks, Jan.
                          Ok heres a small program that should help save you some typing.

                          Open this up in Excel. You'll also need PCDMIS open and the Cursor positioned where you want New code to be added to your PCDMIS program.

                          Im assuming your using PCDMIS 4.2 also.

                          Type in the Dimension IDs your concerned about, and axis the dimension is using.

                          Then Create a new Variable ID for each of your logic statements. Depending on your ID structure this could be as simple as copy and drag or stringing variables together to get what your want.

                          In the end what you want to see in the far right column is a Logic Statement that would match what you would see in the PCDMIS command edit window.

                          Btw the code I provided is cell location sensitive. Meaning it wont work if you move or delete columns or the first 2 rows. There is some sample data I used to test this code out for your enjoyment.

                          Lastly enter the last row number in the EOF cell. This tells the Excel Macro where to stop adding PCDMIS code from the spreadsheet. There are better ways of doing this, btw.

                          Ok so the way this works is the macro reads the Logic ID and Logic Statement from the spreadsheet and uses these as inputs when it writes the commands into the PCDMIS program shown below is the results:

                          The nice thing is once your done you no longer need Excel to get execute this program, its all in PCDMIS.


                          STARTUP =ALIGNMENT/START,RECALL:,LIST=YES
                          ALIGNMENT/END
                          MODE/MANUAL
                          PREHIT/ 3
                          RETRACT/ 3
                          MOVESPEED/ 200
                          TOUCHSPEED/ 5
                          SCANSPEED/ 5
                          FORMAT/TEXT,OPTIONS, ,HEADINGS,SYMBOLS, ;NOM,TOL,MEAS,DEV,OUTTOL, ,
                          LOADPROBE/SP600-20X2X20
                          TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=0
                          $$ NO,PCDMIS Example Program!
                          PNT1 =FEAT/POINT,CARTESIAN,NO
                          THEO/<0,0,0>,<0,0,1>
                          ACTL/<0,0,0>,<0,0,1>
                          CONSTR/POINT,OFFSET,,0,0,0
                          DIM LOC1= LOCATION OF POINT PNT1 UNITS=MM ,$
                          GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
                          AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
                          X 0.000 0.010 0.010 0.000 0.000 0.000 ---#----
                          Y 0.000 0.010 0.010 0.000 0.000 0.000 ---#----
                          Z 0.000 0.010 0.010 0.000 0.000 0.000 ---#----
                          END OF DIMENSION LOC1
                          $$ NO,Excel creates this code below from the sample data in the Excel Spreadsheet
                          ASSIGN/V1 = 0
                          IF/LOC1.X.OUTTOL<>0
                          ASSIGN/V1 = 1
                          END_IF/
                          ASSIGN/V2 = 0
                          IF/LOC1.Y.OUTTOL<>0
                          ASSIGN/V2 = 1
                          END_IF/
                          ASSIGN/V3 = 0
                          IF/LOC1.Z.OUTTOL<>0
                          ASSIGN/V3 = 1
                          END_IF/
                          $$ NO,Heres your numouttol variable to do with however you like.
                          ASSIGN/V4 = V1+V2+V3
                          Attached Files
                          Mr. Comment
                          SCIROCCO-NT 13-20-10
                          B3C-LC Controller (Leitz Protocol), SP600M, TP200
                          PCDMIS CAD++ v4.3 MR1(Build: 12/11/08)
                          sigpic

                          Comment


                          • #14
                            Or just put an argument where everytime an out of tolerance is encountered V1 = V1 + 1. Then V1 will be your number out.

                            This can be scripted but I want to say folks had a hard time doing TP for some reason.
                            <internet bumper sticker goes here>

                            Comment


                            • #15
                              Report with footer

                              i have a (zipped).rpt has a footer that lists 377Kb to big for this forum
                              File path:
                              Part: name
                              Serial #
                              Stat#
                              Runtime
                              Features measured
                              Out of tolerance
                              Page #
                              2014 SP5, DataPage + v5.0 #331
                              [testing v2015.1]

                              Comment

                              Related Topics

                              Collapse

                              Working...
                              X