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 :face_with_tongue: , 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 :

    fileFastLog : FILE
    fileSavedLog : FILE
    fileSavedLog = fileFastLog 

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



  • 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,


    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 :


    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

Advertising from our partners