G68 alignment macro

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Re: G68 alignment macro

Postby Vmax549 » Fri Jan 24, 2020 8:50 pm

Unless you plan to do advanced macros, learning C# will not help you much. Most simple macros are specifically UCCNC macro languge calls and very little if any C# calls involved in teh process.

As you noted teh best way to learn it is by example code. But there is VERY little code available that explains teh process. And that is not unusual in teh DIY cnc industry. IF you think that programs like Mach3 are an exception you have to know that teh author of Mach3 "ART" did little to no documentation of mach3. It was mostly done by dedicated USERS of Mach3. The problem today is there are a lot of DIY control software packages available and very few dedicated USERS left devoting time to documenting things DIY CNC.

Most of todays users expect the Manfs of controls to provide them with what they need . They READ about all teh neat things that CNC machines can do but fail to realize that most DIY cncs are not high end controls that can do all teh cool things high end machines can do. Basically if you want teh cool thngs you have to learn to program inside of teh control and create the cool things yourself. Or find someone to do it for you.Otherwise you need to learn to USE what features your controller has to your advantage. Bascially change your process to use teh controllers features instead of relying on teh controller doing teh work for you.

Also it would be wise to learn how teh Gcode language works so YOU know what teh machine is going to do based on teh Gcode . Gcode is a VERY simple language. It is like talking to a 3 year old. The basic moves are extremely simple.

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

Re: G68 alignment macro

Postby cncdrive » Fri Jan 24, 2020 10:42 pm

You should at least understand the C# programming syntax to program in C# and the UCCNC using C# language so you should know at least the language syntax.
As a programmer my opinion is that the first thing should be is to learn the basic programming syntax and then the specific things, function calls etc.

And yes, learning by example is also a good way, but in my opinion before that do some tutorials on the language syntax then it will be much easier to understand and learn from example codes.
cncdrive
Site Admin
 
Posts: 4717
Joined: Tue Aug 12, 2014 11:17 pm

Re: G68 alignment macro

Postby beefy » Sat Jan 25, 2020 12:37 am

Vmax549 wrote:Also it would be wise to learn how teh Gcode language works so YOU know what teh machine is going to do based on teh Gcode . Gcode is a VERY simple language. It is like talking to a 3 year old. The basic moves are extremely simple.

Just a thought, (;-) TP


I've mostly given up recommending that. Seems in this growing age of entitlement, too many just want a black box and a push the button and it works machine.

The amount of times when someone has had an issue and I've recommended single stepping through the gcode, and the response is simply I don't know gcode. And the thing is they don't seem interested in learning. Never used to be like that.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: G68 alignment macro

Postby beefy » Sat Jan 25, 2020 12:39 am

cncdrive wrote:You should at least understand the C# programming syntax to program in C# and the UCCNC using C# language so you should know at least the language syntax.
As a programmer my opinion is that the first thing should be is to learn the basic programming syntax and then the specific things, function calls etc.

And yes, learning by example is also a good way, but in my opinion before that do some tutorials on the language syntax then it will be much easier to understand and learn from example codes.


That's pretty much how I did it. Worked well for me.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: G68 alignment macro

Postby Delco » Sat Jan 25, 2020 8:13 am

Vmax549 wrote:Unless you plan to do advanced macros, learning C# will not help you much. Most simple macros are specifically UCCNC macro languge calls and very little if any C# calls involved in teh process.

As you noted teh best way to learn it is by example code. But there is VERY little code available that explains teh process. And that is not unusual in teh DIY cnc industry. IF you think that programs like Mach3 are an exception you have to know that teh author of Mach3 "ART" did little to no documentation of mach3. It was mostly done by dedicated USERS of Mach3. The problem today is there are a lot of DIY control software packages available and very few dedicated USERS left devoting time to documenting things DIY CNC.

Most of todays users expect the Manfs of controls to provide them with what they need . They READ about all teh neat things that CNC machines can do but fail to realize that most DIY cncs are not high end controls that can do all teh cool things high end machines can do. Basically if you want teh cool thngs you have to learn to program inside of teh control and create the cool things yourself. Or find someone to do it for you.Otherwise you need to learn to USE what features your controller has to your advantage. Bascially change your process to use teh controllers features instead of relying on teh controller doing teh work for you.

Also it would be wise to learn how teh Gcode language works so YOU know what teh machine is going to do based on teh Gcode . Gcode is a VERY simple language. It is like talking to a 3 year old. The basic moves are extremely simple.

Just a thought, (;-) TP


I have a understanding of Gcode and can write simple programs , can do arduino and basic programs and used to be able to do C and fortran 20 years ago . Documented examples are great for getting a understanding of how the program is functioning and to learn , all good to know the syntax and conventions but until its all put togther it doesnt make sense.
Delco
 
Posts: 355
Joined: Tue Apr 02, 2019 4:23 am

Re: G68 alignment macro

Postby cncdrive » Sat Jan 25, 2020 9:15 am

If you know the C# programming syntax and read the /Documentation documents then it is very easy to understand how it works.
C# is C based language, it is very similar to C++, but with more focus on object orientation and it uses pointers differently is the other big difference.
cncdrive
Site Admin
 
Posts: 4717
Joined: Tue Aug 12, 2014 11:17 pm

Re: G68 alignment macro

Postby beefy » Sat Jan 25, 2020 12:33 pm

Delco wrote:Documented examples are great for getting a understanding of how the program is functioning and to learn , all good to know the syntax and conventions but until its all put togther it doesnt make sense.


So sounds like you are saying even if you know C/C#, know all the UCCNC functions, LED numbers, button numbers, DRO numbers, etc, and you look at even a basic UCCNC macro, then you will not understand it ???

If so then your only option may be to ask if someone can tell you what a particular macro is supposed to do. Try and follow a simple one, and when you get stuck, ask a question.

I don't see anyone going through all the macros here and commenting them in detail. Personally I've never needed that yet.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: G68 alignment macro

Postby Delco » Sun Jan 26, 2020 10:08 am

Its the little things that arn't documented ,like I just discovered the label number is also the stored variable location . If I knew C+ then that may be obvious but I havent looked or thought about C for 20+ years and even then it was rudimentary . Seems to me you need to be a programmer to be able to use a lot of the functions in UCCNC , hopefully that wont be the case as it matures.

been looking at the macros in the profile folder and can follow most of them , just trying to get my head around how the led numbers button numbers work , how it interact with the tool table . And then need to also learn java to get the post processor sorted . Steep learning curves ahead.
Going to proceed offline and work through what I need to do.
Delco
 
Posts: 355
Joined: Tue Apr 02, 2019 4:23 am

Re: G68 alignment macro

Postby Robertspark » Sun Jan 26, 2020 12:21 pm

Java .... What other software are you using for post processing
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: G68 alignment macro

Postby Robertspark » Sun Jan 26, 2020 12:29 pm

Nothing interacts with the tool table... You populate it and call a tool number which will implement whatever you have set in the tool table if you are using tool compensation or tool height (I get my cad cam application to do all that for me when I give it my tool diameter and an inside / outside offset or a tool stepper

I use sheetcam and or estlCAM
https://www.sheetcam.com/
https://www.estlcam.de/

Meets my needs and costs just fine and both are well supported by the developer and user community
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

PreviousNext

Return to Macros

Who is online

Users browsing this forum: No registered users and 3 guests