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

MRL - RunInstruction

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
It is not possible to execute generic/custom code instructions using the driver with all the drivers we support.

However, some drivers support custom instructions by calling the Driver parameter. Example:
robot.setParam("Driver", "your driver command")
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?
Our Mitsubishi driver supports sending custom Mitsubishi strings by using the "c " keyword.

robot.setParam("Driver", "c " + "custom Melfa command")
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.
Did you try adding the string "1;1;" before sending your commands to the Mitsubishi controller?
Can you try using the equal sign and/or adding a semicolon at the end of your command or in between?

This example overrides the speed:
1;1;JOVRD 50

And this example sets a digital output:
Let me know if it does not work.

I'm not sure what the 1;1 stands for but it is part of the protocol required by the robot controller and I see that it is added to the other commands, probably related to the number of lines sent. @Phillip may be able to provide more information in this regard.
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.
Could you try the string
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

Users browsing this thread:
1 Guest(s)