Reading a measuring gauge linked to a pc

Hi

What we trying to achieve is to get the cobot to put a part on a air mandrel and then take the reading from pc, where the gauge pushes the result to, at the moment we don’t have modbus client which would make thinks easier for us, can anyone point me to any similar sort of scripts i can look at that calls for data, we work on tolerances, and our gauging at the moment checks the difference between the zero. So for Example we have a diameter of 39.995mm tolerance +0.005mm/-0.000mm and the zero point is 39.9975mm, so we only need to tell the robot that part is ok if it gets a result between -0.0025 +0.0025, I have only had basic training and trying to lean the scripting side by looking at examples any tutorials online i can follow to do it myself many thanks chris

Hi @c.kearsley,

If you are goin to read it from the URScript you have the option to implement a XML-RPC server and then use the URScript function rpc_factory to establish connection.
Alternatively you can make a plain socket connection with the URScript function socket_open and then send receive string or binary data through that.

Ebbe

Hi
Thanks for your reply, at the moment I am getting I.T to create a program to read the gauge, as from the pdf is a example of a workstation called coding it codes the inner bore of a bearing and a outer rings, with the tolerances of the measurements they get coded if you look at the pdf example ie 0/2.0 microns go in code 1, so our It guys will producing a program calling on the data to the particular part to give us a output code ie 1 or 2 or 3 etc… So what will I need to read up on to retrieve the output the program will give, im planning to do this via opening a socket.
B7204.pdf (12.6 KB)

Hi @c.kearsley,

The socket connection will just transfer the data from the PC to URcontrol. On the PC side you can format it as strings and then receive it with the URScript function socket_read_string(socket_name=’socket_0’, prefix=’’, suffix=’’,
interpret_escape=’False’, timeout=2)
or you can sent the codes as integers and receive them with socket_read_binary_integer(number, socket_name=’socket_0’,
timeout=2)

Hi

I would like to say thankyou you have been a great help, I had a thought as the gauge uses a rs232 opto to d-sub serial to transfer the data to the pc, there is a option to get a rs 232 opto to usb. use the usb on the cobot
Would it be possible to create a urcap to read the data, so instead of having a pc as the go between it would be gauge to polyscope?
Would we have to first create a daemon first to run in the background to handle the data coming in from the usb then the urcap reads from that ?
I describe at the moment for trial purposes our IT department are creating a pc program to read the gauge but it be nice to further develop our process without needing a pc attached to the cobot.

Many thanks.

Chris Kearsley

Hi @c.kearsley,

You are welcome. It should be doable, as you have guessed and described here Communication over USB with Daemon
You need to make that communication implementation in a daemon and the serialize the data into the URScript(and potential Java) by a plain socket or XML RPC.

Ebbe