ReadLatchedUserDataBuffer
For use with applications that require buffered acquisitions, reads (consumes) data contained in the User Data field of the currently enabled factory communication protocol (which is enabled in the Network Settings dialog), and latches the data to the acquisition trigger.The latched data is carried with the acquired image data, and is read into the Spreadsheet through this function.The referenced Buffer data structure, which is created by a FormatInputBufferfunction, defines how the received data is interpreted.For more information, see Network Settings Dialog and FormatInputBuffer.
ReadLatchedUserDataBuffer Inputs
Syntax: ReadLatchedUserDataBuffer(Event,Buffer,Protocol,Validate Connection,Byte/Word Order)
Parameter | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Specifies the update event on which to readdata. This parameter must be a reference to one of the following:
|
||||||||||||||||||||||||||||||||||||||||||||||
Specifies a reference to a Buffer data structurecreated 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.
|
||||||||||||||||||||||||||||||||||||||||||||||
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:
|
ReadLatchedUserDataBuffer Outputs
Returns |
A UserData data structure containingthe 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 isaccessed using the GetBufferData function.For more information, see Input/Output. |