Two cmms program adjustment

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

  • Two cmms program adjustment

    Hello I've researched how to use one program on two cmm;s using external Aligments and I got it wowork.I've changed 2 programs so far.Both recall external aligment that's save on each machine.
    my problem now is that ne global cmm arm doesn't go as low at on the old cmm.What I would like to do is add read file command in the beginning of the program that would check which cmm program is running on and based on the value either run or go to comment
    that this program will not run on this cmm.
    THIS IS WHAT I HAVE SO FAR
    Code:
    PTR       =FILE/OPEN,C:\Users\G F\Documents\CMM TYPE\CMM TYPE.txt,READ
    CMMTYPE    =FILE/READLINE,FPTR,
                IF_GOTO/CMMTYPE==4,GOTO = END
                COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
                THIS PROGRAM WILL NOT RUN ON THIS CMM
    END        =LABEL/
    Last edited by GREGF; 10-23-2019, 09:07 AM.

  • #2
    What happens, what is your question?

    Looking closer, it seems you are misinterpreting the READLINE statement
    Code:
    CMMTYPE    =FILE/READLINE,FPTR,
    CMMTYPE will not be the value you read from the file, it's just a status indicator (OK / EOF). Try changing the code to

    Code:
    STATUS    =FILE/READLINE,FPTR,{CMMTYPE}
    Last edited by AndersI; 10-23-2019, 09:14 AM.
    AndersI
    SW support - Hexagon Metrology Nordic AB

    Comment


    • #3
      If I had a program that would not run on cmm 1 how do I redirect file read command to read other cmm number?Is it like with external aligment that If I save on c drive in the same location it will get that info from another computer?I heaven't used read file command yet so I just want to make sure it's right.The other computer has a different user name so this read file command might not work.Heaven't tried it yet.

      Comment


      • #4
        .thanks andersl.could this be achived with vb script?

        Comment


        • AndersI
          AndersI commented
          Editing a comment
          Why not use the PC-DMIS code as is (after correction)?

      • #5
        Keep a text file on each machine with it's name in the file. In the part program read the file and abort if it won't run on that machine. I've done this in the past but don't have access to the code right now to just hand off to you. It wasn't tough at all but I might find the code somewhere if you can't do it. Someone here will have something similar handy and beat me to it so stay tuned!
        sigpicHave a homebrew

        Comment


        • #6
          You need to make sure the identification file is stored on all computers in the same file structure, in a folder that's readable for everyone. That would mean something like "C:\Users\Public\Documents\CMM-Info\CMMTYPE.txt".
          AndersI
          SW support - Hexagon Metrology Nordic AB

          Comment


          • #7
            OK I just found this in another post
            Code:
            FPTR       =FILE/OPEN,"C:\Machine_Parameters\Touch_Speed.txt",READ
            V1         =FILE/READLINE,FPTR,{touchspeed}
                        FILE/CLOSE,FPTR,KEEP
                        TOUCHSPEED/ TOUCHSPEED
            so like Anderls suggested I would just create file on c drive
            .Tking if You find that code I would appreciate it.

            Comment


            • tking
              tking commented
              Editing a comment
              I may have it stashed on a laptop at home, I'll look. Maybe.... I'll find it whilst I become numb after work (homebrewer)

          • #8
            Thank You

            Comment


            • #9
              Originally posted by GREGF View Post
              Thank You
              Found it, got a text file on the "tube" at work I'll send for you. Would have done so today but..... I've only been here a month so I don't have time to jump on the forum. Maybe Monday, you'll probably get what you need before but we'll see. I WILL try.

              TK

              Update: check your PM, had to attach it, the forum kept changing the content if I just posted it, sheesh!
              Last edited by tking; 10-28-2019, 04:32 PM.
              sigpicHave a homebrew

              Comment

              Related Topics

              Collapse

              Working...
              X