Roboguide saving found coordinate to a text file

  • Hi experts,


    I am new to FANUC, wondering if I use roboguide to simulate the vision process and find the coordinates of the parts, instead of displaying the coordinates in roboguide, is there a way to automatically save them to a text file so I can analyze those coordinates in other softwares?


    Thanks for any related advice.


    Regards,
    Tianxiang

  • There are probably better solutions than what I'm writing below. At least this method works without any special options installed.


    The robot webserver is accessible on the PC when using roboguide. 127.0.0.1 (localhost) for most setups.
    When you go to this address in your browser, look for the POSREG file.
    http://127.0.0.1/MD/POSREG.VA


    This file shows the current values of all the position registers.


    You could create a script to periodically request this page and read off the coordinates and save them to file.


    I've successfully used this method for debugging before.

  • After trying a few options, the below little Python code is able to read all the position register. Testing the real robot IP too (Ethernet connection), also works!



    import urllib2


    link = 'http://127.0.0.1/MD/POSREG.VA'
    response = urllib2.urlopen(link)
    webContent = response.read()


    file = open('position_register.txt', 'w')
    file.write(webContent)
    file.close()

Advertising from our partners