ChDisk Statement

Sets the object disk for file operations.

Syntax
ChDisk PC|USB|RAM |FLASH

Parameters

PC
Folder in Windows (such as Hard disk)
USB
USB memory connected to the controller
RAM
Memory in controller
FLASH
Project folder in controller

Description
Specifies which disk to use for file operations. Default is PC disk.

The Robot Controller supports the following disks as the object of file operations.

  • PC: Folder in Windows

    The initial setting is PC and normally you don’t have to change the setting from PC.

    Accesses to the files on the project folders.

  • USB: USB memory connected to the controller memory port This is useful to exchange files when you don’t use the Windows Part (RC+).

    USB cannot be specified as a parameter for the T/VT series.

  • RAM: Temporary files on the memory

    These files are not saves when you turn off the controller.

    This is useful to save the data temporary.

  • FLASH: Project folder in controller

    These files are not lost when the controller is turned off.

Some of the SPEL+ commands change the object of the file operations according to the ChDisk setting. Also, the ChDisk setting is available only with the PC disk for some commands.

  • ChDisk, ChDrive, ChDir don’t affect…
    • Curve, CVMove, LoadPoints, SavePoints, ImportPoints file name
    • Object is always the project folders.
    • File name can be specified. If path is specified, an error occurs.
  • ChDisk don’t affect…
    • Access, Excel file name of OpenDB, ImportPoints source path, VLoadModel, VSaveImage, VSaveModel
    • Object is always the Windows folders.
    • If only file name is specified, it can be affected by the current drive and folder. You can also specify a full path.
  • Executable when ChDisk is PC
    • ChDir, FolderExists, MkDir, RenDir, RmDir

    • If you execute without setting ChDisk to PC, an error occurs.

    • If only file name and directory name are specified, it can be affected by the current drive and folder. You can also specify a full path.

      USB and RAM have no idea of directory.

  • ChDisk can be run on USB, RAM and FLASH
    • Copy, Del, FileDateTime, FileExist, FileLen, AOpen, BOpen, ROpen, UOpen, WOpen, Rename
    • When ChDisk is PC: If only file name and directory name are specified, it can be affected by the current drive and folder. You can also specify a full path.
    • When ChDisk is USB or RAM: File name can be specified. If path is specified, an error occurs.
  • Special
    • Declare
    • See Declare for the details. Any specified file name can be accepted. It cannot be affected by the current drive and folder

How to decide a full path when ChDisk is PC is as follows:

  • Only file name "abc.txt"

    Current drive + Current directory + Specified file name

    "C:\EpsonRC80\Projects\ProjectName\abc.txt"

  • Full path without a drive "\abc.txt"

    Current drive + Specified full path

    "C:\abc.txt"

  • Full path with a drive "d\:abc.txt"

    Specified full path

    "d:\abc.txt"

  • Drive is a network folder "k:\abc.txt"

    Specified full path

    "k:\abc.txt"

  • Network path "\\Epson\data\abc.txt"

    Specified full path

    "\\Epson\data\abc.txt"

You can have one ChDisk setting per controller.

If you want to set more than one disk as a system, take an exceptional control to switch the ChDisk setting.

See Also
ChDir, ChDrive, CurDisk$

ChDisk Statement Example
Examples from the Command window.

> ChDisk PC