Write BMP

Sends image data from a remote device to an In-Sight sensor.

Note:
  • The In-Sight vision system must be Offline.
  • Executing the Write BMP command is the equivalent of executing the Write Image command.

Write BMP Inputs

Syntax: WB[Size][Image][Checksum]

The command is sent on a separate line, followed by the lines of image data, which should be an exact copy of the data sent using a Read BMP command. The lines of image data are:

Parameter Description

Size

An integer value for the size (in bytes) of the image file.

Image

The actual image 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 image data.

Write BMP 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 image could not be written, or the image data is invalid.

-3

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

-4

The In-Sight sensor is out of memory.

-6

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

Write BMP Example

To send the system settings to the sensor, issue the following command: WB. After issuing the Write BMP command, the first input is the size (3878) in bytes.  Next, each ASCII hexadecimal byte of the image data is input.  Finally, the four ASCII hexadecimal checksum bytes are input on the last line (A36D).

Note: Most of the actual image data has been omitted from the preceding graphic for clarity.

The In-Sight sensor responds with 1, indicating that the image data was successfully sent to the sensor.