ATC Support

Here is where you can request new features or special features.

Re: ATC Support

Postby Spinweight » Wed Mar 06, 2019 4:58 pm

@CNCDrive
Could we see more examples of how the code could be modified?
For example If I could see the code used to control different types of systems I I could better understand how to control my setup.
My ATC carosel is on an arm that extends with pneumatic actuator. The arm has a DC motor with a planetary gear reduction then an NC rotary encoder indicating the output rotation once per revolution. The tool carousel advances one tool per on/off cycle of the encoder.
There is another NC encoder on the rotary table at zero.
Connected the sensors to input pins and the DC motor to a relay on 307 but I don't know how to start programming them into the M6 code.
If there was a library that included a few more examples of different styles ATC control it would be very educational.
Is there anyone that could help me with this coding?
Is there someone I could hire for a few hours coding work?
Spinweight
 
Posts: 6
Joined: Thu Jan 17, 2019 7:21 pm

Re: ATC Support

Postby Robertspark » Wed Mar 06, 2019 6:09 pm

There is a whole load of macros in the toolbox and macros section.
What do you have input and output wise and in what sequence do you require the operations to work?
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2110, Neuron Lite
UCCNC v1.2110 Macro Manual
Robertspark
 
Posts: 1347
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: ATC Support

Postby Vmax549 » Fri Mar 08, 2019 7:35 pm

UCCNC would be well served IF they added a simple ATC mode to control the tool table values.

[x] ATC Mode
[12] # of tool slots

When atc mode is selected UCCNC would use teh Slot# of the tool table as the actual tool# instead of the tool# in the table.

Call Tool #1 = Slot#1 = tool#10
Call Tool#2 = Slot#2 = tool#5
Call Tool #15 = Tool #15
etc
etc

This would allow you to select what tool# was used in each slot.

IF you called a tool higher that the number of slots then UCCNC would revert back to the tool# for the offset values and other values in the tool table.

Also you would need to be able to READ and Write to the tool table from the M6 macro script.

Just a thought, (;-) TP
Vmax549
 
Posts: 91
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: ATC Support

Postby ThreeDJ16 » Fri Mar 08, 2019 8:54 pm

Vmax549 wrote:UCCNC would be well served IF they added a simple ATC mode to control the tool table values.

[x] ATC Mode
[12] # of tool slots

When atc mode is selected UCCNC would use teh Slot# of the tool table as the actual tool# instead of the tool# in the table.

Call Tool #1 = Slot#1 = tool#10
Call Tool#2 = Slot#2 = tool#5
Call Tool #15 = Tool #15
etc
etc

This would allow you to select what tool# was used in each slot.

IF you called a tool higher that the number of slots then UCCNC would revert back to the tool# for the offset values and other values in the tool table.

Also you would need to be able to READ and Write to the tool table from the M6 macro script.

Just a thought, (;-) TP

Curious how it works now. The tool number is tied to a slot number and this information doesn't have the ability to be dynamically read/write from macros? If that's the case, what purpose does having a slot number on the tool table? This put some serious screws in my plans for a dual arm tool changing head for the carousel (or should say my buddies, as I'm thinking a single arm would be easier). But the tool to slot relationship would have to be changed during the macro in order for it to work. So as of now, macros don't allow slot/tool info to be changed?

Would be nice to see some more improvements in the ATC portion of UCCNC. I've never seen much use for the jog flyout, would love to see either probing here or an ATC function (change tool, current tool/set tool height to the table). I've modified ScreenSet 2017 which already shows current tool, change tool function and goto change tool position with another button to set tool height (thanks to Ger for the button and someone here who posted a tool measuring macro). But some of this seem like easy adds to the main screen just reducing some of the larger buttons. I'd be good seeing these on the flyout. Maybe probing for the flyout on the main screen and ATC flyout (current tool, change tool, set tool height, list of slots with current tools in them) on the tool tab.

Edit...ok, just realized there is only one flyout screen. Since the probe tab has so much info and abilities, maybe just ATC stuff on the flyout.

-=J
ThreeDJ16
 
Posts: 135
Joined: Tue Oct 31, 2017 5:57 pm

Re: ATC Support

Postby cncdrive » Fri Mar 08, 2019 9:50 pm

There are functions to read the current tool and the to be set tool etc., there are functions for that available for the macros. Check the example M6 macro to see...
In the few latest development releases you can also read the full extended tooltable datas into a struct and then you can work with the datas in your macro or in a plugin.
The associated function:

Function: Plugininterface.Datatypes.Tooltablestruct[] Gettooltabledata(void)
Description: The function returns an array of structures with all tools' tool table parameter values in the detailed tooltable.
Example: Plugininterface.Datatypes.Tooltablestruct[] Tdata = exec.Gettooltabledata();
MessageBox.Show(Tdata[1].Description); //Shows the Description parameter value of Tool#1
cncdrive
Site Admin
 
Posts: 2766
Joined: Tue Aug 12, 2014 11:17 pm

Re: ATC Support

Postby Vmax549 » Fri Mar 08, 2019 10:02 pm

I have tried that function and cannot get it to work as a macro V2109. The example code errors out. And I see no function to write to the tool table. I can only read and write to the pro file and then you cannot update the tooltable with the newest data. IF you try to save it overwrites the OLD data over the new data that you just updated in teh profile. Catch22 again.

Also the Macro manual does not have any info on those functions. OOPS My mistake there is info in the macro manual but the example does not work for me.

(;-) TP
Vmax549
 
Posts: 91
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: ATC Support

Postby Vmax549 » Fri Mar 08, 2019 10:57 pm

//Macro read tool table values
Plugininterface.Datatypes.Tooltablestruct[] Tdata = exec.Gettooltabledata();
MessageBox.Show(Tdata[1].Description); //Shows the Description parameter value of Tool#1



UCCNC macro compiler error log file
--------------------------------------
Last error dated: 3/8/2019 5:53:49 PM
In macro: M63456
--------------------------------------
CS0246 | in line: 11 | error text: The type or namespace name 'Plugininterface' could not be found (are you missing a using directive or an assembly reference?)
CS0012 | in line: 11 | error text: The type 'Plugininterface.Datatypes.Tooltablestruct' is defined in an assembly that is not referenced. You must add a reference to assembly 'Plugininterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
CS0029 | in line: 11 | error text: Cannot implicitly convert type 'Plugininterface.Datatypes.Tooltablestruct[]' to 'Plugininterface.Datatypes.Tooltablestruct[]'
--------------------------------------
Vmax549
 
Posts: 91
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: ATC Support

Postby cncdrive » Fri Mar 08, 2019 11:19 pm

Hi Terry,

Nice to see you.
I have just checked and you're right, I forgot to add the plugininterface.dll as reference into the macros and macroloops is why this does not work in macros now. :(
It only works in plugins as it is now, but I've made the correction now, so the function will work in macros and macroloops in the next release.
I've also updated the documentation so you will not have to look up the struct members in a plugin, but you can simply check the documentation to see what are the available structure names.
The data writting is a bit more complicated, I do not have time to develop that now, but will get back to that later.

Here is the updated documentation as how it will be in the next release:

Code: Select all
Function: Plugininterface.Datatypes.Tooltablestruct[] Gettooltabledata(void)
Description: The function returns an array of structures with all tools' tool table parameter values in the detailed tooltable.
The Plugininterface.Datatypes.Layerdatastruct structure available members are the followings:
public struct Tooltablestruct
{
    public int Toolnumber;
    public int Slot;
    public double OffsetZ;
    public double Dia;
    public string Description;
    public string Type;
    public string Material;
}
Example: Plugininterface.Datatypes.Tooltablestruct[] Tdata = exec.Gettooltabledata();
                 MessageBox.Show(Tdata[1].Description); //Shows the Description parameter value of Tool#1
cncdrive
Site Admin
 
Posts: 2766
Joined: Tue Aug 12, 2014 11:17 pm

Re: ATC Support

Postby Vmax549 » Sat Mar 09, 2019 12:18 am

Hi Balazs, Being able to read teh table is nice BUT what is really needed is teh function to control slot# verses Tool #. Otherewise everytime you reload the tool changer you have to manual rewrite all the current tool data and then save all.

I have a routine that lets you retreive teh Slot# reference and to what tool # it is assigned to BUT there is no way for UCCNC to call a tool# based on teh slot#reference. You can only call teh H word and D word and those are based on Tool# not slot#.

It seems it would NOT be that hard to be able to redirect teh Tool# based on a slot#.

But that is just my findings working with ATCs and UCCNC.

All modern controllers seem to use teh direct table method and can use slot#s to represent tool#s.

(;-) TP
Vmax549
 
Posts: 91
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Previous

Return to Feature Request

Who is online

Users browsing this forum: No registered users and 2 guests