A Gocator measurement value is a 32-bit signed integer by default. In order to transmit 1 measurement value from the Gocator to a Universal Robots collaborative robot, it must be sent as 2 Modbus registers which are natively 16-bit unsigned integers. Then the original value must be re-calculated and scaled.
Here is an example to show that process.
First, you must configure your Measurements on the Measure page. For this example, I will use a Surface Position tool with X and Z Measurement outputs enabled at ID 0 and 1 respectively.
On the Output page, observe the Register indices that your Measurement values will be transmitted from. From this list, you can see that Surface Position - X value (ID 0) will be at Registers 1000 and 1001 and Surface Position - Z (ID 1) will be at Registers 1003 and 1004. In the Map, [V] stands for the Measurement Value and [D] stands for the Pass/Fail Decision Value of that measurement.
On the robot controller, set up 4 Modbus registers to receive that data. Below I have set up 2 registers to convert ID1 from Registers 1003 and 1004. You must input the IP address of the sensor in the IP address field. The default Gocator IP address is 192.168.1.10.
The Green light to the left of each Register Input selection indicates a successful and uninterrupted connection to the Gocator.
Once the data is successfully being received in the robot controller as indicated by the green lights, then you must convert the upper and lower registers back into a floating point value as it originally was shown in the Gocator web GUI.
To convert the 2 registers, first analyze the lower address value. Here the lower address is shown as 1003. If that value is greater than 32768 (a.k.a. 2^15), then the floating point number shown in the Gocator web GUI is a negative value. If it is less than 32768, then the floating point value is positive.
Depending on the sign of the floating point value, apply one of the following 2 equations to convert the registers.
For Positive Numbers
(LOWER_REGISTER_VALUE * 65536) + UPPER_REGISTER_VALUE = FLOATING_POINT_VALUE
For Negative Numbers
((65535 - LOWER_REGISTER_VALUE)*65536) + (65536 - UPPER_REGISTER_VALUE) = FLOATING_POINT_VALUE
Lastly, scale the resultant integer value by 1/1000 to get your floating point value. Verify that this is the same value shown in the Gocator web GUI.
This math is shown in the attached spreadsheet.
Here is an example showing a negative value and the UR conversion formula:
Here is an example showing a positive value and the same UR conversion formula: