# WriteDevice

Exports data from the In-Sight vision system to another host on the network using a TCP/IP connection.

Note: The WriteDevice function can send a message to a remote host while either Online or Offline.

## WriteDevice Inputs

Parameter | Description
Event | Specifies the event that forces an update. This parameter must be a reference to one of the following: The Image data structure in cell A0, containing the AcquireImage function. For more information, see . A cell containing an Event function. For more information, see Event. A cell containing a Button function. For more information, see Button.
Device | A reference to a spreadsheet cell containing a Device data structure created by a TCPClient or a TCPServer function. If the Spreadhsheet cell contains a TCPClient function and the connection is not yet established, the Event update triggers a reconnection attempt. For more information, see TCPClient.
Data 1, 2, ... | A reference to a cell which contains the data to export to the TCP/IP server device specified in the TCPClient function. Multiple data inputs are concatenated in a single packet.

## WriteDevice Outputs

Returns | A Write data structure, containing the data that is exported whenever the specified Event is initiated, or #ERR if there is any error: Any of the input parameters are invalid. For a TCPClient device, reports if a connection could not be established during the timeout period. For a TCPServer device, reports if there is no connection available.