write to a file

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • write to a file

    Hi,
    I've been working with reading a file with multiple points and running them using a while, end/while loop. Got that to work. Now I'm trying to write the data (measured values) to a file such that it comes out in a row of X, Y, Z, T. I've got the commands exactly, as far as I can tell, like they are in the help? files. It runs but does not put anything in the text file. Below is what I've got. Can anyone tell me where I'm going wrong? This is starting to get frustrating.
    Thanks for your help.

    ASSIGN/P = 0
    FPTR =FILE/OPEN,C:\PCDMISW_37\DATA\TKRDLTEST.CSV,READ
    MOVE/POINT,NORMAL,859.827,1866.5452,890.2236
    COMMENT/REPT,SCAN POINTS TEST
    WHILE/P<5
    ASSIGN/P = P+1
    V1 =FILE/READLINE,FPTR,{X}+","+{Y}+","+{Z}+","+{I}+","+{J}+ ","+{K}
    ASSIGN/QX = X
    ASSIGN/QY = Y
    ASSIGN/QZ = Z
    ASSIGN/QI = I
    ASSIGN/QJ = J
    ASSIGN/QK = K
    P =AUTO/SURFACE POINT,SHOWALLPARAMS = YES
    THEO/QX,QY,QZ,QI,QJ,QK
    ACTL/771.3183,1945.361,749.7687,0.955064,0.015001,0.296 0198
    TARG/QX,QY,QZ,QI,QJ,QK
    THEO_THICKNESS = 0,RECT,SNAP = NO,$
    AUTO MOVE = BOTH,DISTANCE = 10,RMEAS = None,None,None,$
    INIT = 0,PERM = 0,SPACER = 0
    DIM PTDIM= LOCATION OF POINT P UNITS=MM ,$
    GRAPH=ON TEXT=OFF MULT=100.00 OUTPUT=BOTH
    AX NOMINAL MEAS +TOL -TOL DEV OUTTOL
    X QX 771.3183 2.0000 -2.0000 -0.5835 0.0000 ---#-----
    Y QY 1945.3610 2.0000 -2.0000 0.0273 0.0000 ----#----
    Z QZ 749.7687 2.0000 -2.0000 -0.2313 0.0000 ---#-----
    T 0.0000 -0.6253 2.0000 -2.0000 -0.6253 0.0000 ---#-----
    END OF DIMENSION PTDIM
    FPTR2 =FILE/OPEN,C:\PCDMISW_37\DATA\TKRDLTEST1.TXT,APPEND
    ASSIGN/ALLVALS = (PTDIM.X.MEAS)+","+(PTDIM.Y.MEAS)+","+(PTDIM.Z.MEA S)+","+(PTDIM.T.MEAS)
    FILE/WRITELINE,FPTR2,ALLVALS
    FILE/CLOSE,FPTR2
    END_WHILE/
    Last edited by jmgreen; 03-02-2006, 09:20 AM.
    When the going gets weird, the weird turn pro. Hunter S. Thompson

  • #2
    Nevermind, we got it to work. Turns out that the alignment had gotten messed up and for some reason that had an effect on it. Don't know why.
    When the going gets weird, the weird turn pro. Hunter S. Thompson

    Comment

    Related Topics

    Collapse

    Working...
    X
    😀
    🥰
    🤢
    😎
    😡
    👍
    👎