ReadUserDataBuffer
Reads (consumes) data contained in the User Data field of the currently enabled factory communication protocol (which is enabled in the Network Settings dialog). The referenced Buffer data structure, which is created by a FormatInputBuffer function, defines how the received data is interpreted. For more information, see Network Settings Dialog and FormatInputBuffer.
ReadUserDataBuffer Inputs
Syntax: ReadUserDataBuffer(Event,Buffer,Protocol,Validate Connection,Byte/Word Order)
Parameter | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Specifies the update event on which to read data. This parameter must be a reference to one of the following:
|
||||||||||||||||||||||||||||||||||||||||||||||
Specifies a reference to a Buffer data structure created by a FormatInputBuffer function, which defines how the received data is interpreted. Note: The maximum length for input data is 4,000 bytes.
|
||||||||||||||||||||||||||||||||||||||||||||||
Specifies which protocol the user data should be read from. Note:
|
||||||||||||||||||||||||||||||||||||||||||||||
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. Note: For EtherNet/IP it will not return #ERR unless an implicit connection was established after the last restart.When implicit messaging is not used, this allows the sensor to receive data explicitly without returning #ERR.
|
||||||||||||||||||||||||||||||||||||||||||||||
Specifies the bit order for words and bytes read by the function. Note: This parameter is only available on In-Sight vision systems running In-Sight firmware 5.1.0 and later. For a complete list of models and supported firmware versions, see Firmware Versions.
Examples: AB (one-word-sized value): A = the most significant byte, B = the least significant byte:
12AB (two-word-sized value): 1 = the most significant byte, B = the least significant byte:
|
ReadUserDataBuffer Outputs
Returns |
A UserData data structure containing the data sent by a client; or #ERR if any input parameters are invalid, a connection from a client has not been established or the data buffer has not been written to since establishing the connection. |
Results |
Data in the UserData data structure is accessed using the GetBufferData function. For more information, see Input/Output. |