586,013 active members*
4,032 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Okuma > pls, how to read the last line inside a file ?
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2015
    Posts
    4154

    pls, how to read the last line inside a file ?

    hello please, if inside MD1 is a file with an unknown number of lines, how to read the value from its last line ?
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  2. #2
    Join Date
    Jun 2015
    Posts
    4154

    Re: pls, how to read the last line inside a file ?

    hello to me again

    if data is written to file-a using append A, simply write the session number to file-b using append C : next time, open file-b so to read the last session number, and using this last number, open file-a, and loop read it, until end session is reached

    of course, there are other ways, but this can be done by g-code

    example : if gauging result is not passed via a variable, but is written to a file, this method can be used to read the gauging result



    this method requires 2 files with "linked" content, thus it won't work if one file is missing, thus it can not work to read files that are older then the moment when this method was implemented; however, even so, there are alternatives / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

Similar Threads

  1. *.txt file corrupted inside MD1
    By deadlykitten in forum Okuma
    Replies: 0
    Last Post: 02-10-2017, 02:49 PM
  2. Replies: 2
    Last Post: 05-24-2014, 07:30 PM
  3. Inside Line Cuttting
    By Rstrange in forum Torchmate
    Replies: 2
    Last Post: 11-23-2011, 12:42 AM
  4. How to read two M-codes in same line
    By varrtrix in forum Fanuc
    Replies: 14
    Last Post: 11-02-2011, 04:44 AM

Tags for this Thread

Posting Permissions

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