Trying to setup Auggie on cnc machine

Discussions and file drops for Auggie
Cyrille
Old Timer
Posts: 15
Joined: Sun Feb 10, 2019 11:09 am

Trying to setup Auggie on cnc machine

Post by Cyrille »

Hello,

I am new to the cnc world, and to Auggie.
I have a cnc machine that I am trying to convert to pokeys57cnc/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 customizing/creating a home screen?

Cyrille
Cyrille
Old Timer
Posts: 15
Joined: Sun Feb 10, 2019 11:09 am

Re: Trying to setup Auggie on cnc machine

Post by Cyrille »

hello,

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

Any tips/tricks?

Cyrille
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Trying to setup Auggie on cnc machine

Post by ArtF »

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 decorations
to show their your panel. Names like  SpindlePanelSpeed and SpindlePanelOverride 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
Cyrille
Old Timer
Posts: 15
Joined: Sun Feb 10, 2019 11:09 am

Re: Trying to setup Auggie on cnc machine

Post by Cyrille »

Hello,

Thanks for the info/help.

I started creating the screen that I wanted (Basically a super simple 4 axis coordinate 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 coordinates for the 4 axis coordinates
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 simultaneously
3: when I click on 0X/Y/Z/A change the current coordinate so that this is the 0
4: when I click on SetX/Y/Z/A change the current coordinate so that this is the coordinate written by the user in the DRO panel
5: when I click on goto, go to the coordinate 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 programmed 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 coordinates something which is internal to Auggie, or something that is known by the pokeys? is pokeys coordinate 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 tremendous 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 configuration/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 frustrating 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...

Attachments
Sans titre.png
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Trying to setup Auggie on cnc machine

Post by ArtF »

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 coordinates for the 4 axis coordinates

>> If you load the 4axis panel as a panel in editing, and then right click one of the DRO's for
its properties, you'll see the first one has a variable name of Axis0CurPos, the next (y) has
a variable name of Axis1CurPos. These are internal variable matches so the system knows what to
put. You can use AxisnIndex or AxisnMaxVel or AxisnHomed 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 Axis0CurPos. 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 understand 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..ect... :)

  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 coordinates, 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 originally, 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 tremendous value. lol..

I agree with your frustrations 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
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Trying to setup Auggie on cnc machine

Post by ArtF »

Cyrille:

  On other thing worth mentioning. 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
Cyrille
Old Timer
Posts: 15
Joined: Sun Feb 10, 2019 11:09 am

Re: Trying to setup Auggie on cnc machine

Post by Cyrille »

Hello,

I am not in front of my computer at the moment, so I can not test, but let me make sure I understand:
>> right click one of the DRO's for its propertie s, you'll see the first one has a variable name of Axis0CurPos
>> 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
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Trying to setup Auggie on cnc machine

Post by ArtF »

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 appropriately to create that dro reading. If set to machine coordinates I
dont think anything other than homing will change them. So it is conditional, 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  KillTheWorld will set a variable named KillTheWorld
to 1 while pressed, and will call a script named KillTheWorld( state ) with state set to 1 or 0. (depending on
button settings.). The button may be pressed by script by calling  GlobalSet( "KillTheWorld",1) and that call
will then also make the script KillTheWorld(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





Cyrille
Old Timer
Posts: 15
Joined: Sun Feb 10, 2019 11:09 am

Re: Trying to setup Auggie on cnc machine

Post by Cyrille »

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 coordinates?

Cyrille
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Trying to setup Auggie on cnc machine

Post by ArtF »

You can use a FeedTo(...) script call.

  So if you drop a DRO and give it a variable name of  MyGotoXCoord for example,
you would then have a button variable named MyGotoButton.

  You then add a script to the Gcode library called

global function MyGotoButton( state )
{
    x = GlobalGet("MyGotoXCoord");
    y= ...
    ..
    Engine.Feedto( 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
Cyrille
Old Timer
Posts: 15
Joined: Sun Feb 10, 2019 11:09 am

Re: Trying to setup Auggie on cnc machine

Post by Cyrille »

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 coordinates. am I correct in assuming that machine coordinates are absolutes, and normally never changing coordinates, which might be used to implement soft limiots, while job coordinates 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 generation. 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 accelerations/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 progresses.
Thanks,
Cyrille
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Trying to setup Auggie on cnc machine

Post by ArtF »



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 coordinates are zeroed after a home, they never change after that.The normal view is of the "work"
coordinates which have a fixture offset applied. When you press ZERO you are generating a fixture offset the inverse
of machine coordinates 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 generation. 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
trajectory planner programmed into Auggie. Move commands cannot blend if simply sent to a device.
Auggies trajectory 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 indivudual
axis with motion or constant speed. All accelerations and decelerations are dealt with in Auggie using
whatever you have set as a jerk limit. (Ideally you should set your acceleration 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 differently
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 millisecond.

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
Cyrille
Old Timer
Posts: 15
Joined: Sun Feb 10, 2019 11:09 am

Re: Trying to setup Auggie on cnc machine

Post by Cyrille »

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
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Trying to setup Auggie on cnc machine

Post by ArtF »

Cyrille:

    I use the same technique I used in Mach3 on my router. I slow down the jog to
ridiculously 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, preferring 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 coordinate space. 
Its doable , just complex.  Probing is one of those things I found only like 1% of cnc
users used from my experience in Mach3. So, like G42 it doesn't exist in Auggie. One
of the design considerations 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 intentions.

  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.Feed( , , -5 );
to feed the Z down -5mm, another for -2, -1 and -.1 or even -.05 Then press the appropriate
buttons till a touchplate is touched. Its the oldschool way of touching off.

Art
Cyrille
Old Timer
Posts: 15
Joined: Sun Feb 10, 2019 11:09 am

Re: Trying to setup Auggie on cnc machine

Post by Cyrille »

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_input_off)
{
  FeedTo(current_x, current_y, current_z+0.01mm);
}


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

Cyrille
Post Reply

Who is online

Users browsing this forum: No registered users and 71 guests