Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using M_RunCode(n) instructions
#1
Hello,


I’m actually working on the Wire Arc Additive Manufacturing (WAAM) process and I’m using a Yaskawa ES200D robot with a welding station.

I would like to use the instructions M3 and M8 of my G-Code generated for a 3-axis CNC by Autodesk Powermill in order to control the power of the welding like this :

-M3 and M8 activated : high power welding
-M3 activated and M8 disabled : low power welding
-M3 disabled : no welding

I’m actually trying to modify the postprocessor Motoman by integrating an M_RunCode(n) method, but for the moment nothing is displayed in the robot code. You can see in the attachment what I did now. For the moment I’m displaying commentaries in order to understand the code of the postprocessor.

Can I have some help in order to fix my problem ? Thank you very much for your answer.

Best regards,

Maximilien Schneider
#2
Hi Max,

I think you forgot to attach your file.

But theoretically, if you have M code in your G-Code, it should automatically generate a M_RunCode(n) program call.
You can then create a M_RunCode subprogram on your controller that will catch the "n" value a take action according to the received value.
If you can also attach the .rdk station, that would help.

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


#3
Hello,

Thank you for your answer.

I will send you my .rdk file and a picture of what I did on the postprocessor.

I would like also to ask you how to control the I/O of the Yaskawa robot, in order to control a welding station.

I'm also sorry for the late reply.

Best regards,

Schneider maximilien


Attached Files Thumbnail(s)


.rdk Station Yaskawa.rdk(Size: 1.14 MB / Downloads: 319)
#4
Bonjour Max,

In fact, you should do the change in "def RunCode" section of the post-processor.

It should look a bit like that:


Code:
def RunCode(self, code, is_function_call = False):
"""Adds code or a function call"""
if is_function_call:

if code.lower().startswith("m_runcode"):
if not code.endswith(')'):
code = code + ')'
如果代码[10]= " 1 ":
#addline to activate your thing
elif code[10] = "2":
#addline to activate other thing
return

Bonne fin de journée.
Jérémy
Find useful information about RoboDK and its features by visiting ourOnline Documentationand by watching tutorials on ourYoutube Channel.






Users browsing this thread:
1 Guest(s)