Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Robot I/O control

#1
Hi Sirs,
I'm using FANUC LR Mate 200id robot. I am using online programming connecting to the robot successfully and working well by using python codes.
However, I met a big problem, I don't know how to control the gripper. After reading some information, I may use robot I/O (RI/RO) to control it. But there are only setDO, setAO can be used (my understanding) with RoboDK commands.
Is there any method to control the gripper using Robot I/O of FANUC? Or I can only use the setDO/setAO to control it?
#2
Hi,
I've tried to use robot.setDO(1, True) to send a Digital Output. it works and shows on the Teach Pendant (FANUC). Then I tried to set a post-processor,
def setRO(self, io_value):
self.addline('RO[1]',io_value))
to see if it could be defined by python code or not. The result was known: it's negative!

Does any body tried to call a robot-programming command (such as RO[1]=ON;) in RoboDK's python editor?
#3
Now I tried to add a code in the program: robot.RunInstruction('RO[1:HANDLE CLOSE]=ON', INSTRUCTION_INSERTCODE)
after doing this, when generate robot program is run. there's a "RO[1:HANDLE CLOSE]=O" in the LS file. But it still don't work when "run on robot"
#4
I give up this operation, tried many methods to make the ROBOT I/Os of FANUC active. Obviously, I failed to do this. It's kind of mission impossible to me. Now I can only control Digital I/O with the command setDO(x, v) to achieve my purpose.
#5
Hi Tim,

If I had another solution I would have told you, but I, unfortunately, don't and I don't know the Fanuc driver well enough to come up with an exotic solution.

Sorry.
Jeremy
Find useful information about RoboDK and its features by visiting ourOnline Documentationand by watching tutorials on ourYoutube Channel.


#6
thank you Jeremy. It's the fault of FANUC haha. If my robot were UR, there wasn't so much trouble.
#7
They all have their pros and cons.
The more I work with multiple brands, the harder it is for me to recommend one over the other.
They all have something, they all have something good, and they all have something bad.
It's a choose your poison type of situation.
But do I love that sweet robotics taste.

Jeremy
Find useful information about RoboDK and its features by visiting ourOnline Documentationand by watching tutorials on ourYoutube Channel.


#8
finally, I finished my project. I would like to share it with all the users who are trying to use FANUC robots for their job.

1. connect: find a CAT-5 wire to connect the computer and robots (located at the down side of the door of R-30iB.
2. IP setting:
2.1 set a IP for your computer ether net card (e.g. 192.168.1. 15). If you already have one, remember the network segment
2.2 set IP of FANUC robot, MENU->SETUP->HOST COMM and set the IP to ROBOT (e.g. 192.168.1.10). NO SPACES BEFORE DIGITS
2.3 then NEXT->INIT->YES->reboot
3. RoboDK connect:
3.1 preparation -
download FANUC driver from RoboDK website
make sure the FANUC robot has a "user socket messaging" installed
USB inserted in Teach Pendant
3.2 setting -
set device:
MENU->FILE->FILE, UTIL->SET DEVICE->USB on TP
show files:
select "*" mark on Teach Pendant
upload files:
select files(RDK_S3.PC, GO_MJ, GO_ML, GO_MC, GO_PROG) which downloaded from website, then press LOAD->YES on Teach Pendant
activate driver: (from instruction of RoboDK website)
Select Menu-(Next)-System-[TYPE]-Variables.
Select $HOSTS_CFG (holding shift while selecting key down will help you scroll down faster)
Select Number 3
Set $SERVER_PORT to 2000
($HOSTS_CFG[3].$SERVER_PORT = 2000)
Select Menu-Setup
Select [TYPE]-Host comm
Select [SHOW]-Servers
Select “S3”-Enter.
Set Protocol Name to SM
In Port Name, if multiple ports are available: Set Port to P3 (or the corresponding port).
Set Inactivity Timeout to 9999
Set Startup state to [CHOICE] START
Set Current state to STARTED:
To do so, select [ACTION]-DEFINE, then [ACTION]-START
Start RDK_S3 driver: (in manual mode, PRESS the DEADMAN SWITCH)
Select the Select button from the teach pendant.
Scroll down towards the DRIVERRDK_S3 program
Select Enter (button from the teach pendant)
Select Shift-Reset and Shift-Forward to start the program
if setting OK, will see the green sigh(BUSY and RUN) at the top-left of Teach Pendant

3.3 Run a program -
右键单击一个机器人模型RoboDK屏幕- - - >connect to robot
click connect should a green "ready" appears
right click a python program (e.g. Prog1)-> run on robot (you can also click "run python script to silulate)" and the robot should follow your program to move. (IF it moves but not according your direction, check the version of RoboDK driver)

EVERY TIME HAVE PROBLEM TO CONNECT ROBOT, TRY "FCN->ABORT ALL, SELECT RDK_S3->ENTER->DEADMAN+SHIFT+RESET->DEADMAN+SHIFT+FWD"
4. IO:
you can use both PLC and CRMA15/16 to connect to a peripheral device. CRMA15/16 is located at the down side of the door of R-30iB (on the side of the ether net cable connector), see the attached file of connect method
use a PLC is also a good solution (if you know how to set the prot. between PLC and ROBOT)
use setDO(I/O, 1/0) to control ON/OFF of your device
"DON'T WASTE TOO MUCH TIME ON CONTROLLING THE EE INTERFACE OF FANUC", I tried many methods and failed.
5. Move Robot:
#x_offset = forward (+ value) and back (- value)
#y_offset = left(+) and right (-)
#z_offset = up(+) and down(-)

def moverobot1(x_offset,y_offset,z_offset):
target_ref = robot.Pose()
pos_ref = target_ref.Pos()
robot_x = pos_ref[0]+x_offset
robot_y = pos_ref [1] + y_offset
robot_z = pos_ref[2]+z_offset
target_i = Mat(target_ref)
target_i.setPos([robot_x,robot_y,robot_z])
robot.MoveL(target_i)


# a_value = trun join axis 6 (+ = Counterclockwise, - = Clockwise)
# b_value = turn join axis 5 (+ = backward, - = forward)
# c_value = turn join axis 4 (when arm is toward to left, + = Counterclockwise, - = Clockwise)
def moverobotj(a_value,b_value,c_value):
target = robot.Pose()
xyzabc = Pose_2_KUKA(target)
x,y,z,a,b,c = xyzabc
xyzabc2 = [x,y,z,a+a_value,b+b_value,c+c_value]
target2 = KUKA_2_Pose(xyzabc2)
robot.MoveJ(target2)

hope it helps!
#9
(08-19-2021, 02:18 AM)timothy Wrote:finally, I finished my project. I would like to share it with all the users who are trying to use FANUC robots for their job.

1. connect: find a CAT-5 wire to connect the computer and robots (located at the down side of the door of R-30iB.
2. IP setting:
2.1 set a IP for your computer ether net card (e.g. 192.168.1. 15). If you already have one, remember the network segment
2.2 set IP of FANUC robot, MENU->SETUP->HOST COMM and set the IP to ROBOT (e.g. 192.168.1.10). NO SPACES BEFORE DIGITS
2.3 then NEXT->INIT->YES->reboot
3. RoboDK connect:
3.1 preparation -
download FANUC driver from RoboDK website
make sure the FANUC robot has a "user socket messaging" installed
USB inserted in Teach Pendant
3.2 setting -
set device:
MENU->FILE->FILE, UTIL->SET DEVICE->USB on TP
show files:
select "*" mark on Teach Pendant
upload files:
select files(RDK_S3.PC, GO_MJ, GO_ML, GO_MC, GO_PROG) which downloaded from website, then press LOAD->YES on Teach Pendant
activate driver: (from instruction of RoboDK website)
Select Menu-(Next)-System-[TYPE]-Variables.
Select $HOSTS_CFG (holding shift while selecting key down will help you scroll down faster)
Select Number 3
Set $SERVER_PORT to 2000
($HOSTS_CFG[3].$SERVER_PORT = 2000)
Select Menu-Setup
Select [TYPE]-Host comm
Select [SHOW]-Servers
Select “S3”-Enter.
Set Protocol Name to SM
In Port Name, if multiple ports are available: Set Port to P3 (or the corresponding port).
Set Inactivity Timeout to 9999
Set Startup state to [CHOICE] START
Set Current state to STARTED:
To do so, select [ACTION]-DEFINE, then [ACTION]-START
Start RDK_S3 driver: (in manual mode, PRESS the DEADMAN SWITCH)
Select the Select button from the teach pendant.
Scroll down towards the DRIVERRDK_S3 program
Select Enter (button from the teach pendant)
Select Shift-Reset and Shift-Forward to start the program
if setting OK, will see the green sigh(BUSY and RUN) at the top-left of Teach Pendant

3.3 Run a program -
右键单击一个机器人模型RoboDK屏幕- - - >connect to robot
click connect should a green "ready" appears
right click a python program (e.g. Prog1)-> run on robot (you can also click "run python script to silulate)" and the robot should follow your program to move. (IF it moves but not according your direction, check the version of RoboDK driver)

EVERY TIME HAVE PROBLEM TO CONNECT ROBOT, TRY "FCN->ABORT ALL, SELECT RDK_S3->ENTER->DEADMAN+SHIFT+RESET->DEADMAN+SHIFT+FWD"
4. IO:
you can use both PLC and CRMA15/16 to connect to a peripheral device. CRMA15/16 is located at the down side of the door of R-30iB (on the side of the ether net cable connector), see the attached file of connect method
use a PLC is also a good solution (if you know how to set the prot. between PLC and ROBOT)
use setDO(I/O, 1/0) to control ON/OFF of your device
"DON'T WASTE TOO MUCH TIME ON CONTROLLING THE EE INTERFACE OF FANUC", I tried many methods and failed.
5. Move Robot:
#x_offset = forward (+ value) and back (- value)
#y_offset = left(+) and right (-)
#z_offset = up(+) and down(-)

def moverobot1(x_offset,y_offset,z_offset):
target_ref = robot.Pose()
pos_ref = target_ref.Pos()
robot_x = pos_ref[0]+x_offset
robot_y = pos_ref [1] + y_offset
robot_z = pos_ref[2]+z_offset
target_i = Mat(target_ref)
target_i.setPos([robot_x,robot_y,robot_z])
robot.MoveL(target_i)


# a_value = trun join axis 6 (+ = Counterclockwise, - = Clockwise)
# b_value = turn join axis 5 (+ = backward, - = forward)
# c_value = turn join axis 4 (when arm is toward to left, + = Counterclockwise, - = Clockwise)
def moverobotj(a_value,b_value,c_value):
target = robot.Pose()
xyzabc = Pose_2_KUKA(target)
x,y,z,a,b,c = xyzabc
xyzabc2 = [x,y,z,a+a_value,b+b_value,c+c_value]
target2 = KUKA_2_Pose(xyzabc2)
robot.MoveJ(target2)

hope it helps!

Please have a look at this thread for controlling Fanuc EE from RoboDK//www.sinclairbody.com/forum/Thread-INTP-311...2#pid10122


Code:
robot.RunInstruction('HAND_OPEN', robolink.INSTRUCTION_CALL_PROGRAM)
#10
Hi torayeff, thank you very much for helping me to solve this problem. Now I know how to use the command "robot.RunInstruction", it's a great and convenient function. thanks again!




Users browsing this thread:
1 Guest(s)