With this workaround the EMC hardware abstraction (HAL-) layer can be configured with the aid of Eagle CAD Schematics editor.|
With this workaround the LinuxCNC hardware abstraction (HAL-) layer can be configured with the aid of Eagle CAD Schematics editor.|
The export script does not check for any errors, so debugging is made by starting emc and checking stdout/stderr-debug-prints|
The export script does not check for any errors, so debugging is made by starting LinuxCNC and checking stdout/stderr-debug-prints|
* [EMC2] (tested with version 2.2.2)|
* [LinuxCNC] (tested with version 2.2.2)|
* [eagle2hal-2.4] library + export script updated for EMC2 2.4 / Eagle 5.13 -- Ed Nisley [Logitech gamepad schematics]|
* [eagle2hal-2.4] library + export script updated for LinuxCNC 2.4 / Eagle 5.13 -- Ed Nisley [Logitech gamepad schematics]|
*[upload:eagle2hal.tar.gz] The same with eagle2hal-2.4 with more hal components. I add paragraph 6 for hal component creation in eagle library. Charalampos Alexopoulos
I know of two threads that are running im EMC realtime: BASE-THREAD and SERVO-THREAD (maybe there are more...).|
I know of two threads that are running im LinuxCNC realtime: BASE-THREAD and SERVO-THREAD (maybe there are more...).|
I spend several hours to understood how to make a library part for a hal-component. In order to help incapable people like me, i wrote some tips.
*Add a text [>Name] on the Names layer
*For each pin set the properties
Name : the name as is in the man page
*Create a device with a name as is in the Name part of man pages. eg. conv_float_u32
*Add the symbol that you create
Name: Live it empty
Add Level: Must
*Add symbol [PIN-FUCTION]
Name: . (Just a dot)
Add level: Must
*add symbol [PIN-PARAMETER] as many as required by the component.
Name: .name(A dot followed by the parameter name)
Add Level: I am not sure what is going here. I use [Must] and works.
*Connect all pins to the DUMMY package.
*Set the Prefix to the component name as is in the Functions part of the man page followed by a dot. e.g. conv-float-u32.
*Add a description from man page. This is optional, but it takes just a few seconds and we have a nice help for the component
Copy the html code from man page.Copy only the part from Name down to Licence.
In the [hal-write-2.4.ulp[ file add your component name in the [dev_names] array. Thats it.
Those are things that i found in a trial and error procedure. It works for me but may contain errors.
With this workaround the LinuxCNC hardware abstraction (HAL-) layer can be configured with the aid of Eagle CAD Schematics editor.
Since the export script and the library are a workaround for configuring hal-layer, basic knowledge about EAGLE and the hal-components are required.
The library contains only part of the hal components and makes no claim to be complete!
The export script does not check for any errors, so debugging is made by starting LinuxCNC and checking stdout/stderr-debug-prints
If the time-slot is important, you can choose between serveral time slots (negative and positive ones). If they are not sufficiant, just edit the device in the library and add some more pins by keeping the naming conventions...
The example script martin_old.sch show the author's configuration of a small desktop-mill controlled over one parallel-port.
Left hand all the realtime-modules that are loaded at the beginning of the hal-configuration are listed.
Underneath the two threads are shown.
The center shows the default axis-configuration for three axis.
To the right the parallel port collects all the signals and routes them to the hardware.
All the stuff above the axis configuration is for generating a 'sleep'- and a 'boost'-signal for the axis-drivers.
('Sleep' is used to lower the stepper's current when no motion is commanded.
'Boost' increases the current when at least one stepper starts moving - OK, it should do so, but it doesn't work correct, at least it shows some more possibilities of this export-script...)
Keep in mind: This is only a workaround, so many bugs and errors may follow...
When starting a new configuration the easiest way is to copy an older one.
Export is done by executing the user language program 'hal-write.ulp'. Maybe you have a look at the source code and replace the export path to your needs.
It is very important to consider some rules and naming conventions:
[Contact the author] for feedback or questions.
Enjoy the bugs