585,712 active members*
4,403 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Okuma > pls, a few questions about file read / write
Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2015
    Posts
    4154

    pls, a few questions about file read / write

    hello pls, what is the difference between FOPENA and FOPENB ?

    also, why is there an "A" : FWRITC coords.txt;A ? kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  2. #2
    Join Date
    Aug 2011
    Posts
    419

    Re: pls, a few questions about file read / write

    The FOPENA and FOPENB commands allow you to "open" 2 different files at the same time to GET data from.

    FOPENA and FOPENB commands for reading data only

    Click image for larger version. 

Name:	screen.JPG 
Views:	0 
Size:	42.2 KB 
ID:	391586
    "Imagination is more important than knowledge."

  3. #3
    Join Date
    Jun 2015
    Posts
    4154

    Re: pls, a few questions about file read / write

    hey, thx kurmay that image makes sense : it seems that is possible to have active simultaneously 2 buffers for reading + only one for writing

    i was looking for double buffering when writing, not when reading

    i just discovered that these 2 work : FWRITC file-name.txt;A and FWRITC file-name.txt;C, but i have no clue what's the difference between A & C

    also, in that image, instead of " read file a , read file b , read file c ", should be " read file a , read file b , write file c " or " file a opened , file b opened , file c opened "

    a file can be opened for both "write" or "read" actions

    thx again ...
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  4. #4
    Join Date
    Aug 2011
    Posts
    419

    Re: pls, a few questions about file read / write

    FWRITC_device-name:file-name.extension;A
    ;A is option function : Specifies the Append mode
    "Imagination is more important than knowledge."

  5. #5
    Join Date
    Jun 2015
    Posts
    4154

    Re: pls, a few questions about file read / write

    that info is not in my lathe manuals

    pls, what are the append modes ? can you share more infos ?


    aaa, i just found something into the mill manuals ... again, the lathe team vs mill team
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  6. #6
    Join Date
    Aug 2011
    Posts
    419

    Re: pls, a few questions about file read / write

    Mill team is more sharing data than lathe team
    "Imagination is more important than knowledge."

  7. #7
    Join Date
    Jun 2015
    Posts
    4154

    Re: pls, a few questions about file read / write

    yeah .. however, in the manual is nothing more about the ;A, besides what you shared ... i still have no clue about FWRITC file-name.txt; + "nothing" or "A" or "C"

    maybe is not that important Azerbaijan ? not bad ...
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  8. #8
    Join Date
    Jun 2015
    Posts
    4154

    Re: pls, a few questions about file read / write

    comparing to a linear code, using a single read-buffer ( only fopena ) will lead to an execution time +10%; using 2 read-buffers ( fopena&fopenb ) will hit into +17%

    thus is better to concatenate data into a single file, or just create a linear code

    i think that these functions are from a period when okuma tried to move over the dnc, by putting the source data file into the controller, so to speed up the data transfer

    absolute difference, for the code tested, between linear and fopen* codes was arround 0.04-0.06 seconds/block, is not much, but it sums up if the code is longer


    i mess with such values, because i have an operation log, from which i extract data about operation duration and day-moment of execution

    i try to keep the load on the system as minimal as possible : for example i load data into the buffer until i almost fill it up, and only after that i write it to the file : this reduces the "data write" events : a "write" event may occure after several operations ( eq after 1.5 cycles ), and when it writes down, it writes data about all the operations that had passed

    is a way to create a machinig log for series, with minimal cycle downtime / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  9. #9
    Join Date
    Jun 2015
    Posts
    4154

    Re: pls, a few questions about file read / write

    Quote Originally Posted by deadlykitten View Post
    i still have no clue about FWRITC file-name.txt; + "nothing" or "A" or "C"
    hello past self of my self

    fwritc requires an append mode :
    ... A : data is added to the file, thus allready existing content is preserved; this mode is ok for log-files
    ... C : data is rewriten to the file, thus allready existing content is gone; this mode is ok for single-sessions, for example shopping-lists : now, you have to buy this, and you can trash away the shoping-list from previous week

    of course, if something has to be added to the list, while you are shopping, then append A mode is required : honey, you should have bought all those junks + cat food; why did you bought only the cat food ? what will we eat now ? your mind is always at that hungry pu55y cat ... duuh / got it ?



    C mode is there to avoid increasing the file size, especially when data from previous session is no longer required / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  10. #10
    Join Date
    Jun 2015
    Posts
    4154

    Re: pls, a few questions about file read / write

    hello please, any idea why next program does not work on osp200 ? it seems it can't read a negative value / kindly

    Code:
    
    
        V1 = -123.456
    
    
        FWRITC abcdef.txt;C
        PUT V1 , 9
        WRITE C
        CLOSE C
    
    
        FOPENA abcdef.txt
        READ A
        GET V2 , 9
        CLOSE A
    
    
    M02
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

Similar Threads

  1. Read Write Protection
    By scurr in forum SIEMENS -> GENERAL
    Replies: 3
    Last Post: 06-02-2016, 10:52 AM
  2. how to read dxf file ?
    By deadlykitten in forum Okuma
    Replies: 4
    Last Post: 01-11-2016, 04:18 PM
  3. Are there any commands to write a .txt/.tap file from a Gcode?
    By FuriousGeorge in forum Tormach PathPilot™
    Replies: 5
    Last Post: 08-16-2015, 01:22 AM
  4. Is it possible to write file that is stored in USB?
    By Stephan Spears in forum Okuma
    Replies: 2
    Last Post: 05-06-2015, 01:55 PM
  5. write to file possible ?
    By mcgpz1 in forum Parametric Programing
    Replies: 1
    Last Post: 06-12-2008, 04:41 PM

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
  •