July 23, 2019, 05:13:55 AM
Robotforum | Industrial Robots Community

 Mitsubishi Arm Robot communication with PC

normal_post Author Topic:  Mitsubishi Arm Robot communication with PC  (Read 2927 times)

0 Members and 1 Guest are viewing this topic.

October 18, 2016, 09:26:46 PM
Read 2927 times
Offline

Body


Hey Guys ! :D

am in deep shit right now :D , I hope someone would help me here

I am a college student, and am trying to perform an external realtime control on a "Mitsubishi RV2SDB" Arm robot based on a computer vision program running on a PC.

I knew from the manuals, and the German version of this forum that there are different ways for network communication with the robot:

1) TCP/IP Communication with Print/Input
2) TCP/IP Communication with R3-Protocoll
3) UDP realtime Communication with external C++ program

am working on the first and third option in parallel to have some redundancy on the options but neither work.... shit happens:D

I read that for data linking with the robot some parameters need to be set prior to the usage of OPEN command when using TCP/IP with Print/Input.. such as
(NETIP, NETMSK,NETPORT,COMDEV,CPRCE12 ,NETMODE ,NETHSTIP)

I grasped the idea of what should be the value of each parameter, but I have no idea how to set them on the program !!!

Is it NETIP = "192.168.0.10" or NETIP "192.168.0.10" or what????? and I did't find any code examples on how to configure these parameters.

I feel like it is a dumbass question but it is really a problem for me right now so go easy on me :D :D

Sorry for the intro but I hope it would be beneficial for anyone (if it were right of course :D ) and if it was wrong (probably yes :D) someone would guide me



Today at 05:13:55 AM
Reply #1

Advertisement

Guest

January 17, 2017, 12:20:22 AM
Reply #1
Offline

gabrielschubert


Hi Body,

My project was to find a way to control my robot using a machine with Linux. So, a friend sent to me a manual that I didn't find on the internet with a lot of commands that you can send to the robot controller, exemple: 1;1;RUN1A (run program 1A), or 1;1;STATE (get robot status). You can do this after setting a telnet connect with the robot controller.

I'm using Python to do the telnet connection, sending the commands and receiving the output. You can do something like this:

Code: [Select]

#!/usr/bin/env python3.4

#### IMPORTS ####
import socket, sys, time

#### OPTION MENU ####
def OptionMenu():
print ('\nPossible Options (Exemple: ./RobotCommands.py 1)')
print ('\n1 - Reset Alarm')
print ('2 - Get Errors\n')
#print ('2 - GET Speed')
#print ('3 - Change Speed (Put speed too, ex: ./RobotCommands 2 100')



#### RESET ALARM ####
def ResetAlarm(s):

commands=['1;1;RSTALRM']

for cmd in commands:

s.send(cmd.encode('utf-8'))
while True:
data = s.recv(4096)
if data:
print (data)
break

print('\nDONE!!!\n')


#### GET ERRORS ####
def GetErrors(s):

commands=['1;1;ERROR']

for cmd in commands:

s.send(cmd.encode('utf-8'))
while True:
data = s.recv(4096)
if data:
print (data.decode('utf-8'))
break

print('\nDONE!!!\n')



#### MAIN PROGRAM ####
if __name__ == "__main__":

if len(sys.argv)==1:
OptionMenu()
sys.exit()
   
else:
Function = float(sys.argv[1])

host = '192.0.0.0' # STRING!!! YOUR ROBOT CONTROLLER IP!!!!
port = 10001 # INT!!!         YOU CAN KEEP IT.

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(2)

# connect to remote host
try :
s.connect((host, port))
except :
print ('Unable to connect')
sys.exit()

print ('Connected to remote host')

socket_list = [sys.stdin, s]

if Function == 1:
ResetAlarm(s)

if Function == 2:
GetErrors(s)


I guess i'm not abble to post the manual with the commands here, 'cause of the Mitsubishi Rights. If you want, send me a private message with your email and I may send it to you.

Hope I've helped.

Regards,

Gabriel.

February 02, 2017, 05:25:07 AM
Reply #2
Offline

Body


thanks gabrielschubert I had found a way to access the robot parameters through RCI explorer in CIROS by absolute coincidence :D and communication was established
thanks again for your reply

February 16, 2017, 10:35:53 AM
Reply #3
Offline

AJ4


Hi, I have the (more or less) same problem: I'm developing a standalone controller for a RV2-FD and I need the manual you mentioned. Could you help me please?

Thank You!!!

September 24, 2018, 03:47:58 AM
Reply #4
Offline

NHaman


I would also love to get a copy of this manual.  Thank you.


Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter

xx
Mitsubishi Robot control with labview TCP/Ip communication

Started by tutu10 on Mitsubishi Robot Forum

0 Replies
436 Views
Last post December 20, 2018, 04:46:24 AM
by tutu10
question
NACHI WITH MITSUBISHI PLC. LOST COMMUNICATION

Started by Carlos Lopez OXM on Nachi Robots

1 Replies
1484 Views
Last post April 10, 2018, 11:19:50 AM
by BillPbody
clip
Mitsubishi Robot RV-2AJ

Started by srmrobotics on Used Robots and parts

0 Replies
1422 Views
Last post February 13, 2014, 11:24:12 AM
by srmrobotics
xx
The interface between Beckhoff PLC and Mitsubishi Robot controller

Started by Gregon on Mitsubishi Robot Forum

0 Replies
192 Views
Last post June 24, 2019, 10:57:15 AM
by Gregon