Toolchanger Support

This is where you talk about Plugins. How they are made and how they work, show examples.

Toolchanger Support

Postby SantaCruzEngrg » Wed May 03, 2017 2:48 am

Where can I find information on how to support a toolchanger with UCCNC? Doing a c# plug-in is no problem, but I do need a starting point as to how UCCNC supports ATCs.

Regards,
Ray L.
SantaCruzEngrg
 
Posts: 8
Joined: Wed May 03, 2017 2:45 am

Re: Toolchanger Support

Postby cncdrive » Wed May 03, 2017 8:43 am

Ray,

One thing to do is check the example M6 macro in the Profiles/macro... folder.
The example is an M6 macro for a linear toolchanger and it can be used as a start point for implementing different types and custom toolchangers.

Check the UCCNC/documentation folder, you can find informations about the available macro functions, button codes, LEd codes, DRO codes etc.
Check Robert's manual: https://drive.google.com/drive/folders/ ... kdfQWRaYTg

And in case you want to write a plugin then I advice you to study the Plugins/Example folder. There are C# and VB plugin examples/templates.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Toolchanger Support

Postby ger21 » Wed May 03, 2017 10:27 am

Ray, you'll find that the C# macros in UCCNC are very similar to Mach3's VB macros.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: Toolchanger Support

Postby SantaCruzEngrg » Wed May 03, 2017 2:10 pm

So.... It appears to me the bare minimum could be done using a simple M6 macro. Taking it a step further, a plug-in could be done, with the M6 macro simply invoking the Informplugin_event() . Does that sound right?

Given that macros and plug-ins are simply c# code, are there limitations on what they can do? The ATC can be communicated with via Serial, USB, or Ethernet, with Ethernet being my preference. Is there any problem with using sockets within the M6 macro - create the socket, command the toolchange, wait for completion, close the socket?

Regards,
Ray L.
SantaCruzEngrg
 
Posts: 8
Joined: Wed May 03, 2017 2:45 am

Re: Toolchanger Support

Postby SantaCruzEngrg » Wed May 03, 2017 2:11 pm

Vmax549 wrote:Hi Ray I can send you a working example of a carrosel type tool changer routine if you need it. Not fancy but it works every day.

(;-) TP



Terry,

That would be helpful. Thanks!

Good to see you're still out there! :-)

Regards,
Ray L.
SantaCruzEngrg
 
Posts: 8
Joined: Wed May 03, 2017 2:45 am

Re: Toolchanger Support

Postby cncdrive » Wed May 03, 2017 2:45 pm

Yes, you could invoke the plugins and then your plugin could catch your package and could use it and could do it's thing and return the control when finished to let the UCCNC countinue the other codes execution.
So, you are right, this way you could handle even the whole tool change procedure in a plugin instead of a macro. The M6 macro would be only the "glue".
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Toolchanger Support

Postby SantaCruzEngrg » Wed May 03, 2017 3:16 pm

cncdrive wrote:Yes, you could invoke the plugins and then your plugin could catch your package and could use it and could do it's thing and return the control when finished to let the UCCNC countinue the other codes execution.
So, you are right, this way you could handle even the whole tool change procedure in a plugin instead of a macro. The M6 macro would be only the "glue".


Excellent! Sounds pretty straight-forward.

I have not yet looked at the screen editor part, but I assume there is no problem with adding a button that would pop up a dialog to allow editing a logical-to-physical tool map for the ATC?

Regards,
Ray L.
SantaCruzEngrg
 
Posts: 8
Joined: Wed May 03, 2017 2:45 am

Re: Toolchanger Support

Postby cncdrive » Wed May 03, 2017 4:06 pm

Yes, it's ofcourse possible.
The button codes 20000 to 21999 call the same macro number directly when the button is pressed.
And then you can code the dialog in the macro.
You can also create Forms in the macro and can handle the Form events after the #Events keyword in the macro file.
Or you can call your plugin and handle the rest in the plugin.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Toolchanger Support

Postby SantaCruzEngrg » Wed May 03, 2017 4:24 pm

cncdrive wrote:Yes, it's ofcourse possible.
The button codes 20000 to 21999 call the same macro number directly when the button is pressed.
And then you can code the dialog in the macro.
You can also create Forms in the macro and can handle the Form events after the #Events keyword in the macro file.
Or you can call your plugin and handle the rest in the plugin.


Great! Should be easier than I expected! Thanks!

Regards,
Ray L.
SantaCruzEngrg
 
Posts: 8
Joined: Wed May 03, 2017 2:45 am


Return to Plugins

Who is online

Users browsing this forum: No registered users and 3 guests