ReadDeviceNet
Reads data into a spreadsheet cell from the (optional) DeviceNet Interface Module connected to an In-Sight serial port.
- 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.
-
The ReadDeviceNet function requires a third-party RS-232-to-DeviceNet Gateway adapter. 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.
ReadDeviceNet Inputs
Syntax: ReadDeviceNet(Event,Port,Mapping,Compatibility Mode)
Parameter | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Specifies the update event on which to read data.
|
|||||||||||||||
Specifies the serial port (0 or 1) from which to read data, depending on the port availability of the active In-Sight vision system. |
|||||||||||||||
Specifies a data mapping, which consists of a list of specifiers delimited by colon (:) characters. Each specifier has two parts:
The various data type codes are listed in the following table:
Example: The data mapping, "0i:1f:5u:6s" specifies that the first data item (at offset 0) is an 8-bit integer, which triggers an acquisition if non-zero; the second item (at offset 1) is a floating-point value; the third (at offset 5) is a 1-byte unsigned integer; and the rest of the packet (starting at offset 6) is a string. 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.
|
|||||||||||||||
Specifies whether or not an In-Sight 1000 interprets the incoming byte stream in the same order as an In-Sight 3000. This parameter is ignored for all other In-Sight models. |
ReadDeviceNet 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. |