VB help

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

  • VB help

    I am in need of help for out put of the measurements results using VB (engineer would prefer this method).

    What I am in need of.... We would like to be able to output the deviation of our measurements into a file that is tied to text code for our CNC operators. The output text (an assigned code and the deviation) will be entered into a separate program on the CNC equipment for tool and zero offsets.

    I know nothing about VB and my engineer has used it before but not extensively.

    Craiger, this should be up your alley so to speak.

    Any help would be greatly appreciated.

    Duane
    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.

  • #2
    By the sounds of it could'nt you try using the functions already within PCDMIS to output your measurement results to a text file? A easier method if you dont already have VB experience.

    If your stuck on using VB (not a bad choice, as the PCDMIS file commands blow chunks!) you will probably at least need to post a example of the format you would like the text file to be exported in so that you can import the result into your CNC equipment.
    Last edited by MrComment; 01-02-2007, 10:17 AM.
    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


    • #3
      I know how to open and send the results to a text file but don't know how to do it with his text already embedded into the file. The engineer has a program he has on the lathes and mills and has code for his tools and zero sets. It is this code, (example "#100 =") plus the output of the actual measured deviation from nominal that he would like see printed after each part is ran on the CMM. We are required by our customers to enclose the CMM printout with each part and he would also like to see this printed as well for the operators. The program he has on the CNC equipment will run and prompt the operator for each of his "inputs" (his code) and then ask for the deviation from the CMM results. It will eliminate some of the error by the operators by offsetting the wrong tool or zero set in the wrong direction.

      If there is a way to do it with his text already in the file please let me know how.

      This is an example of what he would like see.

      #100 = 0.013

      #101 = -0.020

      #102 = 0.008

      #103 = -0.031
      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


      • #4
        Code:
        FPTR       =FILE/OPEN,"C:\MyFile.txt",WRITE
                    FILE/WRITELINE,FPTR,"#100 = " + CIR1.D
                    FILE/CLOSE,FPTR,KEEP
        The attached code above shows how to write the diameter of a measured feature to generic text file the output shown below.


        Code:
        #100 = 14.142
        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


        • #5
          If the text file is short. I would'nt try to append the file, because getting the text file cursor to behave predictably in pcdmis (v4.1) isnt really all that easy. I havent got it to work at all like the manual suggests it should.

          You can however easily have PCDMIS recreate your the entire text file using the write commands. This way you would'nt have to worry about where the file pointer (cursor) currently is in your text file. Just start at the top and keep writing out values until the end.
          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


          • #6
            OK. I hadn't thought of putting his code right into that statement. The program itself is long but what the operator needs for offsets is only 8-10 lines. But you are showing actual measurements, he wants deviation from nominal. Time for using a generic feature created by the deviation?

            Can I make the text file print at the end of the program?
            Last edited by dwade; 01-02-2007, 11:26 AM.
            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


            • #7
              If you need the deviation from the nominal first create a dimension that gives you the result your looking for. Then reference this dimensions variable in your code. If your dont want to create dimensions though a function similar to (CIR1.TD - CIR1.D) might work depending on what your want to do.

              Using a generic feature like you suggested is yet another means of doing the same thing.

              To make the txt file print at the end of your program I would insert an external command at the end of the PCDMIS program which would execute a generic DOS .bat or .exe file which I created earlier and would simply have a MSDOS command in it something like this "PRINT C:\MyFile.txt"

              The above would send the contents of this file to the default printer.
              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


              • #8
                dwade,

                Would you or your manager be open to automating this taks completely?

                We have several installations of our EZ-Comp Systems where data is being sent from the CMM into the EZ-Comp and offset values are then calculated based upon a statistical running average before being transferred into the CNC.

                Not only does this eliminate errors due to the operator tranposing data values, entering values in the wrong tool, dropping the sign, etc., it also eliminates making unnecessary offsets from measuring a part that is not representative of the long term process.

                Let me know if we can be of any assistance.
                - -
                Best Regards

                Paul Sevin
                Ovation Engineering, Inc.
                http://www.ovationengineering.com
                off. 586-336-1590

                Comment


                • #9
                  Originally posted by psevin View Post
                  We have several installations of our EZ-Comp Systems where data is being sent from the CMM into the EZ-Comp and offset values are then calculated based upon a statistical running average before being transferred into the CNC.
                  Hate to say it, but Paul is absolutely right. That's your real solution. If you can get the operator out of the process, you are much better off. Especially if you have high value parts, you have to do all you can to avoid typos.

                  Paul, with which controls does your system work? FANUC by any chance? If so, how do you push values into a #variable? I don't think that can be done through RS-232. How do you do that????


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

                  Comment


                  • #10
                    Originally posted by Jan d. View Post
                    Hate to say it, but Paul is absolutely right. That's your real solution. If you can get the operator out of the process, you are much better off. Especially if you have high value parts, you have to do all you can to avoid typos.

                    Thanks, Jan.
                    We had talked about that and have SPC software in place but I do not know how far management would be willing to take this. I've been here a short 6 months and know how far they would be willing to take this. The majority of our orders are not high volume and that may be a factor is deciding what gets done.

                    Paul,

                    I've forwarded your message to the engineer for him to think about.

                    Thank you,
                    Duane
                    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

                    Related Topics

                    Collapse

                    Working...
                    X