WriteDevice

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

Note: To establish a TCP/IP connection between two In-Sight vision systems, both must be Online.

WriteDevice Inputs

Syntax: WriteDevice(Event,Device,Data1,[Data2, ...])

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 AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
  • A cell containing a numeric value (any non-zero numeric value will force the update).

Device

A reference to a spreadsheet cell containing a Device data structure created by a TCPDevice or UDPDevice function. For more information, see TCPDevice and UDPDevice.

Data1, 2, ...

A reference to a cell which contains the data to export to the TCP/IP server device specified in the TCPDevice function. The data Packet Type in the TCPDevice function may be ASCII or binary.

WriteDevice Outputs

Returns

A Write data structure, containing the data that will be exported whenever the specified Event is initiated, or #ERR if any of the input parameters are invalid.

Note:
  • If the Timeout period, specified in the referenced TCPDevice function, is exceeded during a write operation to a TCP/IP buffer that is full, an #ERR is not returned.
  • Due to the fact that UDP communications are connectionless, there is no need for a timeout period when configured to UDP communications.