torayeff / fanucpy

Python Interface for FANUC robots
Apache License 2.0
109 stars 29 forks source link

RJ3iB support #37

Open Rolix57 opened 7 months ago

Rolix57 commented 7 months ago

Hi,

I am trying to test your library on an old RJ3iB. Is there a way to define/determine the port using the teach pendant as well as the ee_DO_type and ee_DO_num? Do you know how to do it or do you have any related resources?

I currently can read the position of the arm with a code of my own:

  import requests
  from bs4 import BeautifulSoup
  from time import sleep

  while(1):
      r = requests.get("http://192.168.1.6/MD/CURPOS.DG")
      soup = BeautifulSoup(r.text, "html.parser")
      text = soup.text

      poses = list()

      for i in range(1,7):
          position_init = text.find(str('Joint   ' + str(i) + ':')) + 11
          position_end = text[position_init:].find('\n')
          poses.append(float(text[position_init:position_init + position_end]))

      print(poses)
      sleep(0.01)

Thank you