ReadModbusBuffer

Reads (consumes) data sent by a remote client using Modbus protocol. The referenced Buffer data structure, which is created by a FormatInputBuffer function, defines how the received data is interpreted. The remote client that is writing to the In-Sight vision system must use Registers 50000 – 50127. For more information, see FormatInputBuffer.

Note:
  • This function is only available on In-Sight vision systems running In-Sight firmware 4.x.x, and is not 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.
  • For available Modbus TCP implementations on different In-Sight firmware versions, see Modbus TCP Communications.

ReadModbusBufferInputs

Syntax: ReadModbusBuffer(Event,Buffer,Byte/Word Order)

Parameter Description

Event

Specifies the update event on which to read data. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.

Buffer

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.

Byte/Word Order

Specifies the bit order for words and bytes read by the function. The available values are:

  • Big endian -Specifies that the most significant value is stored first.
  • Little endian -Specifies that the least significant value is stored first.
  • Big endian with 16-bit words -Specifies that the most significant value is stored first.
  • Big endian with 16-bit words - Specifies that the least significant value is stored first.

ReadModbusBufferOutputs

Returns

A ReadModbus data structure containing the data sent by a client or #ERR if any input parameters are invalid or a connection from a client has not been established.

Results

Data in the ReadModbus structure is accessed using the GetBufferDatafunction. For more information, see Input/Output.