So install a decent text editor, from the command line
Code:
sudo apt-get install geany
So now from the instructions in the original post
forum.linuxcnc.org/plasma-laser/40517-do...ions?start=10#188738
Copy the file ddraft4x2.hal from into your config folder.
Now open your ini file in geany and locate the [HAL] section and add the new file to it
Code:
[HAL]
HALUI = halui
HALFILE = my_LinuxCNC_machine.hal
HALFILE = ddraft4x2.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal
Save the ini file
So now Linuxcnc will know to open our extra ddraft4x2.hal file.
From the 7i76e manual, you have used Output 0 to Output 7 so copy the following lines into our new file.
Code:
net zone0 <= ddraft4x2.0.trigger-0
net zone0 => hm2_7i76e.0.7i76.0.0.output-00
net zone1 <= ddraft4x2.0.trigger-1
net zone1 => hm2_7i76e.0.7i76.0.0.output-01
net zone2 <= ddraft4x2.0.trigger-2
net zone2 => hm2_7i76e.0.7i76.0.0.output-02
net zone3 <= ddraft4x2.0.trigger-3
net zone3 => hm2_7i76e.0.7i76.0.0.output-03
net zone4 <= ddraft4x2.0.trigger-4
net zone4 => hm2_7i76e.0.7i76.0.0.output-04
net zone5 <= ddraft4x2.0.trigger-5
net zone5 => hm2_7i76e.0.7i76.0.0.output-05
net zone6 <= ddraft4x2.0.trigger-6
net zone6 => hm2_7i76e.0.7i76.0.0.output-06
net zone7 <= ddraft4x2.0.trigger-7
net zone7 => hm2_7i76e.0.7i76.0.0.output-07
Save the file and from the command prompt run linuxcnc by typing would you believe
if there are any errors, note them. I am assuming you have already compiled and installed the component
It is possible there are some typos above. To guard against this, you may like to check the pin nema in halshow before you make these changes
If for any reason you change your ini file, you will just need to add that line back in.
From where you are now, I would add your limit switched by hand. Part of the job is already done for you in your main ini file where you will find blocks like this:
Code:
# ---setup home / limit switch signals---
net x-home-sw => joint.0.home-sw-in
net x-neg-limit => joint.0.neg-lim-sw-in
net x-pos-limit => joint.0.pos-lim-sw-in
Before these lines, probably where it says
# external input signals
you just need to define these signals
Code:
net x-home-sw <= hm2_7i76e.0.7i76.0.0.input-12-not
net x-neg-limit <= hm2_7i76e.0.7i76.0.0.input-13
net x-pos-limit <= hm2_7i76e.0.7i76.0.0.input-20-not
This is where its important to check everything with halshow to know if you need to use the -not signal and everything is working as expected when you trigger a physical input