Write Job

Sends a job to the specified In-Sight job slot in flash memory on the In-Sight sensor.

Note:
  • The In-Sight vision system must be Offline.
  • This command only works on a job saved on the flash memory on the In-Sight vision system. If the job is stored on the configured Job Server or the SD Card installed to the In-Sight vision system, this command does not work.

Write Job Inputs

Syntax: WJ[ID][Filename][Size][Data][Checksum]

The command and ID are 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 Job command.

Parameter Description

ID

The job ID number (0 to 999).

The lines of job data are:

Parameter Description

Filename

The first line contains the job name.

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 Job 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.

-1 The job ID number is outside the allowable range (0 to 999).
-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 Job Example

To write job data to the job named "86Test.job", issue the following command: WJ86

After issuing the command, input the job name (Test.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 (D56E).

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

Note:
  • If the job file already exists on the sensor, the existing job data is overwritten.
  • If the job file does not already exist on the sensor, a new job file is created with the specified name.
  • The size will be twice the number of bytes of the actual .JOB file size stored on the In-Sight sensor, due to the ASCII hexadecimal encoding of the data.