Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NACHi Post Format Error and Correction Example
#1
Hi all,

I need help modifying the post processor for a NACHi robot. I think I know what is happening.

This is related to other posts such as:
https://robodk.com/forum/Thread-Nachi-Ge...ight=Nachi

The suggestion to make the post processor to use the user coordinate system by
  1. Open the file: C:/RoboDK/Posts/OTC.py
  2. Comment the line self.REF_FRAME = pose (around line 260, just add the # character in front)
will produce the correct numerical values for the Cartesian coordinate in the post, but still with the wrong format.

I attached 3 zip files here for you to review:
1) the RoboDK file following the spray paint program from the tutorial (yes, I am still learning from those).
2) the post from RoboDK after commenting the line #260ish following instruction above to use user coordinate system. The main program 110 will call 111, 112, 113
3) the post I edited manually to get them working

Here is what I did:
1) Using the teach pendent, I added User Coordinate Frame 1 (same location as the work piece frame in RoboDK) to the robot controller, and also added Tool 1 geometry (same definition as in RoboDK).
2) In 110, before calling the subprogram, I inserted the line CHGCOORD 1 to use user coordinate frame 1. I inserted the line CHGCOORD 0 to user the robot base frame before ending the program. (It is probably a good idea insert these two lines in ALL subprogram though. CHGCOORD is fn113. It should be called before the move(s).)
3) Add a "U" to MOVEX lines. (Note: MOVEX M1J doesn't need it because it is joint move.) For example, in 111
before
MOVEX M1X,L,(222.258,199.775,333.893,0.000,-0.000,0.000),S=200.00,H=1,MS
after
MOVEX M1X,L,(222.258,199.775,333.893,0.000,-0.000,0.000)U,S=200.00,H=1,MS

Note the U after ')'

And that's how I get the program to work. I also compiled and ran these on FD on DESK II before i sent to the robot.

So, my question is: how do I modify the post processor to do these steps automatically?

Thanks!


Attached Files
.rdk   NACHi 1.rdk (Size: 1.78 MB / Downloads: 34)
.zip   RoboDK output edited.zip (Size: 1.75 KB / Downloads: 33)
.zip   RoboDK output.zip (Size: 1.73 KB / Downloads: 31)
#2
Thank you for your feedback. This helps us improve our default post processor for Nachi and OTC robots.

Taking a look at your modifications, I attached an updated post processor for OTC and Nachi robots to handle the following:
  1. Use the CHGCOORD with all set reference frame instructions: the id of the reference will be 0 by default if you don't use any numbered frames. However, you can add a number to your reference frame in RoboDK (for example, rename your reference to "workpiece 1" to generate "CHGCOORD 1").
  2. Add a U after the pose if you are using a numbered reference frame.
Let me know if this works better by default or you would like to see other changes.

Albert


Attached Files
.py   OTC.py (Size: 21.25 KB / Downloads: 34)
#3
Hi Albert,

I've tested out the new post processor. So far so good. : )

I promise I will learn Python next. I think I can get more out of RoboDK if I know it. (It is not hard. It is just time. : p)

Thanks!
  




Users browsing this thread:
1 Guest(s)