588,375 active members*
8,284 visitors online*
Register for free
Login
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Posts
    303

    Storing / Retrieving a letter in a variable?

    I am writing a series of subprograms to track tool life and wear offset adjustments over the course of several long-running jobs.
    One of the subprograms will output (via DPRNT) the collected data on a regular basis; this subprogram is generic and can be called from any part programs as required.
    The part program will store the part number, job number, etc as variables which the reporting subprogram can use when it generates its output.
    What I would *like* to do is also be able to output the drawing revision.
    Some of our customers use a numeric system for drawing revisions, which is no trouble at all to store/retrieve.
    However, a large number of our customers use letters... e.g. "REV D".
    I have not been able to figure out a way to handle this.


    Section from part program:
    #599=2137649(PART NUMBER)
    #598=20(SEQ NUMBER)
    #596=134558.09(JOB/LOT NUMBER)


    Subprogram segment:
    DPRNT[PART NUMBER #599[80] REV NO ????[20]]
    DPRNT[JOB NO #596[52] SEQ NO #598[40]]
    DPRNT[MACHINE NUMBER #6026[80]]

  2. #2
    Join Date
    Mar 2003
    Posts
    2932
    Something to mull over...

    You could possibly store a number from 1 to 26, then use that value to pick one of several DPRNT statements.

    IF[#20EQ1]GOTO1001(A)
    IF[#20EQ2]GOTO1002(B)
    ...
    ...
    ...
    IF[#20EQ26]GOTO1026(Z)


    (START OF LETTERS)

    N1000(NO REV)
    DPRNT[PART NUMBER #599[80]]
    GOTO1027

    N1001(A)
    DPRNT[PART NUMBER #599[80] REV NO A]
    GOTO1027

    N1002(B)
    DPRNT[PART NUMBER #599[80] REV NO B]
    GOTO1027
    ...
    ...
    N1026(Z)
    DPRNT[PART NUMBER #599[80] REV NO Z]

    N1027(REMAINING DPRNTS)
    DPRNT[JOB NO #596[52] SEQ NO #598[40]]
    DPRNT[MACHINE NUMBER #6026[80]]

  3. #3
    Join Date
    Feb 2005
    Posts
    303
    Thank you, dcoupar. That was what I figured the answer would be; just thought I'd pick the brains here.

Similar Threads

  1. Retrieving TNC 145 via serial connection
    By A.A in forum Bridgeport / Hardinge Mills
    Replies: 3
    Last Post: 03-20-2009, 02:07 PM
  2. Retrieving Storing Status of G41/G42 in VB Script
    By Mr. Technical in forum Mach Wizards, Macros, & Addons
    Replies: 0
    Last Post: 06-02-2008, 07:31 PM
  3. EMC2 variable pitch / variable diameter threading.
    By samco in forum MetalWork Discussion
    Replies: 0
    Last Post: 03-09-2008, 07:40 PM
  4. retrieving files?
    By bearracecars in forum Autodesk
    Replies: 2
    Last Post: 09-17-2007, 04:34 PM
  5. Retrieving Stepper Motors
    By andy_ck87028 in forum Stepper Motors / Drives
    Replies: 16
    Last Post: 10-25-2005, 10:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •