The following information may have errors; It is not permissible to be read by anyone who has ever met a lawyer. Use is confined to Engineers with more than 370 course hours of electronic engineering for theoretical studies. All content entered becomes and is (C)2007 Transtronics, Inc. the property of Transtronics, Inc. Rest assured that your contributions won't be sold and will be publicly available.
ph +1(785) 841 3089 Email inform@xtronics.com

EMC2

From Transwiki

Jump to: navigation, search

Contents

[edit] Links

[edit] Dual loop control

From my readings on this subject, it is best for the motor to have it's own loop - and then if you add a table feed back, it would be done as a outer PID loop - using only the 'I' of PID. I've also thought that the right way to do this would be to update the backlash every time the motion reverses so as the ball-screws warm up, the backlash numbers stay up to date. Then the net motion would be fed to the nested loop.

To take this to the extreme, you could also feed in the force (calculated from the motor current) and have different backlash numbers depending on how hard the motor is pushing.

I haven't done any of this yet, but from what I've read, it should be possible to have EMC2 do all of the control work - nested PID loops - backlash correction. I haven't seen where anyone has an actual system doing this?

One point of view is that the controller should be as simple as possible and EMC2 would just tell the controller where to go (KISS). The other take on this is that Linux is stable enough that there shouldn't be any problem with it running the whole show - and if it is doing everything, extreme tweaking is possible. On Windoze, (or a boxes with nasty routines in the BIOS that interrupt realtime activities) it is best to go with KISS. On the other hand, Linux is quite stable, tweaking is fun, and moving the smarts to EMC should further reduce the cost of the electronics.

My only concern is that most folks are running Ubuntu, which is rather bleeding edge for a motion control platform - I would rather see this on a Debian-stable distribution, where things don't change as often.


[edit] Hal Scope

[edit] Notes

VCP is depreciated and has been replaced with pyVCP. VCP should not be used for new configs. To create a custom pyVCP button see this page:

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Adding_Custom_MDI_Buttons

[edit] Possible Button Readers

  • u-hid.com USB 2.0 interface claim quadrature, analog (pots), outputs, Windoze set up program required <snarl> - nothing about Linux?
  • gamecabinetsinc.com USB(which one?) No contact on web site, Extra for docs, nothing about Linux?

[edit] Protecting moving cables

There should be more added to the following table -- CPE looks to be the choice??

Material Typical Applications Characteristics Cost
PVC General industrial very high moisture resistance, excellent cost-benefit low
CPE Harsh industrial resistance to oils, acids and alkalis moderate
CSPE (Hypalon) Harsh petrochemical high oil resistance; low moisture resistance premium
SOLONON Duct banks; direct burial, fire-safety environments high moisture resistance; high strength, easy pulling; low-smoke; non-halogen premium

[edit] CNC Terms

Encoder 
Both optical and magnetic (similar to magnetic tape) encoders produce a quadrature wave form and and index pulse that lets the receiving electronics keep track of the position of a rotating shaft or linear position (linear position most often has an index pulse every so often and may have a home position output as well. An improved version uses gray-coded encoding (see below).
Gray coded encoders 
Gray codes instead of having a two bit output as in a quadrature encoder, have instead a binary word encoded with 3, 8, 16 or even more bits printed on the optical plate. Instead of using normal binary counting, the code increments with a system so that only one bit changes at a time when moving over each position. With normal binary counting several bits can change at once (i.e. 01111 + 1 = 10000), but in the real world there one bit will always lag the others creating transient erroneous codes. Gray coded encoders still repeat (there is often an index bit at the full cycle) but the possibility of over running a count, as sometimes happens on quadrature encoders is eliminated. Gray coded encoders are not often used due to their higher costs.
Resolver
A system that uses a transformer with three windings - A reference winding that rotates (rotor) and sine and cosine stator windings that are 90° from each other on the circumference of the housing. A sine-wave is fed in to the rotating reference winding and the amplitude and polarity of the outputs reveals the quadrant and position with in the quadrant. The sub quadrant position is based on the ratio of the sine vs cosine voltages. SIN θ / COS θ = TAN θ, where θ = shaft angle
Synchros 
Similar to the resolver (see above) but with three stators 120° apart.


[edit] Hi-speed motion for laser cutting and engraving

There are a number of inexpensive Chinese CO2 cutting machines that have a proprietary interface. I am interested in converting one to EMC and gathering some information. One source told me that it probably had to move too fast for engraving etc and that EMC with a PC's latency would not be able to keep up.

It turns out that there are cards that can output a chain of pulses at a particular frequency - called Universal Stepper Controllers or "rate generators" Which produce constant-width pulses of varying frequency.

There is also somewhat different type of card called a Universal PWM Controller Instead of generating constant-width pulses of varying frequency, it makes varying-width pulses of constant frequency, to directly drive a PWM power output stage. With this system there are no steps anywhere in the system. EMC2 sends out a PWM output command, and reads encoder position from the board's counters. With this, I can drive both DC brush motors and brushless motors, using the appropriate drive units.


There are also at least three EMC compatible cards that will provide analog velocity mode control - g

Quoted:

There is no problem as far as pulse train and maximum velocity is concerned. The motors as I recall have a max velocity of 2500 RPM at 200 full steps per revolution, and set to 32 micro steps per step, which works out to a maximum step rate of just under 270,000 pulses per second. The 7i43 or 5i20 is clocked at either 33 or 100Mhz, which is over two orders of magnitude above the max step rate.


The update rate of the 7i43 parallel port is limited to about 400 microseconds however, which affects the rate at which the position (velocity actually) can be changed. With the 5i20, 200 microseconds is easily achievable. I should also add that I have created a special smp kernel for the Atom 330 processors I am using, which pins the real time tasks to one core and everything else to the other. With this kernel, I am able to set the servo period to 200 microseconds or faster, excepting the limitation on the 7i43 mentioned above.


A further limitation is in the EMC kinematics which has a maximum rate at which position data can change. This is not a problem for me, because with the materials I am using and the power of the lasers, to get any depth when doing 3D engraving it is not practical to run faster than 200 fpm or 40 ips, and often less than that.
In effect the EMC kinematics will slow the head in complex areas where Z changes very frequently and speeds up to the set feed rate in areas where it does not, so I have added a component which adjusts the laser power in proportion to the instantaneous velocity defined by X and Y.
Personal tools