Automating Robot Plugin

Automating Robot Plugin

adrian.motea
Enthusiast Enthusiast
1,117 Views
5 Replies
Message 1 of 6

Automating Robot Plugin

adrian.motea
Enthusiast
Enthusiast

Hi,

is it possible to automate some of the functions of robot plugin?
For example I would like to save the simulation file automatically and add it to the NC program and finally create the post processor.

Since in the command echo there's no output of the command that the plugin executes. I wonder if it is possibile through a plugin - plugin communication (from my plugin to robot plugin).

 

Thank you

0 Likes
Accepted solutions (1)
1,118 Views
5 Replies
Replies (5)
Message 2 of 6

minh.lenhat
Enthusiast
Enthusiast

Hi @adrian.motea 

 

The easiest way is you record a macro with all your steps : save the simulation file automatically and add it to the NC program and finally create the post processor.

Just give this a try then we can discuss further.

 

Minh

 

Le Nhat Minh
Senior Manufacturing Consultant
OneCAD Viet Nam Co., Ltd
Process Manufacturing
0 Likes
Message 3 of 6

alexandre.pintoAGNAU
Alumni
Alumni
Accepted solution

hi @adrian.motea 

 

PowerMill Robot has 4 tabs or main menus, from these:

Robot library, Robot cell and Robot control can be replicated my macro. So in order to automate best way to see what internal PM commands are used is to record macro and click one button only at a time ! The functionality available in these menus can be replicated via custom macro.


The only menu that cannot be replicated via macro is the Robot Program, this functionality can only be replicated using a custom written plugin that used the available PowerMill DLL to post process.
Unfortunately there is no other way.

 

I hope this helps.

 



Alexandre Pinto
Process Specialist
0 Likes
Message 4 of 6

adrian.motea
Enthusiast
Enthusiast

Hi, i actualy tryed simulation tab also( where you simulate and save the toolpath for the robot) and found out that the save button cannot be automated.

Had response also from ticket i had opened, and it seems that neither through internal communication it can be achieved.

 

I hope all plugin commands will be available for automation soon.

 

Thanks all for reply.

0 Likes
Message 5 of 6

alexandre.pintoAGNAU
Alumni
Alumni

Hi @adrian.motea 

 

You can automate saving a simulation file !! As I said, most things on the first 3 tabs can be automated.

Not sure how you did not manage, but here are the steps:

 

- have a toolpath active

- start recording a macro

- attach to start (using PM Robot command)

- play (using PM Robot command)

- save simulation (using PM Robot command)

- stop recording macro

 

If you run the macro the macro will replicate the saving of the simulation file. Main issue is by default PM saves it in a temporary location, but you can edit this to save where you want (see my macro save.mac).

 

note:
the robsim file created via automation lacks the header, compare with the simulation file created via PM Robot plugin and you will see the difference. The plugin saves quite a lot of commands, attached 2 macros, original and save (cleaned up).

Update lines 1 and 3 to run on your machine.

 

I hope this helps. 



Alexandre Pinto
Process Specialist
0 Likes
Message 6 of 6

brian.newell2U78V
Contributor
Contributor

I've tried the process suggested by Alexandre and had limited results. I am able to record Robsim files, but when I try to load them into the Robot Program window and write a "robot NC program" I get the error message "Impossible to extract the PowerMill tool length to use with the spindle calibration. No parent toolpath has been found for the simulation '(simulation name here)' ." I've also noticed that the RobotInterface.priproj file is not being populated with <Simulations> like it would normally be. I don't know if that's related. The bit of code I'm using to record my toolpaths is this: 

 

                activate toolpath $item
                simulate toolpath $item
                simulate record on $robSimPath 
                simulate display clear
                simulate play
                simulate record off
                simulate apply orientations
                simulate jog rtcp none
                string cmd = "plugin {6F69BD81-0AB0-4F66-AB2D-6291CC0BCCE0} RobSim=" + " " + $robSimPath
                docommand $cmd
                simulate trace clear
 
Can anyone help me get this working? Thanks 
0 Likes