3-in-one (Mill/Drill/Lathe) Machine Configuration
14 Jan 2017 20:19 #85779
by Sparky961
3-in-one (Mill/Drill/Lathe) Machine Configuration was created by Sparky961
I have a working "VMC" configuration for a servo-drive 4-axis machine. This is on a small hobby combo machine that is mostly a lathe with a mill head that's not as useful as one would hope for. But I digress. I'm improving the usefulness every time I modify it.
I'm wondering if there's a quick way to augment or convert my existing configuration files to create a 2-axis lathe configuration. I've attempted duplicating the original and going through manually changing things but this is tedious and error prone. I'll make a more concerted effort if this is the "only" way but thought I'd see about something easier first.
The mill X-axis becomes the lathe Z-axis, and the mill Y-axis becomes the lathe X-axis. I'm thinking the sign of the lathe Z will be the same as the mill X, but the lathe X will probably need to be negated relative to mill Y.
There's also the issue of diameter values in X, but I'm thinking this is just a UI setting rather than anything having to do with the axis configuration.
I can post the files if it will assist with a solution. Let me know.
I'm wondering if there's a quick way to augment or convert my existing configuration files to create a 2-axis lathe configuration. I've attempted duplicating the original and going through manually changing things but this is tedious and error prone. I'll make a more concerted effort if this is the "only" way but thought I'd see about something easier first.
The mill X-axis becomes the lathe Z-axis, and the mill Y-axis becomes the lathe X-axis. I'm thinking the sign of the lathe Z will be the same as the mill X, but the lathe X will probably need to be negated relative to mill Y.
There's also the issue of diameter values in X, but I'm thinking this is just a UI setting rather than anything having to do with the axis configuration.
I can post the files if it will assist with a solution. Let me know.
Please Log in or Create an account to join the conversation.
14 Jan 2017 21:33 #85786
by rodw
Replied by rodw on topic 3-in-one (Mill/Drill/Lathe) Machine Configuration
The biggest improvement to the usefulness of my 3 in 1 was to replace it with separate machines but I digress.
Editing the files by hand is not that hard once you get into it. I've just done it on a machine I'm building and while I put it off for a long time, it was done in an evening. You know you have working configs for each axis, just they are out of order.
I started in the .ini file and set the joints up as they needed to be for the new machine structure. That was basically just cutting and pasting the joint config to the new joint. Then I moved to the .hal file and made sure the stepgens and limit switches were updated where they connect to the LinuxCNC internal pins. I had the new files and the old files open at the one time so I had a point of reference.... A lot of cutting and pasting and use of the search function in the editor.
Maybe also run stepconf to give you a shell to work with and copy your servo config to it but if you have a working setup now, it won't be that hard to move the axes around by hand.
Editing the files by hand is not that hard once you get into it. I've just done it on a machine I'm building and while I put it off for a long time, it was done in an evening. You know you have working configs for each axis, just they are out of order.
I started in the .ini file and set the joints up as they needed to be for the new machine structure. That was basically just cutting and pasting the joint config to the new joint. Then I moved to the .hal file and made sure the stepgens and limit switches were updated where they connect to the LinuxCNC internal pins. I had the new files and the old files open at the one time so I had a point of reference.... A lot of cutting and pasting and use of the search function in the editor.
Maybe also run stepconf to give you a shell to work with and copy your servo config to it but if you have a working setup now, it won't be that hard to move the axes around by hand.
Please Log in or Create an account to join the conversation.
15 Jan 2017 01:13 #85798
by Sparky961
I couldn't agree with you more regarding the usefulness of the 3-in-1 machines. However, this has been an ongoing saga for me for going on 15 years so why quit now? If I had street level access to my workshop area and the space, I'd have a separate full sized mill and lathe already. But I don't. So I continue to use it for what it is and try to get the most out of it.
Digressions done with, I will perhaps take another stab at it. Maybe taking the files to my more comfy office and using an editor I'm more familiar with on my Windows PC will be nicer for me.
Thanks for your encouragement.
Replied by Sparky961 on topic 3-in-one (Mill/Drill/Lathe) Machine Configuration
The biggest improvement to the usefulness of my 3 in 1 was to replace it with separate machines but I digress.
Editing the files by hand is not that hard once you get into it. I've just done it on a machine I'm building and while I put it off for a long time, it was done in an evening. You know you have working configs for each axis, just they are out of order.
I couldn't agree with you more regarding the usefulness of the 3-in-1 machines. However, this has been an ongoing saga for me for going on 15 years so why quit now? If I had street level access to my workshop area and the space, I'd have a separate full sized mill and lathe already. But I don't. So I continue to use it for what it is and try to get the most out of it.
Digressions done with, I will perhaps take another stab at it. Maybe taking the files to my more comfy office and using an editor I'm more familiar with on my Windows PC will be nicer for me.
Thanks for your encouragement.
Please Log in or Create an account to join the conversation.
15 Jan 2017 04:05 #85806
by rodw
Replied by rodw on topic 3-in-one (Mill/Drill/Lathe) Machine Configuration
If you are not already using it notepad++ is the best free windows text editor for editing code. I am told there is a port to unix called notepadqq but I've not tried it yet.
Please Log in or Create an account to join the conversation.
15 Jan 2017 04:28 #85807
by Sparky961
Replied by Sparky961 on topic 3-in-one (Mill/Drill/Lathe) Machine Configuration
Thanks, I'll see how that stacks up against my current Windows favourites. For the Linux machine anything must be better than the default text editor!
Please Log in or Create an account to join the conversation.
15 Jan 2017 05:13 #85808
by Sparky961
Replied by Sparky961 on topic 3-in-one (Mill/Drill/Lathe) Machine Configuration
Ok, I didn't think it would be possible but you might have just found my new favourite text editor. Being put to rest would be the very much loved ConTEXT editor I've used for years. Unfortunately it hasn't been updated in years and I didn't go looking for replacements because I mostly removed myself from a software development environment.
Lots to learn, many new features to check out. I guess that's as good an excuse as any to start copying and pasting with those config files, eh?
Lots to learn, many new features to check out. I guess that's as good an excuse as any to start copying and pasting with those config files, eh?
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
15 Jan 2017 17:11 #85828
by Sparky961
Replied by Sparky961 on topic 3-in-one (Mill/Drill/Lathe) Machine Configuration
Can anyone confirm this for me?
My working config is for (trivkins) X Y Z A, and I want to end up with X Z, but with X => Z and Y => X.
This means the mapping is as follows:
X: joint.0/axis.0
Y: joint.1/axis.1
Z: joint.2/axis.2
A: joint.3/axis.3
As I understand it, this letter-number mapping is fixed. I can't tell it that axis.0 is now called "Z". Nor can I tell it that axis.1 is now "Y". Correct so far?
So, without physically swapping the wiring to the servo drives and encoders, I'll have to focus on changing where the output and feedback is mapped to.
So, this snippet from B2229.hal - the working mill config:
setp hm2_5i25.0.7i77.0.1.analogout0-scalemax [AXIS_0]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout0-minlim [AXIS_0]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout0-maxlim [AXIS_0]OUTPUT_MAX_LIMIT
net x-output => hm2_5i25.0.7i77.0.1.analogout0
net x-pos-cmd axis.0.motor-pos-cmd
net x-enable axis.0.amp-enable-out
Would get changed to something like this (was "X", now "Z"):
setp hm2_5i25.0.7i77.0.1.analogout2-scalemax [AXIS_0]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout2-minlim [AXIS_0]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout2-maxlim [AXIS_0]OUTPUT_MAX_LIMIT
net z-output => hm2_5i25.0.7i77.0.1.analogout2
net z-pos-cmd axis.0.motor-pos-cmd
net z-enable axis.0.amp-enable-out
It sure seems like the difficult way to do it, but is this the best/only way to accomplish what I want?
My working config is for (trivkins) X Y Z A, and I want to end up with X Z, but with X => Z and Y => X.
This means the mapping is as follows:
X: joint.0/axis.0
Y: joint.1/axis.1
Z: joint.2/axis.2
A: joint.3/axis.3
As I understand it, this letter-number mapping is fixed. I can't tell it that axis.0 is now called "Z". Nor can I tell it that axis.1 is now "Y". Correct so far?
So, without physically swapping the wiring to the servo drives and encoders, I'll have to focus on changing where the output and feedback is mapped to.
So, this snippet from B2229.hal - the working mill config:
setp hm2_5i25.0.7i77.0.1.analogout0-scalemax [AXIS_0]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout0-minlim [AXIS_0]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout0-maxlim [AXIS_0]OUTPUT_MAX_LIMIT
net x-output => hm2_5i25.0.7i77.0.1.analogout0
net x-pos-cmd axis.0.motor-pos-cmd
net x-enable axis.0.amp-enable-out
Would get changed to something like this (was "X", now "Z"):
setp hm2_5i25.0.7i77.0.1.analogout2-scalemax [AXIS_0]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout2-minlim [AXIS_0]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout2-maxlim [AXIS_0]OUTPUT_MAX_LIMIT
net z-output => hm2_5i25.0.7i77.0.1.analogout2
net z-pos-cmd axis.0.motor-pos-cmd
net z-enable axis.0.amp-enable-out
It sure seems like the difficult way to do it, but is this the best/only way to accomplish what I want?
Please Log in or Create an account to join the conversation.
15 Jan 2017 17:52 #85831
by bevins
Replied by bevins on topic 3-in-one (Mill/Drill/Lathe) Machine Configuration
Change the COORDINATES = in your ini file to COORDINATES=ZXYA
Then change the appropriate [AXIS_X] , [Joint_0] in the ini file.
Is that what your looking for?
Then change the appropriate [AXIS_X] , [Joint_0] in the ini file.
Is that what your looking for?
Please Log in or Create an account to join the conversation.
15 Jan 2017 19:10 #85841
by Sparky961
This would be great, but reading through the documentation I was led to believe it doesn't work that way.
From linuxcnc.org/docs/2.4/html/config_ini_config.html :
"Only axis named in COORDINATES are accepted in g-code. This has no effect on the mapping from G-code axis names (X- Y- Z-) to joint numbers--for "trivial kinematics", X is always joint 0, A is always joint 4, and U is always joint 7, and so on."
Am I misunderstanding your suggestion, or perhaps you can explain how this is sorted out in the INI/HAL files for me?
Replied by Sparky961 on topic 3-in-one (Mill/Drill/Lathe) Machine Configuration
Change the COORDINATES = in your ini file to COORDINATES=ZXYA
Then change the appropriate [AXIS_X] , [Joint_0] in the ini file.
Is that what your looking for?
This would be great, but reading through the documentation I was led to believe it doesn't work that way.
From linuxcnc.org/docs/2.4/html/config_ini_config.html :
"Only axis named in COORDINATES are accepted in g-code. This has no effect on the mapping from G-code axis names (X- Y- Z-) to joint numbers--for "trivial kinematics", X is always joint 0, A is always joint 4, and U is always joint 7, and so on."
Am I misunderstanding your suggestion, or perhaps you can explain how this is sorted out in the INI/HAL files for me?
Please Log in or Create an account to join the conversation.
15 Jan 2017 21:29 #85855
by rodw
Replied by rodw on topic 3-in-one (Mill/Drill/Lathe) Machine Configuration
The documentation you are quoting is a few versions behind (from 2.4). I had no problems swapping stuff around in the latest master release. I believe in master, there are some changes to how joints and axes are defined that are not in V2.7 or earlier.
Please Log in or Create an account to join the conversation.
Time to create page: 0.084 seconds