ReadDeviceNetBuffer

Reads data sent by the DeviceNet Interface Module, attached to the serial port of an In-Sight sensor. The referenced Buffer structure, which is created by the FormatInputBuffer function, defines how the received data is interpreted. For more information, see FormatInputBuffer.

Note:
  • The selected serial port must be configured for DeviceNet communications, and the In-Sight vision system must be Online. For more information, see Serial Port Settings Dialog.
  • DeviceNet is only available on In-Sight vision systems using 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 .
  • When using the CIO-1450 I/O Module, if a serial packet is greater than 256 bytes (including termination character), there could be a loss of serial communication between the In-Sight vision system and I/O module, requiring the power to be cycled on both.
  • This function is available for legacy installations and should not be used in new applications, unless the RS-232-to-DeviceNet Gateway converter has been thoroughly tested to verify it is suitable for the application.

ReadDeviceNetBuffer Inputs

Syntax: ReadDeviceNetBuffer(Event,Port,Buffer)

Parameter Description

Event

Specifies the update event on which to read data.

  • This parameter must reference a cell containing an Event function in order to return data. For more information, see Event.
  • The Event function's Trigger parameter must specify Serial Port 1 and the Manual parameter must be unchecked.
  • The Event function will appear in the Job Edit toolbar as Event(65,0).

Port

Specifies the serial port (0 or 1) from which to read data, depending on the port availability of the active In-Sight vision system.

Buffer

Specifies a referenced Buffer structure created by the FormatInputBuffer function, which defines how the received data is interpreted.

Note: The length of the data must match the DeviceNet block size specified in the DeviceNet details. For more information, see Serial Port Settings Dialog.

ReadDeviceNetBuffer Outputs

Returns

A ReadDeviceNet data structure containing the data read into the spreadsheet from the DeviceNet Interface Module, or #ERR if any input parameters are invalid.

Results

Data in the ReadDeviceNet structure is accessed using the GetBufferData function. For more information, see Input/Output.