Write File

Sends a job to the flash memory on the In-Sight vision system, RAM Disk or SD Card.

Note:
  • The In-Sight vision system must be Offline.
  • To send a job file stored in the vision system's RAMDisk folder, the filename must include the RAMDisk folder path. For example, "RAMDisk/NewModel.job".
  • To send a job file stored in the vision system's SD Card folder, the filename must include the SD Card folder path. For example, "SDCARD/NewModel.job".

Write File Inputs

Syntax: WF[Filename][Size][Data][Checksum]

The command is sent on a separate line, followed by the lines of job data, which should be an exact copy of the data received from a Read File command. The lines of job data are:

Parameter Description
Filename The name of the job. The command will execute with or without the .JOB extension.
Size The second line contains an integer value for the size (in bytes) of the job.
Data The actual job data is encoded as ASCII hexadecimal values formatted to 80 characters per line. Each line ends with a terminating character.
CheckSum The last line contains four ASCII hexadecimal bytes that are a checksum of the job data.

Write File Outputs

Returns a status code, followed by a line terminator. The status codes are:

Status Codes Description
1

The command was executed successfully.

0

Unrecognized command.

-2

The job could not be written, or the job data is invalid.

-3

The checksum failed. The checksum does not match the job data.

-4

The In-Sight vision system is out of memory.

-6

User does not have Full Access to execute the command. For more information, see User Access Settings Dialog.

Write File Example

To write job data to the job "NewModel.job", issue the following command: WF. After issuing the Write File command, the first input is the job name (NewModel.job), followed by the size (826) in bytes.  Next, each ASCII hexadecimal byte of the job file is input.  Finally, the four ASCII hexadecimal checksum bytes are input on the last line (48A3).

The In-Sight vision system responds with 1, indicating that the job was successfully sent to the vision system's flash memory.

Note:
  • If the job file already exists on the vision system, the existing job data is overwritten.
  • If the job file does not already exist on the vision system, a new job file is created with the specified name.