Posts: 16
Threads: 3
Joined: Oct 2023
Reputation:
0
Hi,
is there a way to insert a raw code into automatically generated program MRL when using run on robot function? Like the way RunInstruction command is used, but to insert the code into the MRL program.
Best Regards
Konrad
Posts: 16
Threads: 3
Joined: Oct 2023
Reputation:
0
Thank you for a quick reply. I was afraid that could be the case. I needed that to send open and close hand command on mitsubishi robot. Is there any other way I could do that?
Posts: 16
Threads: 3
Joined: Oct 2023
Reputation:
0
I tried to run HClose 1 command using this method, but it doesn't seem to work. I've noticed that the SRVOFF and SRVON are actual parameters, but HClose isn't. It's a melfa command. The SRVON doesn't work reliable either. When I run SRVOFF command and then try to run hclose command, the SRVON doesn't work anymore, but SRVOFF still does. I can turn the servo back on using the operation panel, but not the command. I can still turn it off through the command. SRVON seems to be working only shortly after restarting the driver. I have tried sending the melfa command through python like this: robot.setParam("Driver", "c " + "HClose 1")
and this: robot.setParam("Driver", "c " + "HCLOSE 1").
I've also tried running it this way:
robot.setParam("Driver", "c " + "1;1;HCLOSE 1").
None of these close the hand. What is the "1;1;" responsible for?
robot.setParam("Driver", "c " + "1;1;SRVOFF") works.
Posts: 16
Threads: 3
Joined: Oct 2023
Reputation:
0
I am still unable to open and close the hand. As advised I've tried adding both semicolon and equal sign, but with no success. I've also tried using the JOVRD command, but it doesn't seem to work for me either.
Posts: 74
Threads: 0
Joined: May 2019
Reputation:
7
Could you try the string
M_OUT(5)=1
Replacing with your IO and 1 with 0 if applicable so something like
robot.setParam("Driver", "c " + "1;1;M_OUT(5)=1") should works