Difference between revisions of "Main Page"

From Dynomotion

Jump to: navigation, search
(Servo Dither)
(No summary)
Line 156: Line 156:
 
===<span class="mw-headline">Axis Resolution - counts/inch (or counts/mm)</span>===
 
===<span class="mw-headline">Axis Resolution - counts/inch (or counts/mm)</span>===
 
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"></div>
 
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"></div>
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"><span class="mw-headline">Its important to understand the resolution of your Axis which is the number of fundamental raw motor/driver encoder counts or motor steps per standard unit of distance (inch or mm).  Although tuning in KMotion.exe Ste Response Screen and motions within KFLOP typically use units of raw counts or steps it is important to know how these translate to real-world distances, speeds, etc...  Later, applications such as KMotionCNC or Mach3 will need this information to scale motions properly.<br /></span></div>
+
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"><span class="mw-headline">Its important to understand the resolution of your Axis which is the number of fundamental raw motor/driver encoder counts or motor steps per standard unit of distance (inch or mm).  Although tuning in KMotion.exe Step Response Screen and motions within KFLOP typically use units of raw counts or steps it is important to know how these translate to real-world distances, speeds, etc...  Later, applications such as KMotionCNC or Mach3 will need this information to scale motions properly.<br /></span></div>
 
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"></div>
 
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"></div>
 
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"><span class="mw-headline">There are usually a number of factors that combine together to determine the Axis Resolution.  These might include:</span></div>
 
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"><span class="mw-headline">There are usually a number of factors that combine together to determine the Axis Resolution.  These might include:</span></div>
Line 198: Line 198:
 
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;">[[Trajectory Planner Smoothing Noisy GCode|See Analysis and Solution]]</div>
 
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;">[[Trajectory Planner Smoothing Noisy GCode|See Analysis and Solution]]</div>
 
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"></div>
 
<div class="yiv2818182665class" style="color: #000000; font-size: 13.3333px; font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; background-color: transparent; font-style: normal;"></div>
 
 
==Problems and Resolutions==
 
==Problems and Resolutions==
 
====General====
 
====General====
Line 208: Line 207:
 
:* Place links to pages explaining resolutions to problems that are largely hardware-related
 
:* Place links to pages explaining resolutions to problems that are largely hardware-related
 
====[[Step/Dir Drives loose 2 Steps for each pair of Direction Reversals]]====
 
====[[Step/Dir Drives loose 2 Steps for each pair of Direction Reversals]]====
 
 
==Applications and Projects==
 
==Applications and Projects==
 
:* Place links to pages that explain how you accomplished your particular project.  Write clear explanations that provide background on what you did and how you did it.
 
:* Place links to pages that explain how you accomplished your particular project.  Write clear explanations that provide background on what you did and how you did it.

Revision as of 22:14, 10 April 2016

Dynomotion wiki

Welcome to our wiki where you can find and share knowledge on Dynomotion's systems.  To begin adding information to this wiki, simply create an account, verify your email, and start editing (click pencil icon). To make editing pages easier for everyone, we have installed a visual editor by default.  This visual editor allows you to edit a wiki page much like you would a standard word processing document.  For the seasoned wiki editors, standard MediaWiki editing may also be used.


Warning: Use at your own risk.  Information is for example purposes only and may contain errors.  It is up to the User to verify the information is correct and is safe to use. In no case will any contributor or Dynomotion be liable for incorrect information.  Dynomotion reserves the right to modify or delete any contributions.


Thanks for Contributing!

Official Dynomotion Site

Editing and Creating Wiki Pages

Unintuitively, you first create a link to the page you want to make before you can make the page.  To make a new page: while editing, right-click where you want your link to be, insert a link with a descriptive title and link text, save the page, click on the link you created, then click on "Empty Page" to begin editing your new page.

Here are a few other quick tips:

  • You can insert links or images by Right-Clicking with the mouse on the line where you want the link or image to appear.
  • For Spell Correction you can use Ctrl-Right-Click. 
  • To insert a YouTube Video use an EmbedVideo command such as  {{#ev:youtube|xxxxx}} with xxxxx changed to the Video ID.
  • Choose a descriptive page name and link text when creating a new page: e.g. Not "My Machine", but rather "Brand X Three Axis Milling Machine Retrofit"
  • Create pages in an organized manner: Describe what the page is about, create clear sections that flow

For more information:

How to create a new wiki page

How to Edit and insert Media into your wiki pages

Dynomotion Software Topics

Installation Topics

KMotion.exe Executive Software Topics

KMotion.exe is the main program that is used to configure settings in KFLOP, initialize axes, and to write C programs to configure and setup KFLOP to control your system. In this program you can plot step response, test movement, view Bode plots, monitor I/O, set filter parameters, and generally set the pertinent parameters.


Configuration Topics

Channels, Channels, Channels what are they?

Read Article Here


How to Setup Backlash Compensation

Read Article Here

KMotionCNC Software Topics

KMotionCNC is Dynomotion's CNC program used as a graphical user interface to your KFLOP-enabled machine tool. KMotionCNC has all of the basic functionality you need to run a machine of up to 6 axes, in addition to spindle control.

  • Insert pages for other KMotionCNC-related general topics here


Using KMotionCNC

  • Homing discussion - page to be created
  • Insert other KMotionCNC use pages here


Known KMotionCNC CAD/CAM Post Processors

Customize KMotionCNC

KMotionCNC is written as a Windows C++ MFC (Microsoft Foundation Classes) program developed in Visual Studio.  Source code is provided and may be customized using Visual Studio.  MFC Support is a requirement. 

General Information
Compiling KMotionCNC
The KMotionCNC's Visual Studio Project Solution (\PC VC Programs\KMotionCNC\KMotionCNC.sln) is currently written for Visual Studio 2008 Standard.  This version can be used for the simplest compatibility.  Projects can be upgraded to newer version of VS with minimal effort.  Including Microsoft's Free Visual Studio 2013 Community.  More info on PC Example Applications.
KMotionCNC Customization Examples and Applications
Links to examples of projects that explain KMotionCNC customizations
Troy (tmday7) created some helpful documents listed on the Yahoo Group Files Section here.

PC Example Applications

A number of PC Applications using the KMotion Libraries are available in the Software download.  Visual Studio should be used to modify/compile the applications. 

Currently the projects are compatible with VS 2008 Standard but later Versions can upgrade the projects and can be used including the free Microsoft Version of VS 2013 Community.  In some cases MFC capability needs to be added as a separate download.


Note All the projects in KMotion Versions 4.34a and later have now been updated and should work out-of-the-box with VS2015.

More information.

KMotion Libraries - GCode Interpreter - Trajectory Planner - Coordinated Motion - .NET

The KMotion Libraries are a series of DLLs (Dynamic Link Libraries) that reside on the PC that contain the common core motion control, I/O, and communication functionality for KFLOP.  These libraries permit PC Applications to be built using high level control without being concerned with the underlying details of Interpreting GCode, Trajectory Planning, Coordinated Motion, Motion Buffering, USB Communication, etc.

More information.

KFLOP C Programs

C Programs provide a powerful and flexible capability to perform almost any sequence of operations within KFLOP.   In most cases after you have tested and tuned all your hardware using the KMotion.exe setup program all the settings and initialization steps required for your system can be placed into an Initialization C Program so that your system can be fully initialized simply by executing the Initialization program.

More Information


ModBus

Modbus can be connected to the PC or directly to KFLOP.  A PC connection will not be deterministically real-time but may work for basic speed control and on/off.  Here is a related Thread for interfacing KMotionCNC to Modbus using a free utility.

https://groups.yahoo.com/neo/groups/DynoMotion/conversations/topics/7941


To connect Modbus directly to KFLOP's UART see the C Examples in \C Programs\RS232\ModBus\

Dynomotion Hardware Topics

General Hardware Information

KFLOP Hardware Info

KStep Hardware Info

Kanalog Hardware Info

SnapAmp Hardware Info

Konnect Hardware Info


Wiring Diagrams

Basic Kanalog DAC and Encoder Connections 3 Axis

Basic Kanalog DAC and Encoder Connections 3 Axis #2

KFLOP+SnapAmp DC Brush Motors with MPG

KFLOP JP5 Open Collector Step/Dir Connections to Power Step PSD5042-2P Drives

KFLOP+KStep with VFD and NPN Limit Switches for Matrika Rev1

Wiring Topics

Place links to pages on wiring inputs and outputs specific to your experiences and projects.  Be descriptive with page titles and links.


MPG Wiring and Interface

MPGs (Manual Pulse Generators) should be connected directly to KFLOP for guaranteed real-time response (not USB based or connected to the PC).  MPGs are handled by a C Program that monitors the MPG and creates motion based on the MPG Encoder changes and switch selections for axis, speed, and so forth.  See the MPG C Program Examples.  Here is a Discussion with other links.

https://groups.yahoo.com/neo/groups/DynoMotion/conversations/messages/12287

MPG4 from cnc4pc.jpg

Axes Servo Tuning and Trajectory Planner

Velocity, Acceleration, and Jerk

The Velocity, Acceleration, and Jerk in the Step Response Screen (KFLOP parameter settings) and the Acceleration and Velocity in the KMotionCNC | Tool Setup | Trajectory Planner | Axis Parameters are both used for different things.  The two sets of parameters are independent. 
 
The KFLOP parameters are used for 3rd order motions.   These include things like:  Jogging, Homing, and GCode Rapids (G0).  The units in KFLOP are in counts or steps.

The KMotionCNC parameters are used for 2nd order (infinite Jerk) coordinated motion paths.  These are GCode G1,G2,G3 continuous paths.  The units are in Inches (or in some cases degrees).
Tests to find and verify optimal settings for both types of moves should be made using the Step Response Screen.  Optimal settings are usually determined by experimentation.  Although it might be possible to calculate the settings based on motor torque gains, back-emf, amplifier voltage/current, mass, moments of inertia, friction, encoder resolution, leadscrew pitch, required following accuracy, etc... It is often too complicated and with too many unknowns to be practical.  So experimental moves can be tested at ever increasing Velocities, Accelerations, and Jerks until the system is unable to follow the trajectory without having too much error or shock to the system.  After absolute limits of the system are determined then the settings should be backed off by some amount to provide operating margins (ie 20%).

It is usually best to first determine max possible velocity using a relatively low acceleration. Maximum power is usually required at the point of the trajectory where velocity is high and still accelerating.  Supply Voltage limitations tend to limit velocity.  Current limitations tend to limit acceleration.

MaxVelAccelPower.png

The Step Response Screen always performs 3rd order motion but 2nd order motion can be simulated by temporarily setting the Jerk to a huge value (1000X the acceleration value).  In general reducing the Jerk value will result in longer times to perform motions, but often the improved smoothness will permit higher maximum accelerations and velocities to be used resulting in overall shorter motion times.  An analogy might be how you might stop more quickly in a car, without skidding or spilling your coffee, by applying the brakes harder in a more gradual manner rather than slamming on the brakes.

Make sure when testing the size of move is long enough for full acceleration and velocity are achieved.  As a common mistake is to have Acceleration or Velocity Settings set to too high for your system but when testing a short move there is no indication of a problem.  The plot mode of Velocity Output  vs Time can be helpful to verify full Velocity is being achieved.
 

Axis Resolution - counts/inch (or counts/mm)

Its important to understand the resolution of your Axis which is the number of fundamental raw motor/driver encoder counts or motor steps per standard unit of distance (inch or mm).  Although tuning in KMotion.exe Step Response Screen and motions within KFLOP typically use units of raw counts or steps it is important to know how these translate to real-world distances, speeds, etc...  Later, applications such as KMotionCNC or Mach3 will need this information to scale motions properly.
There are usually a number of factors that combine together to determine the Axis Resolution.  These might include:
  • counts or steps per motor revolution
  • any gearing or belts and pulleys involved between motor and drive mechanisms
  • lead screw pitch, rack and pinion tooth pitch, drive belt radius, etc.


For example consider a Stepper Drive with:

3200 steps per motor rev

2:1 gear reduction from motor to lead screw

0.2 inch lead screw pitch


Axis Resolution = 3200 step/motor rev x (2 motor rev/ screw rev)  / (0.2 inch / screw rev) = 32000 steps/inch


To determine whether your assumptions and calculations are correct perform a test.  Command as large of a move as convenient and measure the actual distance moved with a ruler.   For example in the axis described above you might command a move of 320000 steps.  This should result in a motion of:

320000 steps / (32000 steps/inch) = 10 inches.


For KMotionCNC set the Axis Resolution in the Tool Setup | Trajectory Planner Screen | Axis Parameters | cnts/inch.  Note units must be in units of inches.  If your resolution is in mm units multiply by 25.4.


For Mach3 enter the Axis Resolution in the Configuration | Motor Tuning Screen.  Make sure the setup units (not GCode units) match the mode of your values.


Servo Dither/Hunting - (oscillation around zero error)

Servos have high accuracy because they are always actively trying to make corrections and drive the error to zero.  Unfortunately this can sometimes cause annoying dither or position hunting around zero when not moving.  This is a very complex non-linear effect dependent on the dynamics of the mechanics.  Because of the highly non-linear quantization effects of single "steps" in the encoder position, stiction, backlash, etc. it follows different rules and is harder to analyze than normal servo tuning/stability in the larger magnitude more linear regime.  For example attempting to apply "Damping" is unlikely to work.

Lowering gains will usually help at the expense of performance.  However in many cases more than acceptable performance can be achieved with lower gains so one should consider if the higher gains are really needed.

KFLOP has a Deadband Gain and Range feature that can basically be used to tell the servo to not attempt to correct small errors (treat the errors as zero), or to try to correct them less aggressively (with a Gain less than 1.0).  See here for more information

Unfortunately adding Deadband doesn't always help the servo "sit still" and may actually increase the size of the dither depending on the dynamics.


Note that when the servo is commanded to a non integer position ie 999999.7 encoder counts without deadband the servo will always be making corrections.  The best the servo can do is dither between encoder positions 999999.0 and 1000000.0.  With an error of either -0.7 or +0.3.  A servo with Integrator gain will guarantee the average is 999999.7

If dither is still a major problem a C Program might be used to monitor things and change settings under certain conditions to reduce dither.  See the example AntiServoDither__ALL.c which monitors for small errors for a period of time and if so reduces or turns off Integrator gain.

Noisy GCode - Trajectory Planner Smoothing

An analysis of Quantization Noise in GCode and Trajectory Planner Settings to generate smooth motion.
GCode Noisy Path.png

Problems and Resolutions

General

  • Dealing with noise on inputs.  If you experience issues with inputs misreading, the issue may be noise.  This page provides examples on what might be causing noise issues and examples of how to possibly deal with noise.
  • Other

Software-Specific Problems and Resolutions

  • Place links to pages explaining resolutions to problems that are largely software-related here

Hardware-Specific Problems and Resolutions

  • Place links to pages explaining resolutions to problems that are largely hardware-related

Step/Dir Drives loose 2 Steps for each pair of Direction Reversals

Applications and Projects

  • Place links to pages that explain how you accomplished your particular project.  Write clear explanations that provide background on what you did and how you did it.

Tool Changer - router linear 4 Tools - C Program
LINEAT+ATC.jpg

Part Zero & Tool Height Touch Plate

International and other Languages

Russian