# 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.

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, one of the following: A cell containing an Event function. A cell containing a Button function.
Inspection ID | If the function references a cell pointing to a Image structure (default = A0), the Inspection ID of the result is the Acquisition ID of the hardware acquisition that produced the result, or -1=0xFFFF if the Image does not come from a hardware acquisition. If the function references a cell with an integer value, the Inspection ID of the result is set to that value.
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 needs to 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.
3 = SLMP Protocol Scanner | Specifies that SLMP is the enabled factory communication protocol.
4 = Modbus TCP Server | Specifies that Modbus TCP is the enabled factory communication protocol.
100 = Default | Specifies that the currently enabled factory communication protocol is used. If more than one protocol is enabled, the first enabled protocol is 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 is applied and double word types have their word pair order switched. (16-bit words)
3 = Little endian with 16-bit word swapping | Little endian byte style is applied and double word types have their word pair order switched. (16-bit words)
100 = Default | The default setting is used.

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