Write Image
Sends image data from a remote device to an In-Sight sensor.
- The In-Sight vision system must be Offline.
- Executing the Write Image command is the equivalent of executing the Write BMP command.
Write Image Inputs
Syntax: WI[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 Image 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 Image 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 Image Example
To send the system settings to the sensor, issue the following command: WI
After issuing the Write Image command, the first input is the size (3436) 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 (D4DC).
The In-Sight sensor responds with 1, indicating that the image data was successfully sent to the sensor.