Modbus Protocol
GoPxL supports the Modbus TCP communication to provide system, sensor group, and scan output data to a PLC, as well as accept incoming commands. After enabling Modbus in the GoPxL web interface (for more information, see Modbus Protocol), the sensor starts listening on port 502 for one or more Modbus clients. GoPxL operates as a Modbus server (slave), and a PLC that connects to it acts as the Modbus client (master). All communication is initiated by the PLC, with GoPxL responding to the Modbus requests.
While the Modbus protocol includes several types of requests, the two basic operations are reading and writing registers. Commands are invoked by the PLC sending write-register requests. Data is requested by the PLC by sending read-register requests.
There are 16-bits per register in the Modbus protocol. 32-bit and 64-bit values are stored in consecutive registers in Big-Endian format.
If buffering is enabled with the Modbus protocol (when part detection is used and if multiple objects may be detected within a time frame shorter than the polling rate of the PLC), the PLC must send the Buffer Advance command to advance the queue before reading the measurement results (see Control Input). For more information on part detection, see Profile Part Detection.