Author Topic: Turning.. but not all the way...  (Read 46413 times)

Offline Arie kabaalstra

  • CNC Jedi
  • *****
  • Posts: 641
  • why buy one, if you can build one?
    • View Profile
    • DUMET Watches
Re: Turning.. but not all the way...
« Reply #15 on: July 27, 2025, 11:22:51 am »


In that case, considering the lack of interest from Andy Payne and taking into account your programming skills mentioned in another thread, may I suggest the following;

1. Download ILSpy here, https://github.com/icsharpcode/ILSpy/releases/tag/v9.1
2. using ILSpy, open the dll in CamBam plugins folder called "CamBamLathe.dll", this will decompile the plugin.
3. export it to a C# project
4. fix the Lathe Mop.

That woul be an excellent job and benefit everyone.

Well that does indeed sound like a good solution, however.. i think you have overestimated my programming skills..
I Only started programming in C# beginning 2023, while recovering from my accident... and i, as yet have no clue how these DLL's actually work..

I have downloaded ILSpy, and opened the DLL.. Now What?..

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 9075
    • View Profile
Re: Turning.. but not all the way...
« Reply #16 on: July 27, 2025, 13:54:17 pm »
"I have downloaded ILSpy, and opened the DLL.. Now What?.."
------------------
Study the code.  Study the linked libraries.  Study other plugins that do single, simple things.  Study CB's internals as to how features are constructed.  When you're done, you'll be a CamBam plugin guru!

At least C and its variants are rational enough to make clear the purposes of routines, even without the missing comments.

Lloyd


« Last Edit: July 27, 2025, 15:50:37 pm by lloydsp »
"Pyro for Fun and Profit for More Than Fifty Years"

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5320
  • Made in England
    • View Profile
Re: Turning.. but not all the way...
« Reply #17 on: July 27, 2025, 17:24:43 pm »
It's not easy.

1. Once in ILSpy go to, File->Save Code
2. in, "Save as Type" select, C# project (*.csproj) and give it a name, e.g. ArieLathe
3. this will make a C# project that can be opened in Visual Studio.
4. In Visual Studio the first thing to do is get it to compile into a dll that will open in CamBam, once that's done you are at least 50% there.

As Lloyd said, use other people's plugins (opened with ILSpy) and information in this forum to get ideas.
« Last Edit: July 27, 2025, 17:31:05 pm by EddyCurrent »
Filmed in Supermarionation

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 9075
    • View Profile
Re: Turning.. but not all the way...
« Reply #18 on: July 27, 2025, 17:32:52 pm »
I might add that various authors here have also generously provided source code for some of their plugins.  Working with some of those - with their embedded commentary - could help you a lot to get 'up to speed'.

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline Arie kabaalstra

  • CNC Jedi
  • *****
  • Posts: 641
  • why buy one, if you can build one?
    • View Profile
    • DUMET Watches
Re: Turning.. but not all the way...
« Reply #19 on: July 28, 2025, 14:55:59 pm »
Well.. i might dive into that..

But for now, what i did was change the macro's for my small lathe a bit, so it now outputs Code for the Big one..that was done within an hour.. wrote a couple of functions to output the Code, and inserted Function calls in the Macro's where needed..

Basically using EdingCNC to write programs for other lathes as well..

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4563
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Turning.. but not all the way...
« Reply #20 on: July 28, 2025, 20:30:38 pm »
There are always work arounds.  In the vein of multiple finish passes instead of roughing... 

How about generate geometry from tool path, and then invert and position the resulting geometry for multiple finish passes.  I've done something like this (much more grunt work oriented) to overcome the grossly BAD tool paths from some 3D operations. 
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com

Offline Arie kabaalstra

  • CNC Jedi
  • *****
  • Posts: 641
  • why buy one, if you can build one?
    • View Profile
    • DUMET Watches
Re: Turning.. but not all the way...
« Reply #21 on: July 29, 2025, 19:40:56 pm »
There are always work arounds.  In the vein of multiple finish passes instead of roughing... 



But i don't do workarounds.. i work with Solutions...

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 9075
    • View Profile
Re: Turning.. but not all the way...
« Reply #22 on: July 29, 2025, 20:53:26 pm »
Right... like with the newer of our two bed routers today.  The manufacturer's 'solution' was that we had damaged and sticking slide rails and ball screws on the (two!) Y axis drivers that are served individually by two different homing switches.  I've been telling them for months that homing was not reliable, and they said that their home switches 'never fail'.

Today I had to unbolt and realign the gantry AGAIN because the two Y servos were reporting over-current.  They again claimed dirty slides and ball screws, and improper lubrication.  We scrupulously maintain both conditions.

So I wrote an exerciser to challenge their position.  I realigned the gantry - which is laborious - then ran FIVE HOURS of intensive Y-axis exercising on the machine.  No errors.  I homed it ONCE, and it blew an over-current fault on one of the two Y drivers, and showed a pending fault on the other.

Why?  Because the two old home switches aren't switching at the same position every time they're actuated.  One time they may switch at the same time.  The next, they may switch with the gantry skew by 40-50 thousandths, end-to-end... and that causes the two servos to fight one-another trying to maintain position.

I proved it several times, then challenged them with the results.  They said, "Well we guess that _could_ happen, but we've never seen it."  What I know is that hundreds of customers have lost thousand of hours of work time to imagined failures to maintain their machines, when these damned switches have been failing all-along.

My WORK-AROUND is this.  Until I get new parts in, I'll do only one home operation at the beginning of a day.  If the currents on the two drivers are excessive, I'll do a gantry realignment.  If it's OK, I will NOT DO ANOTHER HOME for the rest of the day.

That's a 'solution' Arie, by means of a work-around.

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5320
  • Made in England
    • View Profile
Re: Turning.. but not all the way...
« Reply #23 on: July 30, 2025, 09:25:45 am »
Arie,

I have attached the Visual Studio project files for the lathe, it is called "ArieLathe"
It compiles correctly, loads into CamBam and makes a menu item under the Machining tab called "ArieLathe"

Once unzipped, in the ArieLathe folder double click file, "ArieLathe.csproj" , to open the project in Visual Studio.

All you have to do now is understand the code and make changes to suit your Solution.

« Last Edit: July 30, 2025, 17:57:59 pm by EddyCurrent »
Filmed in Supermarionation

Offline Arie kabaalstra

  • CNC Jedi
  • *****
  • Posts: 641
  • why buy one, if you can build one?
    • View Profile
    • DUMET Watches
Re: Turning.. but not all the way...
« Reply #24 on: July 30, 2025, 15:50:38 pm »

That's a 'solution' Arie, by means of a work-around.

Lloyd

In my book.. that is not a solution because you didn't solve the problem..

At the moment.. i have a modified Macro for EdingCNC that does the following:
It logs all the operations that are programmed in CYCLES in EdingCNC as Single lines of Code, basically the same kind of output you'd get from any cam program.
after that i need to post-postprocess it with a small VB Console application to make sure that whole millimeters get .000 behind them, otherwise my EMCO regards them as µm... that is all

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 9075
    • View Profile
Re: Turning.. but not all the way...
« Reply #25 on: July 30, 2025, 19:35:05 pm »
Geesh, Arie!  A solution is whatever gets the work done, regardless of the underlying problem.  The switches are on order -- but they won't be here for at least a week.  I suppose I should just declare the machine to be broken, and not earn any money until the switches get here?  Is that a 'solution'?

I'm sorry to say that I find that posture just pedantic -- even snobbish.  A solution is what solves your problem.  I solved it.

I'm very proud of the quality of my work, but I'd rather have the income than be proud of my solutions to problems.

Lloyd
« Last Edit: July 30, 2025, 19:40:33 pm by lloydsp »
"Pyro for Fun and Profit for More Than Fifty Years"

Offline Arie kabaalstra

  • CNC Jedi
  • *****
  • Posts: 641
  • why buy one, if you can build one?
    • View Profile
    • DUMET Watches
Re: Turning.. but not all the way...
« Reply #26 on: July 30, 2025, 20:38:29 pm »
It gets the work done.. True.. but still it is NOT a solution..

Am i Completely Satisfied with what i made?.. Not really.. but it is Getting there.. it basically prepares the way i want to go with my EMCOturn 120 Lathe.. i now program it with E++, a Code Editor/programming environment/Textbased CAM system i wrote myself..
In the Macro's i can "log" text, and since an NC File is a Text File.. it means i can write NC Files with the Log Function..
That means.. i can "Compose" my parts filling in Dialogs for the operations like facing, turning, chamfering etcetera, and that code can be run on my EdingCNC Lathe, but as soon as i put M599 in the first line of my program, it will output a "EMCOtronic TM02 file as well.. the only thing is that i have to postprocess that with a small Console app (that can be called from the Macro) to get all the whole numbers and add a decimal point and three zeroes...

Modifying the macro was just adding some M-Codes

in the Future, when the EMCOturn 120 is Converted to EdingCNC, the m-Codes can remain there, although they are then Dead code.. because if i don't put an M599 in, there will be no log file made...

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4563
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Turning.. but not all the way...
« Reply #27 on: July 30, 2025, 23:38:08 pm »
In business you don't get paid unless you get the job done.  I had the hardest time teaching that to employees. 

"Did you finish?  Did you test it?  Can I bill it?"

"No, but after we make that three hour drive back tomorrow it will only take ten minutes to finish and test it." 

Sigh!

"Hey, I see you never made it to the one and only service call I gave you today."

"Yeah, I was reorganizing my service truck all day, but I can go right now if you want to pay the over time."

Sigh!

"Hey Boss, I didn't finish because I was short one part." 

"When did you notice that?" 

"This morning when we first got there." 

Sigh!

"You don't expect me to think about the job and what we are going to tackle during the ride out there do you?"

"You expect me to pay you for the time you are riding out there don't you?" 

Sigh!

~~~ Those were all real interactions. ~~~

I currently do almost exclusively prepaid work due to the nature of my market, but I still have to get the jobs DONE.  Customers don't want to hear excuses even if they are real.  They are my problem.  Not theirs. 
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com

Offline Arie kabaalstra

  • CNC Jedi
  • *****
  • Posts: 641
  • why buy one, if you can build one?
    • View Profile
    • DUMET Watches
Re: Turning.. but not all the way...
« Reply #28 on: August 10, 2025, 12:13:59 pm »
i Do Read a lot about problems with machines that need to be circumvented to get the Job done.. that is not my problem.. my problem is not Temporarely.. it is that CamBam Lathe is not really Complete.. and.. i Could write, or re-write the plugin.. that would solve it.. but that is something i most likely cannot do in a day..

the solution i used was Using the already existing and Complete macro of my Small lathe, and have it output the Code for the Big one..
That is a Solution.. because i can program my Small lathe at the machine or at the PC,with the same software.
And.. i have written a small Post-Post.. that Converts the program to the right number format.. and that post is called from the Macro of my Small lathe's Control..