ros-industrial / fanuc

ROS-Industrial Fanuc support (http://wiki.ros.org/fanuc)
Other
155 stars 109 forks source link

changing registers #329

Closed pzurk closed 2 years ago

pzurk commented 2 years ago

Hi, i'm working on app using fanuc robot and i'm totally beginner. I want fanuc to execute simple moves, while it get a message from pc. I thought to write tp program with some condition of having some register value. For example, the instructions will be carried out only if R1=1. So I just want to change fanuc register from the level of C++ code on PC. I've done program which is reading registers, but I can't find any way to change them. Is there any simple way to change registers using ros fanuc package?

gavanderhoorn commented 2 years ago

I've transferred your issue to this repository, as I believe this is a better place for it. ros-industrial/industrial_core hosts nothing Fanuc specific.

As to your question: no there is no "simply way to change registers" using the package(s) in this repository.

You could take a look at how fanuc_driver receives data from the ROS side and updates position registers with that data. You could then change that to use the same principle, but write to regular registers.

However, if you're using a recent controller, I'd probably suggest looking at something like Remote Motion Interface (or R912). It's an official Fanuc software option which lets you interact with the controller using JSON messages over a TCP connection.

Alternatively, you could see whether you could duplicate what gavanderhoorn/dominh does. That's in Python, but the interfaces it uses can be used with C++ as well.

gavanderhoorn commented 2 years ago

As this issue is largely off-topic, and it doesn't report any issues with the packages in this repository, I'm going to close it.

Feel free to keep commenting of course.