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

Python API SetMachiningParameters not recognizing all object edges

#1
Hello,

I have a .dxf file placed on a flat surface and my goal is to get the robot to essentially trace this dxf. 
Its a fairly complicated dxf but my path works perfectly when I manually select every curve by hand using the select curve features in the curve follow menu.

However, I want to automate the dxf placement and curve selection process so when I choose a different dxf, I can simply run my python file and have a robot program ready. I can already get python to place the DXF where I want it, but when i use the  SetMachiningParameters() function, it only recognizes and selects one of the many curves. 

Is anyone able to help me find out why this may be? Ill attach an image of the curve it does pick up and ones it misses, as well as the code I'm using.


Attached Files
.png   Code.png (Size: 25.27 KB / Downloads: 23)
.png   PathSelection.png (Size: 154.11 KB / Downloads: 26)
#2
Can you send us your RoboDK project file? We may be able to help you better.
#3
I've attached the .rdk file but I cant add the dxf. The code requires the dxf to be titled SmpeExport.dxf and for some reason the first time the code is run it does not complete, but the second time it does (this is a separate issue).

You'll have to add your own dxf with multiple curves to see the issue I'm encountering.


Attached Files
.rdk   SampleDXFDraw.rdk (Size: 427.59 KB / Downloads: 18)
#4
When using the setMachiningParameters function with an object/part that contains curves like DXF, RoboDK will try to extract the first closed contour only by default. You can change this default behavior by passing this string as parameters: ReorderAuto=0. This will take all the curves without exception in the same order they were defined.

Example:
Code:
curve_proj = RDK.AddMachiningProject("CurveFollow Settings")
curve_proj.setMachiningParameters(part=dxf_obj, params="ReorderAuto=0")
I'm sorry for the delays getting back to you on this request.
#5
I appreciate the help. Will try it and get back to you.
#6
The fix you suggested worked great! However, I'm now running into a new issue. When I try to generate a program with it, the .ls file generates just fine, but when it tries to run the maketp.exe file from roboguide, it says that "The Virtual Location Folder is currently in use". I've used setrobot.exe and created the robot.ini file. Everything is in its default file location and I've tried to add/edit the postprocessor to no avail.

I have successfully created .tp files from RoboDK before so I'm not sure whats up, and I can't find any documentation on this issue either. Any help would be appreciated
#7
I'm not sure what this error means but I assume the required files or folder for compilation are being used by another process. Do you have Fanuc Roboguide open? Or did you open it but it was not properly closed? I would try rebooting the computer and generating the program from RoboDK after restarting without opening any other software that could be using Fanuc Roboguide.

The command to convert LS files to TP files is quite simple and you could test with a simple BAT file. For example:
Code:
maketp.exe "path-to-tp.ls" "path-to-ls.ls"
pause
You can optionally pass the /config parameter to the robot.ini file which is what the post processor does around line 800.
  




Users browsing this thread:
1 Guest(s)