Difference between revisions of "Main Page"
From Dynomotion
m (→Hardware requirements) |
m (→Hardware requirements) |
||
Line 361: | Line 361: | ||
<br data-attributes="/"> KNozz provides two Thermistor Inputs to allow KFLOP to monitor the temperature of both the Extruder Nozzle and Bed Heater Platform. 12-bit ADC converter provides better than 1 degree C temperature repeatability. | <br data-attributes="/"> KNozz provides two Thermistor Inputs to allow KFLOP to monitor the temperature of both the Extruder Nozzle and Bed Heater Platform. 12-bit ADC converter provides better than 1 degree C temperature repeatability. | ||
− | Learn more here:<br data-attributes="/"> [ | + | Learn more here:<br data-attributes="/"> [http://www.dynomotion.com/KNozz.html] |
===Software requirements=== | ===Software requirements=== |
Revision as of 13:13, 21 August 2017
Contents
- 1 Dynomotion wiki
- 2 Editing and Creating Wiki Pages
- 3 Dynomotion Software Topics
- 4 Dynomotion Hardware Topics
- 5 Axes Servo Tuning and Trajectory Planner
- 5.1 Velocity, Acceleration, and Jerk
- 5.2 Axis Resolution - counts/inch (or counts/mm)
- 5.3 Servo Dither/Hunting - (oscillation around zero error)
- 5.4 Noisy GCode - Trajectory Planner Smoothing
- 5.5 Arc "faceting" - Trajectory Planner - Collinear Tolerance
- 5.6 I Gain/Max Limit Integrator
- 5.7 Bode Plots
- 6 Problems and Resolutions
- 7 Applications and Projects
- 8 How to convert a milling machine to a 3D printer in 3 easy steps
- 9 International and other Languages
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!
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 Edit and insert Media into your wiki pages
Dynomotion Software Topics
Installation Topics
- Latest Production Release: Full release download page (includes link to signed Windows Drivers) Note:to use signed Drivers for W7 64bit Drivers from V4.34a or later are required. Also all Windows Updates should be performed for the chain of trust to work properly
- Upgrading from previous KMotion Versions
- Latest Test Release: 05/07/2017: KMotion.exe V4.34i, See the release notes for this test version here: V4.34i release notes (pdf)
- Previous Test Release: 12/14/2016: KMotion.exe V4.34h, See the release notes for this test version here: V4.34h release notes (pdf)
- Previous Test Release: 12/13/2016: KMotion.exe V4.34g, See the release notes for this test version here: V4.34g release notes (pdf)
- Previous Test Release: 12/05/2016: KMotion.exe V4.34f, See the release notes for this test version here: V4.34f release notes (pdf)
- Previous Test Release: 11/07/2016: KMotion.exe V4.34e, See the release notes for this test version here: V4.34e release notes (pdf)
- Previous Test Release: 10/32/2016: KMotion.exe V4.34d, See the release notes for this test version here: V4.34d release notes (pdf)
- Previous Test Release: 10/23/2016: KMotion.exe V4.34c, See the release notes for this test version here: V4.34c release notes (pdf)
- Previous Test Release: 10/03/2016: KMotion.exe V4.34b, See the release notes for this test version here: V4.34b release notes (pdf)
- Previous Test Release: 03/09/2016: KMotion.exe V4.34a, See the release notes for this test version here: V4.34a release notes (pdf)
- How to install KMotion.exe and KMotionCNC
- Preparing Windows 10 for driver installation
- Special Case for Windows 8.1 Industry Embedded Enterprise
- How to update KFLOP Firmware - whenever a new version of software is installed, the firmware within KFLOP must be updated to match the new version
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.
- General software information from the manuals
- Insert pages for other KMotion.exe-related topics here
Configuration Topics
Channels, Channels, Channels what are they?
How to Setup Backlash Compensation
PWM Output Mode
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
Internal/concave Path Tool Radius Compensation Example G41/G42
Known KMotionCNC CAD/CAM Post Processors
Invoking C Programs with Execute Only for previously Downloaded Programs
Rigid Tapping G84 Setup and Use
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.
- Note Test Versions 4.34a and later have project solutions targeted for Visual Studio 2015 Community which is free for most Users.
- 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.
- Links to examples of projects that explain KMotionCNC customizations
KMotionCNC Screen Editor
Introduces the capability of using Screen Script files to modify the look and function of KMotionCNC.
More information.
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.
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.
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.
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
Basic Kanalog DAC and DMM DYN4 Drive 1 Axis
Kanalog_with_Geckos_G210 (Thanks to Joseph Mirocha)
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
User Created KFLOP JP7 Breakout/OptoIsolation Board Schematic, Gerbers, PCBs Publicly available (thanks 350banshee)
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
Axes Servo Tuning and Trajectory Planner
Velocity, Acceleration, and Jerk
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). Note there is an Option in KMotionCNC "Rapids as Feeds" where these parameters will also be used for Rapids. But this option should only be used for highly non-linear Kinematic Systems which can not take advantage of faster/smoother 3rd order point to point straight line Rapids.
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. 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.
For example to accelerate to 700,000 counts/sec at an acceleration rate of 700,000 counts/sec^2 would take 1 second. And then to slow back down would take 1 more second. So at least 2 seconds of motion would be required to get to full speed. A 100,000 count move (2 inches for a system with 50,000 counts/inch) takes much less time than that. Furthermore with a relatively low Jerk setting (1e6). This means the acceleration will be applied gradually over 0.7 seconds. This means an even much longer time and distance would be required to achieve top speed.
Here is the method to follow to find 2nd/3rd order motion profile limits:
(note every system is different and will vary based on resolution, motor size/type, mass, etc...)
1 - Find Max Velocity at low Acceleration and infinite Jerk
Choose a Velocity to test (ie V=100000 counts/sec)
Set a moderately low Acceleration Time of 1 second (A = V/1sec = 100000 counts/sec^2)
Set very high Jerk so Acceleration is applied almost instantaneously in 0.001 sec (J = A/0.001sec = 1e8 counst/sec^3)
Test a very long move 20 inches if possible (for resolution 50000 counts/inch, 1,000,000 counts)
Plot Velocity, Output, vs time to see if V is actually obtained
If the motion was successful repeat all above with higher V, if not try lower V
Once Max V is found reduce by some margin (ie 20-50%)
Note you may decide on lower speed for other reasons (safety, vibration, noise, wobble, shock, etc....)
2 - Find Max Acceleration for your system for the chosen Velocity
Using the V found above increase A (keeping Jerk high in the same manner) until the system fails/faults/excessive shock, etc...
Once Max A is found reduce by some margin (ie 20-50%)
These V and A Values are now known good values for your system and can be used for 2nd order motions such as KMotionCNC Trajectory Planner or Mach3 Motor tuning. Note units will need to be converted (counts to inches or mm, time from seconds to minutes depending on the App)
3 - Find optimal 3rd order Jerk limited motions.
The previous result from Step #1 and #2 used nearly infinite Jerk where Acceleration forces were applied nearly instantaneously. By reducing Jerk smoother motion should be possible.
Set Jerk so it is applied over 20ms (ie for A=200000 J = A/0.020 = 1e7
Test to see if motions are smoother. With closed loop systems the Position Error Plot can be used to see if the motion has less error and is smoother. Open loop system will require you to hear the difference.
Increase/decrease Jerk to find the optimal value. Note reducing Jerk a lot will of course make the system very smooth, but will also be much slower using less acceleration and velocity which is undesirable. So the highest Jerk possible should be found that still provides some smoothness.
Reducing Jerk only will always make the system slower with less performance (but hopefully significantly smoother). It is usually then possible to increase Acceleration and Velocity somewhat to achieve even higher performance than what was possible with infinite Jerk while being as smooth or smoother.
4 - Reduce Max Following Error Limit to small value
Axis Resolution - counts/inch (or counts/mm)
- 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)
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
Arc "faceting" - Trajectory Planner - Collinear Tolerance
I Gain/Max Limit Integrator
I (Integrator) Gain can be used to eliminate persistent errors. In fact any Integrator Gain at all guarantees the average error over infinite time is zero. Without I Gain a system might have a small error that does not create enough output to overcome stiction to make a correction. In such a case the error could persist forever. Not so with any Integrator Gain. Any error will be integrated and ramp the output higher and higher until eventually there will be a correction. That assumes the Integrator or Output doesn't saturate or reach their programmed limits. The rate the output ramps (or sums) is dependent on the size of the error and the I Gain value. The Error x I Gain is summed every servo sample (90us). This is why I Gain values are often small numbers (0.0001 - 0.01 typical range). There is no guarantee that the position doesn't over shoot the target Destination. In fact it is likely as as any error (area) under the trajectory will always be balanced by an equal area over the trajectory. Too high of I Gain will make the system unstable.
Another case where I Gain is useful is when moving at high speed with a Velocity Amplifier. To move at high speed a significant amount of output is required. Without I Gain a significant amount of error could be required to provide this Output (ie Error x P Gain = Output). With I Gain the Integrator will eventually ramp up to provide any Output necessary to move at the desired speed driving the error to zero.
Integrators have an issue often referred to as "Integrator Wind Up". This issue usually doesn't arise under normal conditions. However if something is preventing the servo from making a correction such as forcing the position away from the target for a sustained amount of time, or disabling the amplifier, the Integrator will integrate to a huge unlimited value. When the force is removed or amplifier re-enabled, the Integrator will likely cause a violent motion and overshoot. Max Limit Integrator can help to minimize this issue by limiting the amount the Integrator can ramp up to. So the Max Limit Integrator Value should be set at the minimum value that can still allow the Integrator to function in normal circumstances.
Typically there are two cases that should be considered when determining the Max Limit Integrator.
- The amount of output expected to be required to overcome any stiction, friction, or other forces (cutting, gravity, etc...). This is often not a large value and can be estimated or can be observed from the Step Response Screen (green plot right side scale is the output) when making a move.
- The amount of output required to provide the output needed to move at speed. It is important to note that D Gain provides a damping or drag effect on the Output. So the Integrator must be able to ramp up to a sufficient level to overcome the damping or drag effect and still provide enough output to move at the commanded speed. For example:
Assume:
- Commanded speed of 500,000 counts/sec
- D Gain of 35
- Output required to move at speed is 1800 DAC Counts
- Servo Sample Time of 90us
Damping effect = Speed x D Gain x Sample Time = 500000 x 35 x 90e-6 = 1575 counts
Required Integrator Value = 1800 + 1575 = 3375
So to provide some margin an Max Limit Integrator Value of 3500 might be used.
Bode Plots
A Bode Plot is a powerful tool for characterizing and providing insight into a dynamic system. It can help determine closed loop stability, bandwidth/performance, resonant frequencies, and more. It is entirely based on the system being linear. Linear in the sense that if the amplitude of some input signal is changed then the output signal will change proportionally as well. Unfortunately most systems are not entirely linear. Stiction, backlash, encoder quantization, amplifier saturation, and other effects are non-linear. For example driving a system with a signal too small to overcome stiction will result in no output at all whereas a larger signal will result in some output. This is clearly non-linear behavior. It would be nice to use a technique that handles non-linear systems but basically none are known.
A Bode Plot is made injecting a stimulus to the system and observing how the system responds. For the reasons of non-linearity it is very important to perform a Bode Plot measurement using a representative level of stimulus similar to what the system will actually have during normal operation. If the Stimulus is not adjusted properly the result is likely to be completely invalid. Additionally the system should be reasonably tuned and stable so that it is responding in a reasonable way to the stimulus. If the system is unstable or very poorly tuned the result is likely to be completely invalid.
You might think of it somewhat like shaking a box to determine what is in it. You should shake it with enough intensity and at frequencies to get some reaction, but not so high of intensity to break or distort the object inside.
To create a Bode Plot use the KMotion.exe Bode Plot Screen. First select Plot: Time domain - Command, Position, Output vs Time and adjust the Amplitude and cutoff Freq until there is small but significant Position (red) changes (ie 50 encoder counts), at a frequency low enough that the Position at least somewhat attempts to follow the Command (blue), and where the Output (green) is not near saturation for the Drive being used.
After the Stimulus/Noise Injection settings are set switch to Plot: Open Loop - Magnitude and Phase vs Frequency. Set the number of Samples to average (ie 20) and perform a Measurement. See here for more information.
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
Part Zero & Tool Height Touch Plate
HiTec Type
How to convert a milling machine to a 3D printer in 3 easy steps
Hardware requirements
The only real differences between a CNC machine and a 3D printer are in the tool head and the heated build platform. CNC machines use spindles, but some 3D printers use extruders (hot plastic extruder).
There are two parts in an extruder: 1) a filament drive mechanism with a stepper motor to push the filament into the hot end and 2) the hot end itself.
The temperature in the hot end must be measured and stabilized.
1. Extruder NozzleThere are many third party extruders on the market. Search for popular 3D printer extruders, for example: https://reprapchampion.com/collections/extruders.
2. Heated BedA heated bed is often used to help with both the first layers to adhere to the build platform as well as to keep the part warm to reduce shrinkage and curl.
MK3 Aluminum Heater Bed (around $24).
Add a Pyrex glass to provide an absolute flat surface (around $19).
Example below shows heater bed with glass and bulldog clips.
The heater bed will connect to the KNozz board ([1]).
3. Bowden Extruder
Controls feeding the material into the hot end.
Metal Bowden Extruder for 1.75mm filament with stepper motor. Can be driven by KSTEP. (e.g.: All Metal V6 Hotend 1.75mm Bowden Extruder Prusa i3, around $25).
4. Adding a KNozz to your KFLOP
KNozz is designed to control the Nozzle Heater and Bed Heater for an Extrusion Type 3D Printer.
KNozz provides two Thermistor Inputs to allow KFLOP to monitor the temperature of both the Extruder Nozzle and Bed Heater Platform. 12-bit ADC converter provides better than 1 degree C temperature repeatability.
Learn more here:
[2]
Software requirements
CraftWare
CraftWare (https://craftunique.com/craftware) is a free and easy-to-use slicer software that converts your digital 3D object into a GCode toolpath format understood by most 3D printers.
GCode Converter Program (PostProccessExtruder)
Converts Craftware’s GCode to KMotionCNC compatible GCode (mainly changes Extruder E-words into U-words).
Video
Geppetto 3D Prints Skulls at ATX 2017 show:
https://www.youtube.com/watch?v=tOFb8tOTMlM
(Published on Feb 15, 2017)
6 Axes Cable Robot (Geppetto) controlled by Dynomotion KFLOP 3D Prints parts. Extrusion Head added to Geppetto End Effector. Demonstrates 7 axes of coordinated motion and kinematics.