ReadUserDataBuffer
This function is used to read data contained in the User Data field of the currently enabled factory communication protocol. The referenced Buffer data structure, which is created by a FormatInputBuffer function, defines how the received data is interpreted.
ReadUserDataBuffer Inputs
| Parameter | Description | ||||||||||
| Event |
Specifies the update event on which to read data. This parameter needs to be a reference to any event with a timestamp, for example
|
||||||||||
| Buffer | Specifies a reference to a Buffer data structure created by a FormatInputBuffer function, which defines how the received data is interpreted. | ||||||||||
| Protocol |
Specifies which protocol the user data should be read from.
|
||||||||||
| Validate Connection | Specifies whether or not the function will attempt to validate the connection. If enabled, the function will return #ERR if the selected protocol does not have an active cyclic connection. | ||||||||||
| Byte/Word Order |
Specifies the bit order for words and bytes read by the function.
|
ReadUserDataBuffer Outputs
| Returns |
A UserData data structure containing the data sent by a client; or #ERR:
|
| Results | Data in the UserData data structure is accessed using the GetBufferData function. For more information, see the Input/Output topic. |