File I/O Commands

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

  • File I/O Commands

    Just curious to know how many of you use the File I/O commands in PC-DMIS. I sometimes struggle to provide practical examples of when these command are used, or needed. Seems to me like an antiquated and cumbersome way to import/export information, but hey, what do I know??

    Any "real world" examples would be appreciated. Thanks!
    CMMXYZ Applications Specialist: PC-DMIS Support and Training. Check out my PC-DMIS tutorial videos... https://blog.cmmxyz.com/blog/tag/cmm-tech-tips

  • #2
    We use it to check for a file on our SPC server. If it finds the file it will export the SPC data to our server to be ingested, if not it puts it in a local cache so we don't lose the data.

    Probably a roundabout way of doing this but it was set up before my time here and it works soooooo.

    Comment


    • #3
      I learned out to how to write variables of .outtol to an .csv file through this forum. I have datapage+ but its cumbersome and I didn't have any training on it. I could never get a good summary report on from it. I would only use it export a .csv of what ever i'm running and then work with the data. Being able to write directing to a .csv through pcdmis bypasses the datapage step. I don't have to log in or filter data for my export. Now I have a running excel sheet with all the data I need for processing. Next step is start leaning some macros to automate the analysis of the data. For now, I still use both methods for storing data just in case either method is not available.

      Perhaps you can share your practical examples as well?

      Comment


      • #4
        I use it to create a customized csv to import into our database system.

        To add:

        - I also have a command that tracks what program ran, at what time, by whom, and whether is ran through the entire cycle or not (can help figure out if a crash happens).
        - Writing to files so the program can read those specific lines to adapt
        Last edited by bfire85; 07-24-2019, 06:53 PM. Reason: Added: Run time

        Comment


        • #5
          Off the top of my head:

          File/Read for Option probe settings specific to which CMM the program is running on

          File/Read lists of variable values specific to which model # the operator chose for execution (I did one where one program works flawlessly for 15 different sizes of the same part)

          File/Write CSV format data for easy data capture

          File/Write for date-time stamps of execution and who is running it

          File/Write for deviation values, saved to a common server where the CNC machine reads them and adjust it's tool offsets

          Here's a fun one: File/Write lists of probes & tips used in the current program, then the probe calibration sub-routine File/Reads them and calibrates them accordingly.

          To quote The Velvet Underground, "The possibilities are endless".


          Comment


          • #6
            I have a text file on my CMM's that I read in to identify and report what CMM is running the part program. This also triggers which probe parameter set to run since we have both Hex and Tesa probe heads.

            Comment


            • #7
              We have a data collection software called Infinity. I send the results from my CMM programs to a text file using the Write Block command and Infinity picks up the data from the text files.

              Code:
              C2         =COMMENT/YESNO,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                          Do you want to send data into Infinity?
                          IF_GOTO/C2.INPUT == "NO",GOTO = THE END
              FPTR       =FILE/OPEN,C:\CMMDATA\TEXTFILES\CYL1STPC.TXT,WRITE
                          FILE/WRITE_BLOCK,FPTR,217236 + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,D2.M.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,D4.Y.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D5.Y.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D6.Y.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D7.Y.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D8.Y.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D9.X.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D9.Z.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D9.TP.DEV + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,D11.X.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D11.Z.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D11.DF.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D11.TP.DEV + ","
                          FILE/WRITE_BLOCK,FPTR,D12.X.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D12.Z.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D12.DF.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D12.TP.DEV + ","
                          FILE/WRITE_BLOCK,FPTR,D13.X.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D13.Z.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D13.DF.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D13.TP.DEV + ","
                          FILE/WRITE_BLOCK,FPTR,D14.X.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D14.Z.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D14.DF.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D14.TP.DEV + ","
                          FILE/WRITE_BLOCK,FPTR,D15.X.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D15.Z.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D15.DF.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D15.TP.DEV + ","
                          FILE/WRITE_BLOCK,FPTR,D16.X.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D16.Z.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D16.DF.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D16.TP.DEV + ","
                          FILE/WRITE_BLOCK,FPTR,D17.X.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D17.Z.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D17.DF.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D17.TP.DEV + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,D20.X.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D20.Y.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D20.DF.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D20.TP.DEV + ","
                          FILE/WRITE_BLOCK,FPTR,D21.X.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D21.Y.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D21.DF.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D21.TP.DEV + ","
                          FILE/WRITE_BLOCK,FPTR,D22.X.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D22.Z.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D22.TP.DEV + ","
                          FILE/WRITE_BLOCK,FPTR,D23.X.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D23.Z.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D23.TP.DEV + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,D36.Z.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D37.Z.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITE_BLOCK,FPTR,D39.D.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,D40.X.MEAS + ","
                          FILE/WRITE_BLOCK,FPTR,0 + ","
                          FILE/WRITELINE,FPTR,
                          FILE/CLOSE,FPTR,KEEP
              THE END    =LABEL/
              Mike

              Comment


              • #8
                As to being cumbersome... now when writing a new program I copy this code from another program, paste it in at the bottom of the new program and edit them to match the dimensions of the new program and delete the code I don't need. There may be an easier way to do it but we started doing this almost 15 years ago and haven't changed.

                Come to think of it...it does get cumbersome.
                Last edited by mdcon; 07-25-2019, 10:07 AM.
                Mike

                Comment


                • #9
                  Originally posted by acgarcia View Post
                  I learned out to how to write variables of .outtol to an .csv file through this forum. I have datapage+ but its cumbersome and I didn't have any training on it. I could never get a good summary report on from it. I would only use it export a .csv of what ever i'm running and then work with the data. Being able to write directing to a .csv through pcdmis bypasses the datapage step. I don't have to log in or filter data for my export. Now I have a running excel sheet with all the data I need for processing. Next step is start leaning some macros to automate the analysis of the data. For now, I still use both methods for storing data just in case either method is not available.

                  Perhaps you can share your practical examples as well?
                  acgarcia Are you able to post the code that outputs your data to a csv?

                  Yes, DataPage+ can be frustrating! It took me a few years to become proficient at it. These days I can train new users to get what they need out of it in a couple hours. DataPage+ also has a custom Excel output option that, admittedly, takes a bit of work to set up, but once it's setup it works pretty good. I did a tutorial video on this function a while back. Here's the link if you are interested: https://blog.cmmxyz.com/blog/datapag...m-excel-output

                  I don't actually have any practical examples of this command which is why I'm canvassing the forum. I only have a few examples that we use in the Level 3 curriculum. Thanks for you input!
                  CMMXYZ Applications Specialist: PC-DMIS Support and Training. Check out my PC-DMIS tutorial videos... https://blog.cmmxyz.com/blog/tag/cmm-tech-tips

                  Comment


                  • acgarcia
                    acgarcia commented
                    Editing a comment
                    Thanks for the link @TM, I will check it out.

                • #10
                  Originally posted by Trevor McLaughlin View Post

                  acgarcia Are you able to post the code that outputs your data to a csv?

                  Yes, DataPage+ can be frustrating! It took me a few years to become proficient at it. These days I can train new users to get what they need out of it in a couple hours. DataPage+ also has a custom Excel output option that, admittedly, takes a bit of work to set up, but once it's setup it works pretty good. I did a tutorial video on this function a while back. Here's the link if you are interested: https://blog.cmmxyz.com/blog/datapag...m-excel-output

                  I don't actually have any practical examples of this command which is why I'm canvassing the forum. I only have a few examples that we use in the Level 3 curriculum. Thanks for you input!
                  If ya got an old box (like XP), Datapage-RT takes 5 seconds to teach someone to get a report.
                  sigpic
                  Originally posted by AndersI
                  I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

                  Comment


                  • #11
                    Originally posted by Ego Murphy View Post
                    Off the top of my head:

                    File/Read for Option probe settings specific to which CMM the program is running on

                    File/Read lists of variable values specific to which model # the operator chose for execution (I did one where one program works flawlessly for 15 different sizes of the same part)

                    File/Write CSV format data for easy data capture

                    File/Write for date-time stamps of execution and who is running it

                    File/Write for deviation values, saved to a common server where the CNC machine reads them and adjust it's tool offsets

                    Here's a fun one: File/Write lists of probes & tips used in the current program, then the probe calibration sub-routine File/Reads them and calibrates them accordingly.

                    To quote The Velvet Underground, "The possibilities are endless".

                    Ego Murphy Interesting!... and very clever. I like your use of the File/Write command. Some good stuff here.
                    CMMXYZ Applications Specialist: PC-DMIS Support and Training. Check out my PC-DMIS tutorial videos... https://blog.cmmxyz.com/blog/tag/cmm-tech-tips

                    Comment


                    • #12
                      For me:

                      we utilize SAP for our warehousing and i've had to find a way to link the SAP receipt and the inspection.

                      SAP generates all kinds of random information in the background and so i have the system generate a text file with all of that information and store it on the server so that when i run the CMM program i scan the barcode (What we call a batch number) and PCD fetches the text file and utilizes all that information as identifiers so that when the report gets generated it gets uploaded back to SAP in association with the correct batch number.

                      that's a REAL high level nutshell of how it works but yeah, File I/O can be helpful.

                      for the longest time, even the majority of my projects at Hex we rarely used File I/O but there are definitely some uses.
                      Ex-Hex

                      Comment

                      Related Topics

                      Collapse

                      Working...
                      X