Orient
17 Jan 2023 15:33 #262244
by spumco
JT-
Yes, I've got orient working, but it's fussy and hardware dependent.
My particular config is based on a VFD w/2-pole motor, spindle encoder w/index, and a pneumatic shot-pin to nail the index position.
If your hardware is capable of tightly holding a position (servo or servo-like) orient should be easy-ish. If not, it may take some aggravating tuning or a helping hand from a brake or other mechanical device to hold position.
Basic arrangement is that there are two PID loops - one for spindle mode, and one for orient mode - and some HAL logic to switch between the two.
Before I swamp you with my non-trivial hal files...what hardware do you have?
Yes, I've got orient working, but it's fussy and hardware dependent.
My particular config is based on a VFD w/2-pole motor, spindle encoder w/index, and a pneumatic shot-pin to nail the index position.
If your hardware is capable of tightly holding a position (servo or servo-like) orient should be easy-ish. If not, it may take some aggravating tuning or a helping hand from a brake or other mechanical device to hold position.
Basic arrangement is that there are two PID loops - one for spindle mode, and one for orient mode - and some HAL logic to switch between the two.
Before I swamp you with my non-trivial hal files...what hardware do you have?
The following user(s) said Thank You: JT
Please Log in or Create an account to join the conversation.
17 Jan 2023 16:15 - 17 Jan 2023 16:18 #262247
by JT
I have a velocity servo with encoder feed through.
Tom said this is Andy's diagram but he is having issues trying to make it work and I'm just getting started.
tom-itx.no-ip.biz:81/~webpage/cnc/config...LL_ORIENT/orient.jpg
After reading your reply again the diagram makes more sense to me now.
JT
Tom said this is Andy's diagram but he is having issues trying to make it work and I'm just getting started.
tom-itx.no-ip.biz:81/~webpage/cnc/config...LL_ORIENT/orient.jpg
After reading your reply again the diagram makes more sense to me now.
JT
Last edit: 17 Jan 2023 16:18 by JT.
Please Log in or Create an account to join the conversation.
17 Jan 2023 16:51 #262253
by spumco
JT - Good to hear the diagram is helping. I had to have Andy and a few other folks hold my hand a while back while I was struggling.
My spindle hal file is attached - note that there are a few lines commented out. I haven't cleaned it up yet so ignore those.
If anything isn't clear let me know; there may be hal connections missing from that file that are in my main hal file.
-R
My spindle hal file is attached - note that there are a few lines commented out. I haven't cleaned it up yet so ignore those.
If anything isn't clear let me know; there may be hal connections missing from that file that are in my main hal file.
-R
Please Log in or Create an account to join the conversation.
17 Jan 2023 18:05 #262257
by JPL
This guy going by Talla83 made some very interesting video about this and even provided a full configuration for 5i20 -> 7i33.
See here: www.talla83.de/ under 'LinuxCNC Spindle-Control'.
Video is here:
Configs are here: talla83.de/linuxcnc/config.htm
If only I would have a better understanding of German language...
See here: www.talla83.de/ under 'LinuxCNC Spindle-Control'.
Video is here:
Configs are here: talla83.de/linuxcnc/config.htm
If only I would have a better understanding of German language...
The following user(s) said Thank You: JT
Please Log in or Create an account to join the conversation.
17 Jan 2023 21:13 #262271
by tlightus
could you please explain what drives motion.digital-out-07 and what tristate-bit.0. is doing there? I think i understand it but don't know where you're triggering motion.digital-out-07. What i see happening there is the digital pin feeds tristate when a tool change is requested which sets spindle-index-enable. Then the next round orient takes effect. Am i even close? Still reading the rest of it but thanks alot.
Please Log in or Create an account to join the conversation.
17 Jan 2023 21:23 #262273
by spumco
I knew I should have pasted all my files....
I'll get them up when I get home and we'll dig through everything together. It'll be a couple hours.
I think PCW (or maybe Andy) tipped me off about tristate when I was having problems getting the spindle index signal to reset low. I seem to recall the symptom was that orient would work once, and then subsequent attempts would fail (spinning/hunting for an index signal until it timed out) because I couldn't reset the index pin.
If you're impatient, you could probably search under my user name sometime between (appx) last May to September.
I'll get them up when I get home and we'll dig through everything together. It'll be a couple hours.
I think PCW (or maybe Andy) tipped me off about tristate when I was having problems getting the spindle index signal to reset low. I seem to recall the symptom was that orient would work once, and then subsequent attempts would fail (spinning/hunting for an index signal until it timed out) because I couldn't reset the index pin.
If you're impatient, you could probably search under my user name sometime between (appx) last May to September.
The following user(s) said Thank You: JT
Please Log in or Create an account to join the conversation.
17 Jan 2023 22:57 #262280
by spumco
Relevant files attached. Note that I don't use orient for anything other than homing the spindle so my drive dogs line up with the ATC forks. My VFD isn't capable of holding a position. It just gets close enough for the shot-pin to drop in and hold it. No way I could reliably command a specific position.
Basically, wherever the spindle was when orient was commanded was interpreted as the 'index' point, and orient would rotate the spindle until it found the false index plus whatever offset I had programmed in INI file.
Both spindle.0.index-enable and pid.s.index-enable need to be reset to false before orient will work If I don't turn on/off the spindle-index-enable before orienting:
- 01_PBATC.hal
- main hal file. All loadrt & addf are here.
- 02_atc.hal
- connections to motion.digital/analog in/out.
- m27.ngc
- one of the toolchange files used in my M6 sequence
- Used for initial homing of the spindle
- turns spindle-index-enable on & off via motion.digital-out-07 (M64/M65 P7)
- After that, it rotates the spindle at 250rpm for a bit so orient can re-aquire the index pulse.
- m23.ngc
- Another toolchange file
- Used for all subsequent spindle orientation (takes less time)
- Does not require the spindle-index-enable dance.
Basically, wherever the spindle was when orient was commanded was interpreted as the 'index' point, and orient would rotate the spindle until it found the false index plus whatever offset I had programmed in INI file.
Both spindle.0.index-enable and pid.s.index-enable need to be reset to false before orient will work If I don't turn on/off the spindle-index-enable before orienting:
- Orient commands rotation
- Shot pin fires (spring-loaded)
- Shot pin drops in
- Orient keeps trying to rotate because it's not at the false index
- Shot pin complains very loudly
- Orient muscles through with the shot pin & pocket crying
- Orient errors out because it just got a load applied by the shot pin and can't make it to the finish line in time
- I cry a little
Please Log in or Create an account to join the conversation.
18 Jan 2023 02:35 #262311
by spumco
How about I just dump everything on you?
My ATC scheme is a result of me going off the Probe Basic reservation. The PB simulation is designed to support a geneva wheel mechanism and the various Mxxx .ngc files are used to calculate shortest-path as well as drive the geneva wheel with a dumb AC or DC motor. It does not use the carousel.comp component - all math & logic is handled in the PB Mxxx files.
My configuration uses a stepper motor driven by carousel.comp in 'counts' mode (to keep track of pockets). Hence the need for a rather different config than the PB sim.
The toolchange_test.doc is a bunch of notes I was taking trying to untangle the Probe Basic tool change scheme. Took me a while, but you might find something useful in there.
Remember - it's a work in progress and not in a lock-down state. There is some lingering junk in the ATC folder where I tested a bunch of changes and haven't deleted all the previous versions of files. There are also the (more or less) original Probe Basic tool change .ngc files, but the MAIN file is toolchange.ngc.
The comment(s) at the top of the .ngc files should tell you what's being used. If there aren't a crap-ton of comments in a particular .ngc file, it's a leftover and not in use.
I'm sure you'll have questions, don't hesitate. I could certainly use help too.
-Ralph
My ATC scheme is a result of me going off the Probe Basic reservation. The PB simulation is designed to support a geneva wheel mechanism and the various Mxxx .ngc files are used to calculate shortest-path as well as drive the geneva wheel with a dumb AC or DC motor. It does not use the carousel.comp component - all math & logic is handled in the PB Mxxx files.
My configuration uses a stepper motor driven by carousel.comp in 'counts' mode (to keep track of pockets). Hence the need for a rather different config than the PB sim.
The toolchange_test.doc is a bunch of notes I was taking trying to untangle the Probe Basic tool change scheme. Took me a while, but you might find something useful in there.
Remember - it's a work in progress and not in a lock-down state. There is some lingering junk in the ATC folder where I tested a bunch of changes and haven't deleted all the previous versions of files. There are also the (more or less) original Probe Basic tool change .ngc files, but the MAIN file is toolchange.ngc.
The comment(s) at the top of the .ngc files should tell you what's being used. If there aren't a crap-ton of comments in a particular .ngc file, it's a leftover and not in use.
I'm sure you'll have questions, don't hesitate. I could certainly use help too.
-Ralph
Please Log in or Create an account to join the conversation.
Time to create page: 0.101 seconds