Variable for machine name without user input?

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

  • Variable for machine name without user input?

    We have the same programs run on multiple CMM's. We would like to have our report and stats output recognize what CMM was running the program to help with quality control. Is there a way to have the program pull this info from the CMM without having any input from the operator? We can barely get them to fill in serial numbers, so there's no hope for machine name.

  • #2
    Are the cmms on a network ?
    Maybe using "ISIOCHANNELSET" could help, not sure of this.

    From core manual :
    ISIOCHANNELSET
    This expression takes two parameters. The first parameter indicates which I/O channel will be checked (the range of numbers that is available is based on the machine being used). The second parameter determines whether the software will query the Arm1 or Arm2 machine. If the second parameter is set to 1 (one) it will query the Arm2 controller. If the second parameter is not present (or is set to zero), then the IO Channel will query the Arm1 controller. The Arm1 controller is your only option if you are not in multiple arm mode. If an invalid probe data type, tip id, probe file name, or channel number is supplied, the expression evaluates to 0.
    Example:

    ASSIGN/V4=ISIOCHANNELSET(3,0)
    V4 will equal 1 (evaluate to true) when the channel is set, otherwise it will equal 0 (evaluate to false).

    Comment


    • #3
      read a txt file that is on the PC. must be in the same location on each PC (C:\MACHINEID\read.txt
      sigpic
      Originally posted by AndersI
      I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

      Comment


      • #4
        Easiest way would be a comment at the top of the program. Only thing is you would have to remember to change them to the correct CMM #.

        The way we do it so we don't have to remember to change it is a .txt file that stays on the C drive. We then have code that reads this and puts it in a tracefield. See the code pulled from one of our programs below.

        Code:
        ASSIGN/CMMID=0
        FE1 =FILE/EXISTS,C:\SETCMM.TXT
        IF/FE1<>1
        CMN =COMMENT/INPUT,NO,FULL SCREEN=NO,
        'CMM NO:'
        ASSIGN/SETID="CMM " + CMN.INPUT
        FPTA =FILE/OPEN,C:\SETCMM.TXT,WRITE
        FILE/WRITELINE,FPTA,SETID
        FILE/CLOSE,FPTA,KEEP
        END_IF/
        ASSIGN/IDFILE="C:\SETCMM.TXT"
        GETCMMNO =FILE/OPEN,IDFILE,READ
        SETID =FILE/READ_BLOCK,GETCMMNO,5
        FILE/CLOSE,GETCMMNO,KEEP

        Comment


        • #5
          Thanks guys those are great recommendations. I think I'll give the .txt on the C drive a shot first.

          Comment

          Related Topics

          Collapse

          Working...
          X