Mazak Dinosaur Progress & Questions

More
08 Apr 2014 06:27 - 09 Apr 2014 23:14 #45675 by Poma
I hope to make this thread my general progress page, mixed with questions and answers specific to Lathes on LinuxCNC. I posted earlier regarding the sizing of the axis motors in this thread, just for reference:

Mazak Dino Retrofit

This is the Franken-Dino: (Sorry, pictures seem to be causing a "Fatal server error". I'll try tomorrow)

It was converted an unknown number of years ago to plane the surface of 5-meter diameter "bullwheels" used for aerial rope-ways. The planed surfaces are used for braking, so they don't need to be very smooth or precise. Actually, they need to be somewhat rough.

I thought I could help some other machine designers out there by giving some details since this place has helped me already. Many of the parts here are used simply because we already had them, or have experience using them. Initially I wansn't using EMC in favour of a commercial controller and software. However, when my distributor pulled the old bait-and-switch I backed out and, well, here I am.

Specs:
  • Axes: 1.1KW Kollmorgen servo drives and motors with smartfeedback
  • Spindle: 11KW ABB ACS355 with encoder feedback
  • Massive gearbox to reduce spindle speed to a couple RPM's
  • 1024-count ballscrew encoders
  • 1024-count low-speed-side 1-to-1 spindle encoder
  • Motenc-Lite board with 16 outputs and 32 inputs, 8ACD, 8DAC, 4 Encoder inputs
  • Industrial PC with 1.8GHz Atom processor, 2GB ram, 128G SSD
  • Automation Direct 17" touchscreen (ELO makes it)
  • WHB04 remote pendant (xhc-hb04)
  • Rittal swing-arm operator interface system
  • SIL-3 E-stop chain to keep the federales happy
  • And a few more components that are company secrets, sorry!

At this point I have the old control cabinet removed and the new sexier cabinet is being built by our company professionals. The PC is up an running and I have been spending my time getting linux to be happy with the touchscreen and the hardware. I have a basic setup using the generic MOTENC included and I am at the point where I might need some help with finishing touches to the I/O stuff.

Here is my current list of questions:
  1. Setting up the spindle encoder using the Motenc encoder inputs.
  2. There is reference to an E-Stop input and jumper in the "motenc_io.hal" file that does not seem to exist on the board.

    This will notify the Motenc of the estop condition and it will zero the DAC's and turn off all outputs even if the PC has crashed.

    Sounds great, but where is it? Vital System has officially denied everything regarding this.
  3. I have given EMC the power to disable the servos, but does anyone recommend giving it E-Stop capability?

More to come!
Last edit: 09 Apr 2014 23:14 by Poma. Reason: typos

Please Log in or Create an account to join the conversation.

More
08 Apr 2014 20:42 #45696 by Poma
Attachments:

Please Log in or Create an account to join the conversation.

More
08 Apr 2014 22:26 - 09 Apr 2014 02:58 #45699 by Poma
I'd like to use Feed per Revolution, which means I need Spindle Synchronized Motion, right?

Here's how I have set up the spindle encoder, taken from the "Spindle Control" document. Changes in bold.

# add the encoder to HAL and attach it to threads.
#loadrt encoder num_chan=1
#addf encoder.update-counters base-thread
#addf encoder.capture-position servo-thread

# set the HAL encoder to 100 pulses per revolution.
#setp encoder.3.position-scale 100

# set the HAL encoder to non-quadrature simple counting using A only.
#setp encoder.3.counter-mode true

# connect the HAL encoder outputs to LinuxCNC.
net spindle-position motenc.0.enc-02-position => motion.spindle-revs
net spindle-velocity MOTENC DOES NOT HAVE SPEED! => motion.spindle-speed-in
net spindle-index-enable motenc.0.enc-02-index-enable <=> motion.spindle-index-enable

# connect the HAL encoder inputs to the real encoder.
#net spindle-phase-a encoder.3.phase-A <= parport.0.pin-10-in
#net spindle-phase-b encoder.3.phase-B
net spindle-index motenc.0.enc-02-index


For velocity, could I add a "rate of change" algorithm to the servo thread? Or should I use the in-built "encoder" and somehow make it calculate velocity? Might not work because I don't think I have access to the quadrature states, unless I move the encoder to standard inputs.

Edit: found this

motion.spindle-speed-in - (float, in) Feedback of actual spindle speed in rotations per second. This is used by feed-per-revolution motion (G95). If your spindle encoder driver does not have a velocity output, you can generate a suitable one by sending the spindle position through a ddt component. If you do not have a spindle encoder, you can loop back motion.spindle-speed-out-rps.


Also I see some confusion between the "Motenc Driver" document and the default setup file "motenc_motion.hal" regarding the index. The HAL has an "index-enable", but the document does not show this pin at all, only an "index". Is there an easy way to dig into the driver, or should I just guess and test at the HAL level?
Last edit: 09 Apr 2014 02:58 by Poma.

Please Log in or Create an account to join the conversation.

More
09 Apr 2014 04:24 #45718 by Poma
Okay, I think I have all my spindle-related questions solved. I don't have a machine to test this on yet, but I think I am in the ballpark.
# ********************************************************************************
# Spindle Synchronized Motion
# ********************************************************************************

# General spindle speed setpoint
net spindle-speed-DAC motion.spindle-speed-out => motenc.0.dac-03-value

# Compute the spindle speed using derivative, multipy, and absolute functions
loadrt ddt count=1
loadrt mult2 count=1
loadrt abs count=1

addf ddt.0 servo-thread
addf mult2.0 servo-thread
addf abs.0 servo-thread

setp motenc.0.enc-02-scale 1
setp mult2.0.in1 60
net spindle-position motenc.0.enc-02-position => motion.spindle-revs ddt.0.in
net spindle-enc-rps mult2.0.in0 <= ddt.0.out
net spindle-ABS abs.0.in    <= mult2.0.out

# Spindle Feedback for Sync and Feed Per Revolution
net spindle-enc-rpm motion.spindle-speed-in <= abs.0.out
net spindle-index-enable motenc.0.enc-02-index-enable <=> motion.spindle-index-enable

# Spindle at Speed signal generator
loadrt near
addf near.0 servo-thread
net spindle-cmd-rps => near.0.in1
net spindle-enc-rps => near.0.in2
net spindle-at-speed motion.spindle-at-speed <= near.0.out
# set the spindle speed inputs to agree if within 5%
setp near.0.scale 1.05

Since I am using the "near" command to check spindle speed vs command speed, should the speed control be pushed through a PID? Should I actually be setting up my spindle as an entire axis?

Please Log in or Create an account to join the conversation.

More
09 Apr 2014 05:28 #45722 by emcPT
I control my 16Kw spindle with a PID on linuxcnc with only a P value set up and I have a very decent control of it.

About the E-STOP. It really depends on your settings or what your servo drives can accomplish, but a good opinion is to hard wire the servo enable (if existing) to the E stop and also the spindle drive.

What are the ballscrew pitch? Are they direct driven by motors or you still have a reduction?
1024 on the encoder seams low for such a machine where you probably have 16mm or more per turn.

Please Log in or Create an account to join the conversation.

More
09 Apr 2014 06:12 #45724 by Poma
Regarding the PID, I will throw it in if I am unable to get the "NEAR" function to work well, or some other problem.

For E-Stops, I have a circuit that opens the contactor for each of the drives. LinuxCNC is controlling the Servo Enable inputs.

I'll check on the ball-screw pitch. You might be right that the encoders are too course. I am replacing an unknown resolver with an encoder. If they are 16mm, at 1024 that gives 0.016mm resolution or 0.6 thousandths for us English system stalwarts. I'll poke around for better encoders.

Thanks for the advice!

Please Log in or Create an account to join the conversation.

More
10 Apr 2014 05:12 #45774 by Poma

What are the ballscrew pitch? Are they direct driven by motors or you still have a reduction? 1024 on the encoder seams low for such a machine where you probably have 16mm or more per turn.


My pitch is 12mm. Which is 0.012mm/count (1x encoder multiplier). I don't know what the Motenc has, but a modern hardware encoder is usually 4x (counts the rising and falling edges of both quadrature signals, just like the LinuxCNC software encoder function). At 4x, the resolution is 0.003mm, or 0.12 thousandth (inch).

I am quoting a price for a 7200 CPR encoder. That would give a linear resolution of 1.67nm at 1x and 0.42nm at 4x. But I doubt the motor/drive can match that accuracy.

I have 2.00mm linear movement per 1 motor rev. (4:1 planetary and 18:27 timing pulley) on each axis.

Please Log in or Create an account to join the conversation.

More
11 Apr 2014 02:45 #45817 by Poma
Next questions:
  1. What are "Sample Configs" as referenced in the integrators manual, INI [TRAJ] section
  2. Is there a way to make the Tool icons bigger in Axis (so my touchscreen is easier to use

Please Log in or Create an account to join the conversation.

More
13 Apr 2014 10:55 #45898 by jmelson

Next questions:
  1. What are "Sample Configs" as referenced in the integrators manual, INI [TRAJ] section

When you start LinuxCNC, without specifying a config file in the command line, it
brings up a browser where you can select the config file. In that browser, there
should be a sample configs line where you can expand it and see a whole raft
of configs. When you select one of these, it should ask if you want to copy
it to the user's home directory. if you say yes, you can then edit that local
copy of the sample config. If none of this works, there could be a problem
with the way LinuxCNC was installed on your system.

Jon

Please Log in or Create an account to join the conversation.

More
07 Aug 2014 04:36 - 07 Aug 2014 04:49 #49568 by Poma
UPDATE!

The retrofit has been complete for a number of months, but we were waiting on the material to be turned. As of now we have turned two pieces. Works exceptionally.

Here are some videos:
vid.me/e/8ew
vid.me/e/9c6
vid.me/QwA
Last edit: 07 Aug 2014 04:49 by Poma. Reason: Add Videos

Please Log in or Create an account to join the conversation.

Moderators: piasdom
Time to create page: 0.114 seconds
Powered by Kunena Forum