Skip to content

Category Archives: EMC

EMC2 Filters

I hacked together a few python-scripts that can be run as "filters" in EMC2. They are opened/run from AXIS and produce G-code into EMC2. The first one is ttt2ngc which simply demonstrates my C++ port of Chris Radek's truetype-tracer. The original code is a rather monolithic C-program while my C++ port is divided into smaller [...]

A/B Quadrature from EMC2

By popular demand a simple example of how to modify the stepper_mm sample configuration to output phase-A/phase-B quadrature signals (stepgen type=2). In core_stepper.hal we specify step type 2, and re-name/wire the stepgen output: loadrt stepgen step_type=2,2,2 net XA parport.0.pin-06-out Since I have neither a parport nor an oscilloscope at hand right now I'm using some [...]

EMC2 simulator build on Ubuntu 11.10

I thought I would build EMC2-simulator on 64-bit Ubuntu 11.10 following the instructions from the wiki. To get the source and dependencies: $ git clone git://git.linuxcnc.org/git/emc2.git emc2-dev $ cd emc2-dev $ cd debian $ ./configure sim $ cd .. $ dpkg-checkbuilddeps Then install all the required packages with "sudo apt-get install". dpkg-checkbuilddeps suggests installing tk8.4 [...]

EMC2 tpRunCycle revisited

I started this EMC2 wiki page in 2006 when trying to understand how trajectory control is done in EMC2. Improving the trajectory controller is a topic that comes up on the EMC2 discussion list every now and then. The problem is just that almost nobody actually takes the time and effort to understand how the [...]

3D printer – first test

After some initial tuning we did three test-prints today of a 10x10mm square, 30 layers, raising the z-axis by 0.5mm for each layer. We tried to set it up so that when the X or Y-axis moves 10mm, the extruder A-axis should also move 10 units. The way it is set up right now it [...]

EMC2 halui jogging example

The slider is used to set the jog speed in units of mm/min and the buttons jog the axes in the + and - directions. HAL and XML files: halui_jog_example

Temperature PID control

We hooked up the temperature measurement circuit and the PWM-amplifier to EMC today and tested PID-control of the extruder head temperature. The ini, hal, and xml files for this are here: temp_control_pid.tar It's probably much easier to figure out the connections from the diagram below than to browse the text files. The square wave, which [...]

EMC2 upgrade

I've upgraded Ubuntu and EMC2 on the Atom 330 machine I have for controlling the lathe. The Atom 330 is a dual-core chip, but with Hyper Threading the OS can see four cores. That's not good for real-time performance, so the first thing I did was turn off HT from the BIOS. Next I did [...]

AXIS with PyVCP Pause/Resume button

This minimal example shows how a pyvcp button can be added to AXIS, wired to a toggle component, then to toggle2nist (which I wrote back in 2008), and then to halui pause/resume. This makes the momentary-on pyvcp button pause the program when pressed once, and resume the program when pressed again. The xml and hal [...]

EMC and EMC2 references

Someone created a wikipedia page for EMC over here: http://en.wikipedia.org/wiki/Enhanced_Machine_Controller The wikipedia-police have immediately put it on the list of pages to be deleted ("unremarkable", "no third party references", "borderline advert", etc.). So I decided to collect some references. It is best to archive them here also, in case the wikipedia page does get deleted. [...]