# WriteResultsBuffer

Writes data from a referenced Buffer data structure, created by a FormatOutputBuffer function, to the currently enabled factory communication protocol. This function also writes the Result Code field for the factory communication protocols.

## WriteResultsBuffer Inputs

Parameter | Description
Event | Specifies the event that forces an update. This parameter needs to be a reference to any event with a timestamp, for example an InputPointCloud function.
Inspection ID | Specifies a cell containing an Image structure (default = A0), or an integer of the inspection ID associated with the inspection results.
Buffer | Specifies a reference to a Buffer data structure created by a FormatOutputBuffer function, which contains automatically formatted data.
Result Code | Specifies an integer that can be used to communicate the result of the inspection to any connected devices.
Protocol | Specifies which protocol the user data should be written to.
1 = EtherNet/IP | Specifies that EtherNet/IP is the enabled factory communication protocol.
2 = PROFINET | Specifies that PROFINET is the enabled factory communication protocol.
100 = Default | Specifies that the currently enabled factory communication protocol will be used. If more than one protocol is enabled, the first enabled protocol will be used.
Byte/Word Order | Specifies the bit order for words and bytes read by the function.
0 = Big endian | Specifies that the most significant byte is stored first and subsequent bytes are stored in descending order.
1 = Little endian | Specifies that the least significant byte is stored first and subsequent bytes are stored in ascending order.
2 = Big endian with 16-bit word swapping | Big endian byte style will be applied and double word types will have their word pair order switched. (16-bit words)
3 = Little endian with 16-bit word swapping | Little endian byte style will be applied and double word types will have their word pair order switched. (16-bit words)
100 = Default | The default setting is used.

## WriteResultsBuffer Outputs

Returns | A Write Result data structure containing the data sent to the client, or #ERR: if an input parameter is invalid if a connection to a client has not been established