Copy file from RD to FD

  • Hi everyone,


    I use a KAREL routine to write some logs into a file. This file is stored in the RD memory area (really much faster than FD). But, as nothing is perfect :P , RD is volatile, and so I need to daily copy my file from RD to FD.


    Once again, FANUC's world is not perfect, and KAREL doesn't allow this :


    Code
    fileFastLog : FILE
    fileSavedLog : FILE
    
    fileSavedLog = fileFastLog 


    Do you know how to copy a file from a memory zone to another one ?


    Greetings,


    Seb

  • SD-Matic

    Changed the title of the thread from “Copy file from Rd to DF” to “Copy file from RD to FD”.
  • MOM

    Approved the thread.
  • Hi SD-Matic,

    Quote

    fileFastLog : FILE

    fileSavedLog : FILE

    fileSavedLog = fileFastLog

    this won't work . The data type 'FILE' can't be used like you have tried.


    You have to use a builtin routine :


    COPY_FILE

    Purpose: Copies the contents of one file to another with the overwrite option

    Syntax : COPY_FILE(from_file, to_file, overwrite_sw, nowait_sw, status)


    best regards

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now