Beginner questions

Discussions and file drops for Auggie
MarkW
Old Timer
Posts: 31
Joined: Tue Mar 12, 2019 12:40 am

Beginner questions

Post by MarkW »

I have been reasonably successful getting Auggie up and running with my laser and have progressed to attempting to modify the screens and system to do what I would like.  I figured out how to create a screen button to activate the pokeys57cnc relay#2 (seems to be Auggie named ExtRelay3) for some reason .   Lots more to learn since I can't seem to make use of some of the scripting features yet.  Ex. the AirButton doesn't seem to work for me.   I want to create a custom gcode (M123 and M124) to call to turn on/off my air assist solenoid within the program so I don't have to remember to hit a screen button to turn on and off after the code finishes.  I'll fight through this so I'm not really looking for help with this.  ....yet.

I've been watching the videos but since I am not a programmer, I try to mimic what Art does in the video on my system in attempt to learn this stuff.  I just watched the video on Dialogs.  This brings me to my question.  On my version of Auggie, the dialog button (Videos) used to call the script Run_Tutorials does nothing.  I haven't dug in to see why other than to say there seems to be a system variable available called Run_Tutorials (after I open Scripter and look at System Variables available).  I wonder if I am running a old version of Auggie.

I also don't think my version of Vexx is the same as the one in the Vexx Intro videos but in fairness, I have only skimmed the surface of Vexx since I primarily use Fusion360 and Aspire as my means to generate vector code.  I use AUGS for raster engraving.

One of the things that I have always wondered about is what is the current Version?  Am I running the latest and greatest?  I can't seem to find anything that tells me what is the latest.  I have downloaded the version available on Gearotic website but it is always Ver 3.070000.  It doesn't seem to have been changed in quite some time.  

What is the current version?  If its not 3.70000 how do I get it?  If I am running the current version, I wonder what I did to kill off the dialog calling the videos?



Mark

Last edited by MarkW on Thu Apr 16, 2020 7:54 am, edited 1 time in total.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4586
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Beginner questions

Post by ArtF »

Hi Mark:

  Id say you've done pretty well getting to where you are. Auggie doesn't do much hand holding, it
was written primarily for me, I didn't really expect as many to use it that have, and I understand my
documentation of it is abysmal. On the upside, its free and pretty powerful. Im really impressed
that so many have done so much with it.

  Some of what you describe is probably library related. The AIR solenoid for example I dont have, so
probably is included from anothers screen. The thing is, any added button from any panel and such
must have a script enabled for it in a library. Check the LIB button to make sure the library for
dialogs is turned on, that may stop the tutorials for example if its off. Some panels available
may have buttons for a function but no actual script to drive them. Many of those panels came from
users that may or may not have included the script library.

  Another possibility is that the Dialog pointing to the youtube videos has broken over time
due to changes made to Auggie for particular problems. Ill make a note to test that.

>>I want to create a custom gcode (M123 and M124)

  This you would do by adding a library or adding to one already there. Check the default
GCode library for examples,but in short all you need do is either add to the GCode library
text file, or add another and turn it on. In that file you add a function named M124 and
another named M123, both will then execute when that MCode is encountered. A good place
to add such things in a laser system is probably the LaserSpindle library where I added the
controls specific to laser firing.

>>>I also don't think my version of Vexx is the same as the one in the Vexx Intro videos

It isnt. The only way to be sure your using latest version is to install the latest download.
I always do announce in new releases what Ive done and that a new release is available.
The videos are done over time as Vexx grows so are always by definition on older
versions as new features appear. Small changes to displays and buttons may occur.

  Gearotic itself almost never changes, its code is locked down for some time due to age
except for minor changes to smaller bugs, so never worry as to its version, and for Vexx and
Auggie, both are up to date if the latest installer has been run.

Just as an aside, and I try to explain this periodically for the benefit of those that
peruse this forum...

  Both Vexx and Auggie are personal ongoing projects I include because I find
them handy as tools, so I figured others would too, so I dont run them as if they
are managed projects as to builds and such, their like drawings I'm constantly
erasing and redrawing in nicer ways as I go. Like Forest Gumps box of chocolates
with those two programs you will never know what you will get.

  Vexx for example has just had control added for controlling and taking pictures
from any Canon photo camera. It can now also control a projector on the second
monitor output of a graphics card. Not typical things for a Cad tool, but Im
experimenting with better 3d aquisition from projected deBruijn sequences, so
Vexx becomes my platform for it. It may never appear to the users if I decide
it has only personal interest but the code is inside. Vexx has many such personal
interest projects in it, as does Auggie, experiments that if they work out and
are interesting I add a button to access them, if not the code is still there for
me to build on if I decide to attack the problem again.

  If you have any questions on Auggie, always ask, Im usually quite willing to investigate
and fix things up not only to work but to help others understand how they work. Check
the forum for a large number of such questions, they all advance ones knowledge of
Auggies internals another bit forward. Keep in mind that its a personal project
for laser control and forgive me its shortcomings.

  To understand Vexx you need only to keep in mind that its main purpose was to allow
editing of gear outlines to remove teeth or specialize their shapes. It does that pretty
well, but for me, its a platform that I can experiment with algorithms of various types
in a platform that can database the objects and create vectored forms more easily
than if I write a specific program. Its why such weird things appear in it over time.

  I love math, Im pathetic at it, but I love it, so when someone suggests something
that intrigues me I write code to test if I understand it and to help me learn it, if its
Celtic knots , golden spirals or image segmentaion, I just add a button to allow
others to play with that algorithm when its done. As a result Vexx is an eclectic mixture
of tools many of which users will never see, (nor would they want to :) ) unless I end up
pleased with them or find them of general interest.

  So always yell before you get frustrated..or at about that time and we'll see what we
can do or explain.

Thx
Art




MarkW
Old Timer
Posts: 31
Joined: Tue Mar 12, 2019 12:40 am

Re: Beginner questions

Post by MarkW »

Thanks Art,

I do have the libraries all enabled.  Well.  The ones I use. 

I have lots of work to do in the "learning to script" department since I am not familiar with C++ at all.  Research to do.

I have used some of the scripts in the gcode library as examples and can use the "print" function to prove I'm calling a script for M123.  I just have not had any luck getting the syntax down to activate the relay (ExRelay3).  That variable(?) must be defined someplace because I haven't. 

I just use it as a variable for the button I put on my screen which works fine.  Press it once.  Relay activates and air comes on.  Press again it disables relay and air is off.  So I'm pretty sure I have to learn lots more about scripting and its syntax.  Global variables.  System variables. Order that they are loaded.  All new concepts to a non-programmer like me.

I'm not concerned about Vexx or the Dialogs.  I have other ways to process vectors and find your tutorials.  Just thought I should bring it to your attention.  AUGS is the magic I need for raster engraving.

I understand that Auggie is a personal project and not a fully supported application.  I fully appreciation all the work and the great support you provide for free.  Therefore, I try to not be a pain and ask for help for things that have been discussed in this forum already.  I try to do my homework first before I beg. 

I'll get this gcode add nailed down I hope.  If not, I'll be back.

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

Re: Beginner questions

Post by ArtF »

Mark:

>>I have used some of the scripts in the gcode library as examples and can use the "print" function to prove I'm calling a script for M123.  I just have not had any luck getting the syntax down to activate the relay (ExRelay3).  That variable(?) must be defined someplace because I haven't.

  Your 90% of the way there. You really wont need to know much C scripting to do most
jobs in Auggie. It sounds like youve done what you should but just need an understanding
of the global calls to do minor things. In this case...of turning on a relay, is simply a matter
of calling a pokeys function.  If you look in the unused library "SpindleLib-RelayOnly" by selecting
"Local Edit". This allows you to see its code as you probably now by now.

In it, we find the start variable decalaration

global MySpindleOutput = 1;
global SpindleDevice = Motion(); 

This creates a system global variable for the Pokeys used for motion. Only could also
have picked the IO pokeys as a variable in the same way if one has 2 pokeys.

In the spindleON function you will see the call to

SpindleDevice.SetOC( MySpindleOutput, 1); //turn on spindle
print("Relay Spindle was turned on with OC#" + MySpindleOutput);
   
  In this case the PoKeys OC relays are accessed, The relay is #1 as set by MySpindleOutput
and that relay is turned on ( as set by the ,1 );
Thats for the OC relays. 

For the other on board relays, look to the way the relays are controlled
in the IO library.Here I instantiate another variable to point to the Pokeys..

global Pokeys1 = Motion(); //Will not exist unless lib is loaded

  It can be noted that Pokeys1 and SpindleDevice are identical if both
libraries are enabled. It doesnt matter and they may point to different devices
if one wishes. To control a relay look to the first example in there..

global SetRelay_1 = function( nRelay , state )
{
  Pokeys1.SetRelay( nRelay , state);
};

  If this library is turned on, then there exists this function

SetRelay_1( relay, state) that you can use anywhere. This file was meant to point
to an IO pokeys, but the default is as above where it  points to and controls
the relays of the motion pokeys.


Hope this helps,,

Art






MarkW
Old Timer
Posts: 31
Joined: Tue Mar 12, 2019 12:40 am

Re: Beginner questions

Post by MarkW »

Art,  thanks very much for the assistance.  The "tools" were all there I just needed to figure out how to use them. 

I FINALLY figured out that the SetRelay_1 and SetRelay_2 were for relay control on 2 different IO boards.  I am using only the 57cnc so I have disabled the IO library and only use MotionIO.  I linked SetRelay_1(4,1) to M123 and SetRelay_1(4,0) to M124 and voila.  My air solenoid now works with those Mcodes. 

Took me a minute (ok hours) to figure out that the 4 relays (ok, 2 relays and 2 open collector switches) on the Pokeys board are "called" by numbers that were not intuitive.  The SSRelays (1 and 2) are (software) 1 and 2.  The mechanical Relays (1 and 2) are (software) 3 and 4.  The board physically labels the connections SSR1 and SSR2 while also calling mechanical relay connections Relay1 and Relay2.  Seems confusing to me.

Now to look into editing my cad/cam post processors to insert my new Mcodes when air is required. 

Or maybe I'll try to figure out how to turn on/off relay#4 whenever an M3 command is executed.  Conversely, turn off relay#4 when M5 is called.  Hmmmm. 

I'm sure I'll be back.

Thanks again,
Mark
MarkW
Old Timer
Posts: 31
Joined: Tue Mar 12, 2019 12:40 am

Re: Beginner questions

Post by MarkW »

Well that was too easy.  I just edited the SpindleOn and SpindleOff functions to include SetRelay_1 parameters to turn on/off my air solenoid. 

Watch out.  I'm getting cocky!

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

Re: Beginner questions

Post by ArtF »

Mark:

:) , yeah, its actually all quite easy to do, just so many options even I forget how to do them.
In the end even I look back at the library functions as examples of how to do things.
  Just be aware, inside the scripter is a set of library functions and ways to set scripts to buttons.
Id stay away from there.. I dont use it anymore, and though its functional, its much better to simply
add buttons with names, and then add scripts of those names to library files.
  The scripters method of saving scripts in the buttons themselves is an advanced process, and
at this point its too advanced even for me, Ive forgotten many of the ways it interacts, so Id stay
away from it unless your very brave. Other than that Auggies interface is a very simple one for the
most part.

Art
MarkW
Old Timer
Posts: 31
Joined: Tue Mar 12, 2019 12:40 am

Re: Beginner questions

Post by MarkW »

Art,  I have another observation that I think I need some help understanding.

I have been doing some experiments to try to get an understanding of the depth of cut (DOC) achieved by my 10W laser in various wood materials.  to do end, I wrote some simple gcode that would let me see/measure the DOC at different feedrates.  Here is where I observed some unexpected results. 

The bottom line is this.  When I execute a file with slow feed rates that don't change throughout the code, I achieve Max (97%) laser power (measured as ~4A at 11.9V input power). It doesn't matter if the feedrate is 3ipm or 10ipm.  As long as it is consistent throughout the file, I get 97% power.  When I execute a gcode file where the feedrate varies from line to line, it shows minimum power at the slowest feed rate and the power builds as I reach the highest feed rate.  Ex. F3 = .03A @12V,  F5 0.5A @12V, .... F10 4A @11.9V.  It also does the same gradual buildup of power when I go from F10 - F70.  The slow feed is always min power building to the max power at the fastest rate.

I have changed PWM freq, MinPower setting, and Lookahead parameters.  No noticeable difference.

I don't think I would ever craft gcode (by hand or via postprocessor) to do real work with this type of feed rate variation within it so I don't think I will be concerned about it.  But it does make me wonder.

I've attached 4 small examples to this post.  DOC#s 2&3 use consistent feed and they result in full power.  DOC#1&4 vary the feed and result in "modulated" power.

Mark
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

[The extension txt has been deactivated and can no longer be displayed.]

[The extension txt has been deactivated and can no longer be displayed.]

[The extension txt has been deactivated and can no longer be displayed.]

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

Re: Beginner questions

Post by ArtF »

Mark:

  This is the function of the power function of Auggie. It takes your commanded feedrate, say F600, and then
sets the power word as Actual/requested * MasterPower = Output.

  The reason this is done is to stop CornerBurn. As most lasers have to accelerate to speed, and slow in the corners
its not unusual for a laser cut square to be burnt in the corners. Auggie will  make the output linear
to speed with 100% requested power only when its up to feedrate. This keeps things from burning in areas
where it must run slower. It is important when setting the feedrate to make sure its achievable to mitigate any
non linearity in the materials properties. Its better to go at a speed which stays as constant as you can make it,
and let Auggie control it from there. 

  You can turn off this distance correction but youll find many results more burnt in corners or slow smaller radius
circles which by rules of Anti-jerk formulas must be traveled slower than the straight areas. Pick an actual feedrate
command in the code for a balance between full out capabilities and slow corners and circles..

  Where the feedrate varies on a line by line basis, augige may average some of it in the queue depending on queue
lookahead as it will attempt to find the highest possible speed for all the lines in the queue while respecting feedrate
commanded. For example consider these two samples..

1)
G1X100 F100
M30
2)
G1X100F100
G1X200F200

  In the first example you may only reach 100 in the center of the move,if at all, because it wil begin to decelerate
at some point to hit zero speed at 100 on the X.. depending on accel requirements.

In the second example Auggie knows that the second move may be entered at 100IPM, but that youd like
200 IPM for the second, so the first move will actually run faster as it only needs to decelerate to 100 , not to zero.
Laser output will be very different between the two depending on accel settings.

  If you have a queue of 100 moves, the entire run is replanned as each line is entered to the queue to see if
it made a difference in how fast it might go in every preceding move not yet in travel.  Setting the queue to 200
for lookahead allows it to add more moves to the queue and figure out the best speed on each of them after
their all added. By trying to make a smooth transition from one speed to another in each line, it actually allows for
faster motion through some areas than with fewer lines. It gets pretty complex to figure out the actual blend speeds
youll get so I typically will run in the air to see how fast a particular feedrate is, if it varies too much, the result will
be better with lower commanded feedrates, or with higher lookahead to help blend them.

  All of this of course is clipped by the 6th order jerk limitations, so raising jerk also smooths motion as the system
wont try so hard to keep things within smaller limits of jerk.. Its all a tradeoff between these settings.

  As youve tried jerk settings and such its probably mostly a function of acceleration time vs length of move
and the match between commanded and achievable feedrates.

Art
MarkW
Old Timer
Posts: 31
Joined: Tue Mar 12, 2019 12:40 am

Re: Beginner questions

Post by MarkW »

I think I got it.  Thank you Art.

Mark
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests