GearHeads Corner

General Category => Auggie: Augmented Machine Controller => Topic started by: Cyrille on February 11, 2019, 04:04:26 AM



Title: Trying to setup Auggie on cnc machine
Post by: Cyrille on February 11, 2019, 04:04:26 AM
Hello,

I am new to the cnc world, and to Auggie.
I have a cnc machine that I am trying to convert to pokeys57c nc/Auggie... But I am kind of lost :)

First, I wanted to know, how do I configure the Auggie screen? The base screen has a LOT of things that I do not want/need, but also is missing the spindle control. I tried opening the .screen file, assuming that it would be some type of scropt, but althrough there is some text there, it seems to be mostly binary. How does one go aroud customizi ng/creating a home screen?

Cyrille


Title: Re: Trying to setup Auggie on cnc machine
Post by: Cyrille on February 11, 2019, 08:42:14 AM
hello,

I have found the screen editing function, so i am working through that!

Any tips/tricks?

Cyrille


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 11, 2019, 09:09:12 PM
Hi Cyrille:

   Make sure you watch the videos. They explain a lot. But , basically, here is how it works.

 First, there are screens and panels. Screens can have controls and/or panels on them. Several panel types
are stored and you can create as many as you like. I suggest you start the edit on the screen, see how
many panels are there. Now just open one of the panels, it will fill your screen and you can see how
its made up of simple controls. Controls can have Variable names or scripts attached to them. I dont
recommend scripts, I reocmmend instead you simple give a unique variable name to any controls you
put on a panel. For example if youd like a spindle panel to replace my laser panel, Create a spindle panel
on the screen and add what controls you figure you need. Give them variable names, with decoratio ns
to show their your panel. Names like  SpindlePa nelSpeed and SpindlePa nelOverri de for DRO's for example.

  Replace the laser panel with the new panel on your screen and then all thats needed is scripts in the
library for each control to tell it what to do when used. Worry first about changing the panels to suit yourself
and setting variable names ot the controls on the panels. Then let me know that your there and
I can show you how to hook each control to a script at that point.

Art


Title: Re: Trying to setup Auggie on cnc machine
Post by: Cyrille on February 12, 2019, 08:44:30 AM
Hello,

Thanks for the info/help.

I started creating the screen that I wanted (Basically a super simple 4 axis coordinat e display/control + Jog + spindle speed control + GCode executer).

See attached screen shot.

Now, I need to make the button do things: ie: script the thing! Here is a list of what I need to achieve:
1: have X/Y/Z/A number pannels display the actual coordinat es for the 4 axis coordinat es
2: when I click on Home X/Y/Z/A, have the CNC go to home for the given axis
2.1: when I click on the HomeXY, have the CNC go to home for these 2 axis simultane ously
3: when I click on 0X/Y/Z/A change the current coordinat e so that this is the 0
4: when I click on SetX/Y/Z/A change the current coordinat e so that this is the coordinat e written by the user in the DRO panel
5: when I click on goto, go to the coordinat e specified in the DRO panels
6: make X/Y/Z/A jog button move the machine
7: when I click on the jog enable/disable button, enable/disable the jog buttons
8: make the spindle speed DRO display the programme d spindle speed
9: when I click on Enable on the Spindle, start the spindle at the speed entered in the spindle DRO panel
10: make the load g code button open a GCode file and load it in the GCode panel
11: make the G code run, stop and continue button work



Some questions .
- Are the coordinat es something which is internal to Auggie, or something that is known by the pokeys? is pokeys coordinat e aware, or just a pulse engine that gets told by Auggie to pulse one way or another?
- What did you program Auggie with? It does not look like QT, but it does not look like a visual studio C++ program either. Delphi? but which version?


I do not know how much time you have invested in created Auggie, but it is a tremendou s amount of work that you have done here and I am very thankful of your work here!
Cyrille



Some issues/frustrations that I found while working with Auggie:
1) When I click on configura tion/screen tools, save, cancel -> I get a message box dialog saying "screen saved!"
2) Why does the app go to full screen when saving screens? This is VERY frustrati ng for me I have a large screen and work with windows that are normally not full screen. This behavior forces resize all the time and keeps messing up things for me (see screen shot). Is there a reason why Auggie tries to maximize itself?
3) "Space evenly" option does not seem to work well when the items have different sizes. Try with 3 buttons, 1 small, 1 large, 1 small. space evently to see what I mean.
4) The "Screen tool" drop down is only active on the down arrow. Clicking on the "Screen tool" text closes the menu...



Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 12, 2019, 09:52:34 AM
Cyrille:


   Looks like a good start.

>>See attached screen shot.

Now, I need to make the button do things: ie: script the thing! Here is a list of what I need to achieve:
1: have X/Y/Z/A number panels display the actual coordinat es for the 4 axis coordinat es

>> If you load the 4axis panel as a panel in editing, and then right click one of the DRO's for
its propertie s, you'll see the first one has a variable name of Axis0CurP os, the next (y) has
a variable name of Axis1CurP os. These are internal variable matches so the system knows what to
put. You can use AxisnInde x or AxisnMaxV el or AxisnHome d and many others. The best way to find them
is to load a panel that has a control you wish to emulate and copy its variable name.

  Each control in a panel or on the screen may also have a script attached. I do not recommend that usage,
it was an early invention and I later decided variable names are the easiest way to make a screen.
If the system doesnt have an internal match for the variable name you enter, it will look in the
general libraries to see if one exists. So generally give all DRO's Buttons etc.. a variable name,
you can then script them in many ways. A single variable name may be used on many items.
 For example, you can have a button , DRO and LED all named Axis0CurP os. The DRO will show
in units the position, the LED will light up if not zero position, and the button will set current position
to a zero or 1 when pressed, depending on its toggle setting. (Thats silly of course, but its
important to understan d any control may share a variable.

 A variable name also can be scripted by simply adding a script of its name
in the general libraries . If a button named CurPos as a variable name is pressed, it will change
its value as a variable, and then call any script of its name. You can use GlobalSet( "MyVar" , 1) to set
a button from a script for example. Be carefull of looping where a button calls a script that sets that
button which then calls that script..e ct... :)

  So if the system knows the variable, it will handle it, if not, its expected you will from
a script.

   All the rest of the questions have the same answer, simply copy the original screens variable names.


>>Some questions .
>>- Are the coordinat es something which is internal to Auggie, or something that is known by the pokeys? is pokeys >>coordinat e aware, or just a pulse engine that gets told by Auggie to pulse one way or another?

  Auggie takes care of coordinat es, the Pokeys uses step counts only.

>>- What did you program Auggie with? It does not look like QT, but it does not look like a visual studio C++ program >>either. Delphi? but which version?

  Auggie is entirely in C++ using visual studio. Its strange look derives from the screen editing it uses, which though
a bit raw, is pretty powerful. I only had a year I wanted to devote to Auggie so the Screen editor was the first 3 months. :)


>>I do not know how much time you have invested in created Auggie, but it is a tremendou s amount of work that you have done here and I am very thankful of your work here!

   About a year originall y, a few months since I guess. I use it alot, I know its a bit raw in spots, but as a hobby
program thats  free its a tremendou s value. lol..

 I agree with your frustrati ons in screen editing, I use a 43" monitor here, so you can imagine how big
it looks, but the  screen editor is way overly complex, It does things Windows fights against so its
pretty complex to get it so the screen is fully zoomable to any size with all those controls. Not my
finest work but I was in a hurry.  Each control is a very smart item, knows about scripting and such
and how to occupy space.. (what was I thinking. ..)  :)
 

Art
 


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 12, 2019, 11:25:39 AM
Cyrille:

   On other thing worth mentionin g. It may be easier for you to simply modify my screens.
You can simply delete the items you dont need, and change the purpose of others. For
LaserOn for example, you can change to SpindleOn as text and change the variable
name as well. At least at the end of that exercise the screen will mainly work, and youll
only need to write scripts for the ones that dont...

Art
 


Title: Re: Trying to setup Auggie on cnc machine
Post by: Cyrille on February 12, 2019, 11:46:56 AM
Hello,

I am not in front of my computer at the moment, so I can not test, but let me make sure I understan d:
>> right click one of the DRO's for its propertie s, you'll see the first one has a variable name of Axis0CurP os
>> These are internal variable matches so the system knows what to put.
Is this a one or a two way link?
Meaning, the DRO will display the value of the variable, but if the user changes the value in the DRO, does the value in the variable change?

This also explains why they are so few scripts attached with the default screen. I was trying to find the scripts there to copy/reuse, and could not find them :-)

Thanks,
Cyrille


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 12, 2019, 01:14:59 PM
Cyrille:

  Yes, for most things. DRO's when attached to a variable will change that variable if a number is entered, or
show the number normally. A button will change a variable to a 1 when pressed and to 0 when released. (Except
when set to toggle). An led will light up if its var is above zero. It cant set anything.

  If a DRO is set to the motor index, changing it will probably do nothing. But if set to a curpos variable, typing into
that dro would set the work offset appropria tely to create that dro reading. If set to machine coordinat es I
dont think anything other than homing will change them. So it is condition al, but for the most part
a button,dro or led will reflect the value of the variable attached to it even it is a variable
name made up by you. Pressing a button with a variable name of  KillTheWo rld will set a variable named KillTheWo rld
to 1 while pressed, and will call a script named KillTheWo rld( state ) with state set to 1 or 0. (depending on
button settings.). The button may be pressed by script by calling  GlobalSet( "KillTheWo rld",1) and that call
will then also make the script KillTheWo rld(state) get called.

  For most screen items you need only set the variable name as Ive already made the internals work,
and if I haven't you need only add a pokeys command to a script to set pins and such.

  Feel free to yell when confused. .

Art







Title: Re: Trying to setup Auggie on cnc machine
Post by: Cyrille on February 12, 2019, 03:00:36 PM
Hello,

OK, so my original idea to let the user use the RDO pannels both for a "set" and a goto will not work. No problem here, I will change the UI as needed.

How do I tell the system to "go" to coordinat es?

Cyrille


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 12, 2019, 05:27:24 PM
You can use a FeedTo(...) script call.

  So if you drop a DRO and give it a variable name of  MyGotoXCo ord for example,
you would then have a button variable named MyGotoBut ton.

  You then add a script to the Gcode library called

global function MyGotoBut ton( state )
{
    x = GlobalGet("MyGotoXCo ord");
    y= ...
    ..
    Engine.Fe edto( x,y,.... )
}

    Id have to check the syntax, but thats generally how a Goto Button would be added with DRO's to set where
its going..

Art


Title: Re: Trying to setup Auggie on cnc machine
Post by: Cyrille on February 13, 2019, 01:45:23 AM
Hello,

Thank you makes sense...

I came up with a couple of questions during the night, mostly generic cnc ones, showing how much of a newbie I am.

1: Machine vs job coordinat es. am I correct in assuming that machine coordinat es are absolutes, and normally never changing coordinat es, which might be used to implement soft limiots, while job coordinat es allow you, for example, to place a smaller job in the middle of your machine and "temporary" (for the duration of the job) redefine the 0,0?

2: pulse generatio n. I am kind of shocked to learn that you send pulses to pokeys, I assumed that it would be able to generate the pulses forms directly from "move" commands, thus reducing greately the need for high bandwidth, high quality data channels. Does Auggie also need to handle accelerat ions/decelerations?

3: How do i create a "find probe" button to "zero" the z axis with the probe?

I will keep you informed of my progresse s.
Thanks,
Cyrille


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 13, 2019, 07:47:03 AM
 

Hi C:

I came up with a couple of questions during the night, mostly generic cnc ones, showing how much of a newbie I am.

 >> OK, shoot! :)

1: Machine vs job coordinat es. am I correct in assuming that machine coordinat es are absolutes, and normally never changing coordinat es, which might be used to implement soft limiots, while job coordinat es allow you, for example, to place a smaller job in the middle of your machine and "temporary" (for the duration of the job) redefine the 0,0?

 >> Yes, machine coordinat es are zeroed after a home, they never change after that.The normal view is of the "work"
coordinat es which have a fixture offset applied. When you press ZERO you are generatin g a fixture offset the inverse
of machine coordinat es that will then show you zero's. There are 255 fixture offsets, but typically you use only the one
in effect by default.

2: pulse generatio n. I am kind of shocked to learn that you send pulses to pokeys, I assumed that it would be able to generate the pulses forms directly from "move" commands, thus reducing greately the need for high bandwidth, high quality data channels. Does Auggie also need to handle accelerat ions/decelerations?

>> I dont send pulses, I send the number of steps to take in the next 1ms. I queue these up from a
trajector y planner programme d into Auggie. Move commands cannot blend if simply sent to a device.
 Auggies trajector y planner is a 4 axis 6th order planner , in fact Auggie has 2 of them running at the
same time and allows one to drive 8 axis in total as 2 groups of 4 axis, or one group of 4 and 4 indivudua l
axis with motion or constant speed. All accelerat ions and decelerat ions are dealt with in Auggie using
whatever you have set as a jerk limit. (Ideally you should set your accelerat ion very high on the motors
and then set a high JERK Limit, and then reduce the Jerk limit for proper operation when tuning the
motors. This is quite different to Mach3 or 4, but a jerk reduction planner works quite different ly
in general. So in general Auggie is sending at a minimum 1000 motion commands per second and is
sending them even when your not in motion as a move of zero steps in the next milliseco nd.

3: How do i create a "find probe" button to "zero" the z axis with the probe?

  You cannot. I never turned on Probing in Auggie as I had no use of it. You are the second to ask for it,
I may add it one day, but its a lot of work if so far only 2 require it. I continue to evaluate that one.

Art


Title: Re: Trying to setup Auggie on cnc machine
Post by: Cyrille on February 13, 2019, 08:25:54 AM
Hello,

>3: How do i create a "find probe" button to "zero" the z axis with the probe?
>  You cannot. I never turned on Probing in Auggie as I had no use of it.

Ha, now, this is a quite a problem for me as "zeroing" the Z axis is quite an important operation on a cnc machine.. .
I assumed that you had to use something similar to tune the "focus" for the laser. How do you set the laser distance/height in your use case scenarios?

Cyrille


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 13, 2019, 09:00:13 AM
Cyrille:

    I use the same technique I used in Mach3 on my router. I slow down the jog to
ridiculou sly slow and jog the Z down till it just touches. For the laser I use a block
and jog down till I can feel its a tight fit.

   There are times I want to move exactly a set distance, like say .1mm on my Z,
so for that I zero the dros', enter .1 in the Z, and then hit GotoZero.

  It wouldn't be too hard to make a panel that moves a set distance each press of a button,
OR to make a button that moves Z a set distance each press. I didnt turn on a probe
because I had no use for it. I do have a probe on my Mach3 driven Mill, but to be honest I
never use it, preferrin g instead to use jog for my zeroing.

   If I hear of many people wanting a probe I will look at turning it on, but its more complex
 than one would think as I have to do it in the context of asking the pokeys to stop when it
sees the trigger of the probe and then reorient Auggie to that point in coordinat e space. 
Its doable , just complex.  Probing is one of those things I found only like 1% of cnc
users used from my experienc e in Mach3. So, like G42 it doesn't exist in Auggie. One
of the design considera tions in Auggie was to do away with what most didn't use, to make
it a more basic CNC driver. It can be argued each way whether that was right or wrong
in hindsight . :) I figured it would make the program less complex and easier to debug and
control.  Turns out Auggie is a bit more complex than Mach3 in those terms.. go figure,
sometimes the road to hell is paved with good intention s.

   That having been said, I use Auggie a fair bit and I find theres always a way to do
 what I need. I use Mach3 a fair bit as well on my router table, but Auggie controls
two of my lasers. 

  Now if probing is important for zeroing, you may want to do it by adding 3 or
4 buttons, one with an end script calling for something like Engine.Fe ed( , , -5 );
to feed the Z down -5mm, another for -2, -1 and -.1 or even -.05 Then press the appropria te
buttons till a touchplat e is touched. Its the oldschool way of touching off.

Art
 


Title: Re: Trying to setup Auggie on cnc machine
Post by: Cyrille on February 13, 2019, 09:41:14 AM
Hello,

Maybe "probing" is not the right word to use as it seems to have another meaning in cnc world...

Pokeys has digital inputs. Is it possible to "read" these inputs from Auggie? You seem to be able to read at least some of the inputs (limits comes to mind...)

Could I use this to create a script that just goes down (slowly) until such input goes high?

while (digital_i nput_off)
{
  FeedTo(current_x, current_y, current_z+0.01mm);
}


Alternati vely, Could I wire my "z0" probe to the z limit + and do a move until it reaches the limit?

Cyrille


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 13, 2019, 12:38:42 PM
Hi:

>>Alternati vely, Could I wire my "z0" probe to the z limit + and do a move until it reaches the limit?

  Yes, you can do that , but an Estop will occur to end the probing. A limit will trip the Estop. Not a
problem really, but you will have top press reset to continue.

  The first idea will not work, this is because Auggie sends 1ms packets, so it may have a
seconds motion already sent any any time.

  You can read inputs and set outputs. They respond within a few ms generally, but are
not ensured to be in sync with motion.

Art
 


Title: Re: Trying to setup Auggie on cnc machine
Post by: Cyrille on February 13, 2019, 01:50:08 PM
Hello,

So, really, I would need to move for 20ms at 1cm/s (=0.02mm), wait for 20ms or so, to make sure that the move is finished (is there a wait/Pause in your scripting language?).
Test the input and loop.Woul d that work?

Cyrille


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 13, 2019, 03:41:29 PM
Cyrille:

  Well, you wouldnt have to wait I guess, the process of switching to the script thread
and such will have at least a few ms delay, probably 100ms or so.  One of the problems is the
Engine.Fe ed is in absolute. . unless gcode has set it to increment al...hmmm m..

  Its been too long since Ive looked at it, Cyrille, Ill dig into the code
to see just how one could do a touchoff on an axis. I may be able
to add a simple type of move till hit routine as a script call or something ...

  Give it a few days..

Art

 


Title: Re: Trying to setup Auggie on cnc machine
Post by: Cyrille on February 14, 2019, 04:11:37 PM
Hello,

Thank you for doing/checking this, I truly appreciat e the time that you are spending helping me...

I have another question. Do you have a « list » of the subset of code that auggie does support? I am asking as my cam tool does not produ?e code, but something quite close and I will need to program a « transcode r »...

Actually, this is a good question, can a « load gcode « évent trigger a script that could automatic ally execute an external program so that I would not need to manually run my transcode r on each tool path, but the transcode r would be automatic ally called by auggie? This is just a wild idea to improve user interface, there is no need for you to work on it or anyth8ng like this, I am just wondering if the right hooks and functiona lities are in place in auggie or not.

Thanks,
Cyrille


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 14, 2019, 08:42:27 PM
Cyrille:

  The scripting language has quite a few system hooks so it can probably be done.
Im not sure theres an auto Gcode load event, but it is possible to add a button to
call a created dialog.. Watch the video on Dialog creation. . or the thread..I cant recall
how I did the tutorial on that subject.
  The Dialogs library shows some system call examples I think... Theres a lot
in there that could keep you busy for a long time.

  As to the Gcode subset, I believe its easiest to say it implement s pretty much
what Mach3 has with the exception of probing, threading, and G43 type cutter
compensat ions. Pretty much everythin g else I think is there with few exception s.
 When not implement ed, the normal operation is to either issue an error or look
for a script, in which case the log will tell you it tried.

Art


Title: Re: Trying to setup Auggie on cnc machine
Post by: Cyrille on February 15, 2019, 01:27:36 AM
Hello,

What do you think is my best path to convert my input files?
An external program?
Or using auggie's awsome (trully) ability to interpret input files?

Headers and the like asside, my files look like this:

TR,18000     // spindle speed  Gcode equivalen t: ????
J2,0.000000,0.000000 // Jog: G01
J3,9.627712,105.045639,5.000000
M3,9.627712,105.045639,-1.000000 // feed G02
CG, ,6.040212,108.633133,0.000000,3.587494,T,1 // Arc G02/03

Creating a text processin g program pauses no issues for me, but just checking if they was not an even lazier solution :-)

Cyrille


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 15, 2019, 07:18:26 AM
Wow, one horrible file.

  If it were me, Id write a post processor to deal with it, I dont
think Auggie will conform it easily to anything. Sometimes
you just have to make a hack. :)

Art


Title: Re: Trying to setup Auggie on cnc machine
Post by: Cyrille on February 15, 2019, 10:24:57 AM
Hello,

Well, that is what I did... I wrote a "translato r"...
However, since I never learned/wrote any G-Code, I have no idea if it is valid or not:-(

Here is what I generate. Does it look valid?

G21 G17 G90
S18000 M03 G04 P2

G0 Z20.00000 0
G0 X0.000000 Y0.000000
G0 X9.627712 Y105.0456 39 Z5.000000

G01 X9.627712 Y105.0456 39 Z-1.000000 F1518.000 000

G02 X6.040212 Y108.6331 33 I0.000000 J3.587494 F3036.000 000

G03 X32.13094 3 Y102.7652 89 I0.000000 J0.412506 F3036.000 000

M05

Cyrille


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 16, 2019, 08:58:00 AM
Cyrille:

  Looks to me like you cracked it fine.

 Im in the process of adding a G38 for probing, and I notice I never turned on
tool length offset either, so Ill see if I can attach those hooks as well. Cant promise
anything at this point,but the process is underway.

Art


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 17, 2019, 12:32:41 PM
Cyrille:

   The new G38 command seems to work well in rough testing. It is multiaxis
so one can probe with G38X10Y10 Z-10 F100 and the axis will decelerat e to a
stop when probe is hit. I havent done anything as yet with the hit point
data. One can I suppose set a tool by hitting a probe plate at F100, then do
an F10 , invert the probe signal and probe off with a Z move upwards. I think
I will add a way to zero to the probe hit data before I release it.

Art


Title: Re: Trying to setup Auggie on cnc machine
Post by: Cyrille on February 18, 2019, 02:09:40 AM
Hello,

This sounds great...

Do you have an idea of the time between signal sensing and movement stop? Just to get an idea of the precision that can be obtained (not that I need too much anyway)?

Cyrille


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 18, 2019, 07:17:20 AM
Cyrille:

   The way it works is the command G38 is interpret ed as a G1 move, BUT the probe is set
to stop the move. We dont want to lose steps, so when the probe is hit, the Pokeys
automatic ally switches from Auggie's trajector y planner to its internal planner, takes control
and decelerat es all axis to a stop using your max accel parameter . It then switches back to
Auggies planner.
   Auggie clears its g1 move from that point onwards, and receives a
position packet from the pokeys telling it where the probe hit at.

  I dont yet give access to the hit point. So if you do a g38 xyz..F100
you will be off the real zero by the decelerat ion distance of the f100 move,
so by then reversing the probe signal and probing off the point with
G38Z5F1 , you will stop when the probe releases. . and with f1 as the feedrate
youd probably be off by perhaps as little as 1 step. Perhaps less.

  Conversel y you could simply do a g38Z-20F1 to start with
and get pretty much an exact zero.

 Eventuall y Ill add a button to "Zero to Probe" where the zero will be
automatic ally set to a offset of the probe hit point. Pressing goto zero
will then zero you to the exact point.

Art
 
 


Title: Re: Trying to setup Auggie on cnc machine
Post by: Cyrille on February 19, 2019, 01:26:11 AM
Hello,

OK, I understan d now...

Obviously, the "probe to 0" is, ultimatel y, what I Was looking for, but I can always execute the G38, and then manually set the z axis at 0. it's not like it is a complicat ed operation, nor is it something that is done 10 times a minute!

Can one "script" gcode excution? I mean, I can, programat ically tell auggie to execute some Gcode?

Cyrille


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 19, 2019, 07:32:15 AM
Cyrille:

  I dont think I added a way to exectute a Gcode line from script. Though you can add
scripts to GCode. In Gcode a brace signifies a switch to script.

ex:

G0X10
{
   GlobalSet("ProbeInve rt", 1 );
}
G1Y12X5

  Script can be injected to the Gcode this way. But I dont think I coded the other way to add
GCode to a script. Ill look into why I didnt, there may be technical reasons.
It may be I did add it though, Ill take a look in the code, it isnt something Ive used but
I added a great deal in there thats undocumen ted. 

Art



Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 19, 2019, 08:15:12 AM
Cyrille:

   I just confirmed I didnt add and script command to execute GCode. So Ill have to add a script
command to allow a G38 call. Pretty much anything else can be scripted with calls such
as Engine.Ar cTo or FeedTo(.. ) etc..

  Probe however, is only accessabl e by Gcode, Ive been testing it in MDI calls. Hadnt occured
to me till you asked it needed to be called by script. You can invert the probe by script
but not the probe itself. I will add that before I release it.

Art


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 19, 2019, 08:33:24 AM
Cyrille:

  OK, just so I never forget, I added a script call for Gcode, in future to do a very exact
zero you can drop a button on the screen, Give it a variable name of say.. ZeroToPro be.

Then in the GCode library add a function named ZeroToPro be( state ).
In it you would script..

if( state ) // buttons will send two calls, one for press, one for release, so check states..
{
  GlobalSet( "InvertPro be", 0 );  //set probe normal
  Engine.GC ode( "G38 Z-25 F100" ); //slow down to touch plate or probe
  GlobalSet( "InvertPro be", 1 ); //invert probe
  Engine.GC ode( "G38 Z0 F1" ); //very slow rise for 1 step accuracy.
}

         That should suffice for pretty accurate zeroing. I have not tested all
this on a machine, I'm using laser mirrors at the moment as axis, so I will
leave it to you to test as you get there. Ill release in a day or two after
more testing in the code.  The only thing I haven't verified is the actual
switch of a probe as I have none hooked up. All else seems to work fine.
  IF you get tempted to use Tool Length compensat ion, you can set it with
G43Hnn.nn n where nn.nnn is an actual tool length. There is no tool table.

  Be very cautious in testing this, Auggie is pretty complex after one has
not worked in there for a year or two, and getting inconveni ent side effects
can happen when I do intrusive additions such as these. Try your probe in
the air to simulate it all to make sure you dont crash. Your the test
pilot. :)

Art




Title: Re: Trying to setup Auggie on cnc machine
Post by: Cyrille on February 21, 2019, 01:45:37 AM
Hello Art,

Thanks so much for this work.

I will try it the week after next (I am away from the cnc this week and on business trip next week:-)... Sorry for the delay.

Is the latest version available from the regular download location?


Cyrille


Title: Re: Trying to setup Auggie on cnc machine
Post by: ArtF on February 21, 2019, 07:38:24 AM
Hi Cyrille:

   Yes, regular download was updated. No rush, No hurry, its there when you need it.

Art