Search Results (Searched for: estop_latch)
- cakeslob
- cakeslob
06 May 2025 01:27
Replied by cakeslob on topic Remora - ethernet NVEM / EC300 / EC500 cnc board
Remora - ethernet NVEM / EC300 / EC500 cnc board
Category: Computers and Hardware
alright now, any questions?
that makes sense.
refer to tuxcnc example
I havent tested it, but this looks like what you need to do. you need to modify the portion of your halfile that already references it
refer to the previous posts. replace the stepgen in your config.txt with the DMA stepgen. Make sure the step and direction pins are the NVEM one. The step time and space parts are what you need to configure. I dont know the units. start at 1 and 1 and go up from there.
I started from scratch with the standard examples. I made some adjustments, and now Remora Input 4 is responding. However, this only happens when the emergency shutdown is disabled in the GUI. So, Remora probably only starts working after that.
that makes sense.
refer to tuxcnc example
#tuxcnc
#External e-stop (fault) on EC500 input.
loadrt estop_latch
addf estop-latch.0 servo-thread
net estop-loopout iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net user-enable-out iocontrol.0.user-enable-out => remora.enable
net estop-loopin remora.status => estop-latch.0.ok-in => estop-latch.0.reset
net estop-reset iocontrol.0.user-request-enable => remora.reset
net remote-estp estop-latch.0.fault-in <= remora.input.02.notI havent tested it, but this looks like what you need to do. you need to modify the portion of your halfile that already references it
I have recreated the problem with the function generator. Now I am sure the problem lies in the configuration, or so I believe. For now, I would like to know which parameters I need to set to have the same parameters for frequency and pulse times in the hal and ini files (like pulse 1,000,000ns frequency 988Hz). Thank you again for your patience!
refer to the previous posts. replace the stepgen in your config.txt with the DMA stepgen. Make sure the step and direction pins are the NVEM one. The step time and space parts are what you need to configure. I dont know the units. start at 1 and 1 and go up from there.
- cakeslob
- cakeslob
06 May 2025 00:24
Replied by cakeslob on topic Remora - ethernet NVEM / EC300 / EC500 cnc board
Remora - ethernet NVEM / EC300 / EC500 cnc board
Category: Computers and Hardware
Estop is the same way. With Estop, we are connecting a remora.input to LinuxCNC estop. Estop is a very subjective thing, and varies between setups. They can be complicated and require more hardware. Murphy has posted a simple example, and tux from a few pages back has posted a more detailed one.
Notice how the inputs are different on each of their different estops, which makes no difference because we are connecting remora.input.whatever to linuxcnc estop.
Tuxcnc is more complicated, He is using LinuxCNC components (not remora) to configure the estop logic. it includes a latching component, I assume he has one of those red buttons. Im not as knowledgeable with all the estop logic, as I live dangerously. The estop loop is a function of LinuxCNC and you need to connect it to remora in a way that suits your setup.
# Murphy
#This is my E-stop in my .hal file.
#It's just a switch. Once the input is triggered it should work.
net nvem-estop <= estop-latch.0.fault-in <= remora.input.14#tuxcnc
#External e-stop (fault) on EC500 input.
loadrt estop_latch
addf estop-latch.0 servo-thread
net estop-loopout iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net user-enable-out iocontrol.0.user-enable-out => remora.enable
net estop-loopin remora.status => estop-latch.0.ok-in => estop-latch.0.reset
net estop-reset iocontrol.0.user-request-enable => remora.reset
net remote-estp estop-latch.0.fault-in <= remora.input.02.notNotice how the inputs are different on each of their different estops, which makes no difference because we are connecting remora.input.whatever to linuxcnc estop.
Tuxcnc is more complicated, He is using LinuxCNC components (not remora) to configure the estop logic. it includes a latching component, I assume he has one of those red buttons. Im not as knowledgeable with all the estop logic, as I live dangerously. The estop loop is a function of LinuxCNC and you need to connect it to remora in a way that suits your setup.
- DarkPhoinix
- DarkPhoinix
05 May 2025 20:27
Replied by DarkPhoinix on topic Remora - ethernet NVEM / EC300 / EC500 cnc board
Remora - ethernet NVEM / EC300 / EC500 cnc board
Category: Computers and Hardware
Hi, what board do you have? with what microcontroller?This is my E-stop in my .hal file.
net nvem-estop <= estop-latch.0.fault-in <= remora.input.14
It's just a switch. Once the input is triggered it should work.
- Murphy
- Murphy
05 May 2025 17:55 - 05 May 2025 17:57
Replied by Murphy on topic Remora - ethernet NVEM / EC300 / EC500 cnc board
Remora - ethernet NVEM / EC300 / EC500 cnc board
Category: Computers and Hardware
This is my E-stop in my .hal file.
net nvem-estop <= estop-latch.0.fault-in <= remora.input.14
It's just a switch. Once the input is triggered it should work.
net nvem-estop <= estop-latch.0.fault-in <= remora.input.14
It's just a switch. Once the input is triggered it should work.
- H-S-W
- H-S-W
23 Apr 2025 08:13 - 23 Apr 2025 11:42
Mesa CT 2.1.7 and Mesa 7I97T setup running Gmoccapy was created by H-S-W
Mesa CT 2.1.7 and Mesa 7I97T setup running Gmoccapy
Category: Configuration Tools
Hi! Beginner here doing a linuxcnc conversion on an Maho MH500 using a 7I97T and a Rpi5. Running Linuxcnc 2.10, Gmoccapy 3.4.9 and Mesa CT 2.1.7.
Connecting 7I97T "Output 0" to "E-stop Out" in the Mesa CT seems to connect "hm2_7i97.0.ssr.00.out-00 <== estop-loopback". I also have a external E-stop connected which seems to behave as predicted, when pressed Gmoccapy E-stop responds and is unable to release until the external has been.
looking at the estop-loopback in halshow i can never get it to change state..? shouldn't it as soon as i've released the E-Stop in Gmoccapy?
INI
io.hal
/Hampus
Connecting 7I97T "Output 0" to "E-stop Out" in the Mesa CT seems to connect "hm2_7i97.0.ssr.00.out-00 <== estop-loopback". I also have a external E-stop connected which seems to behave as predicted, when pressed Gmoccapy E-stop responds and is unable to release until the external has been.
looking at the estop-loopback in halshow i can never get it to change state..? shouldn't it as soon as i've released the E-Stop in Gmoccapy?
INI
[MESA]
VERSION = 2.1.7
BOARD = 7i97
BOARD_NAME = 7i97t
FIRMWARE = 7i97t_d.bin
CARD_0 = None
CARD_1 = None
[EMC]
VERSION = 1.1
MACHINE = FIRST_SETUP
DEBUG = 0x00000000
[HM2]
DRIVER = hm2_eth
ADDRESS = 10.10.10.10
[DISPLAY]
DISPLAY = gmoccapy
EDITOR = geany
PROGRAM_PREFIX = /home/cnc/linuxcnc/nc_files
POSITION_OFFSET = MACHINE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
MIN_LINEAR_VELOCITY = 0.0
DEFAULT_LINEAR_VELOCITY = 2.0
MAX_LINEAR_VELOCITY = 5.0
CYCLE_TIME = 0.1
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 0
OPEN_FILE = ""
[KINS]
KINEMATICS = trivkins coordinates=XYZ
JOINTS = 3
[EMCIO]
EMCIO = iov2
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[RS274NGC]
PARAMETER_FILE = parameters.var
SUBROUTINE_PATH = /home/cnc/linuxcnc/subroutines
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[TRAJ]
COORDINATES = XYZ
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 33.0
NO_FORCE_HOMING = 1
[HAL]
HALFILE = main.hal
HALFILE = io.hal
HALUI = halui
[HALUI]
[AXIS_X]
MIN_LIMIT = 0
MAX_LIMIT = 490
MAX_VELOCITY = 66
MAX_ACCELERATION = 75
[JOINT_0]
CARD = 0
TAB = 0
AXIS = X
MIN_LIMIT = 0
MAX_LIMIT = 490
MAX_VELOCITY = 66
MAX_ACCELERATION = 75
TYPE = LINEAR
SCALE = -1
ANALOG_SCALE_MAX = 10
ANALOG_MIN_LIMIT = -10
ANALOG_MAX_LIMIT = 10
ENCODER_SCALE = -2000
FERROR = 3
MIN_FERROR = 1
DEADBAND = 0.00025
P = 0.45
I = 0
D = 0
FF0 = 0
FF1 = 0.0134
FF2 = 0.0001
BIAS = 0
MAX_OUTPUT = 10
MAX_ERROR = 25
HOME_SEARCH_VEL = -8
HOME_LATCH_VEL = -1
HOME_FINAL_VEL = 3
HOME_SEQUENCE = 0
HOME_USE_INDEX = True
[AXIS_Y]
MIN_LIMIT = 0
MAX_LIMIT = 335
MAX_VELOCITY = 66
MAX_ACCELERATION = 75
[JOINT_1]
CARD = 0
TAB = 1
AXIS = Y
MIN_LIMIT = 0
MAX_LIMIT = 335
MAX_VELOCITY = 66
MAX_ACCELERATION = 75
TYPE = LINEAR
SCALE = 1
ANALOG_SCALE_MAX = 10
ANALOG_MIN_LIMIT = -10
ANALOG_MAX_LIMIT = 10
ENCODER_SCALE = 2000
FERROR = 3
MIN_FERROR = 1
DEADBAND = 0.00025
P = 0.45
I = 0
D = 0
FF0 = 0
FF1 = 0.0134
FF2 = 0.0001
BIAS = 0
MAX_OUTPUT = 10
MAX_ERROR = 25
HOME_SEARCH_VEL = -8
HOME_LATCH_VEL = -1
HOME_FINAL_VEL = 3
HOME_SEQUENCE = 1
HOME_USE_INDEX = True
[AXIS_Z]
MIN_LIMIT = -320
MAX_LIMIT = 0
MAX_VELOCITY = 33
MAX_ACCELERATION = 75
[JOINT_2]
CARD = 0
TAB = 2
AXIS = Z
MIN_LIMIT = -320
MAX_LIMIT = 0
MAX_VELOCITY = 33
MAX_ACCELERATION = 75
TYPE = LINEAR
SCALE = 0.5
ANALOG_SCALE_MAX = 10
ANALOG_MIN_LIMIT = -10
ANALOG_MAX_LIMIT = 10
ENCODER_SCALE = 2000
FERROR = 3
MIN_FERROR = 1
DEADBAND = 0.00025
P = 0.45
I = 0
D = 0
FF0 = 0
FF1 = 0.0134
FF2 = 0.0001
BIAS = 0
MAX_OUTPUT = 10
MAX_ERROR = 25
HOME_SEARCH_VEL = 6
HOME_LATCH_VEL = 1
HOME_FINAL_VEL = 3
HOME_SEQUENCE = 2
HOME_USE_INDEX = True
[INPUTS]
# DO NOT change the inputs they are used by the configuration tool
INPUT_0_0 = E Stop 0
INPUT_INVERT_0_0 = False
INPUT_SLOW_0_0 = False
[OUTPUTS]
# DO NOT change the outputs they are used by the configuration tool
OUTPUT_0_1 = Spindle CW
OUTPUT_INVERT_0_1 = False
OUTPUT_0_2 = Spindle CCW
OUTPUT_INVERT_0_2 = False
OUTPUT_0_3 = Coolant Flood
OUTPUT_INVERT_0_3 = False
OUTPUT_0_4 = Tool Change
OUTPUT_INVERT_0_4 = False
OUTPUT_0_0 = E-Stop Out
OUTPUT_INVERT_0_0 = False
[OPTIONS]
# DO NOT change the options they are used by the configuration tool
LOAD_CONFIG = True
INTRO_GRAPHIC = emc2.gif
INTRO_GRAPHIC_TIME = 0
MANUAL_TOOL_CHANGE = True
CUSTOM_HAL = False
POST_GUI_HAL = False
SHUTDOWN_HAL = Falseio.hal
# Inputs
# E-Stop Chain
loadrt estop_latch count=1
addf estop-latch.0 servo-thread
# E-Stop Loop
net estop-loopin iocontrol.0.user-enable-out => estop-latch.0.ok-in
net estop-loopout estop-latch.0.ok-out => iocontrol.0.emc-enable-in
# E-Stop Reset
net estop-reset iocontrol.0.user-request-enable
net estop-reset => estop-latch.0.reset
net remote-estop0 estop-latch.0.fault-in <= hm2_7i97.0.inmux.00.input-00
# Outputs
net estop-loopback => hm2_7i97.0.ssr.00.out-00
net spindle-cw spindle.0.forward => hm2_7i97.0.ssr.00.out-01
net spindle-ccw spindle.0.reverse => hm2_7i97.0.ssr.00.out-02
net flood-output iocontrol.0.coolant-flood => hm2_7i97.0.ssr.00.out-03/Hampus
- pgf
- pgf
12 Apr 2025 14:23
Replied by pgf on topic Running an external program from a HAL pin
Running an external program from a HAL pin
Category: HAL
I spent my career trying to write reasonably efficient and fast code in firmware, device drivers and system level utilities. I'm afraid I just couldn't stomach adding a polling loop on top of the polling loop (every .2 seconds) that I discovered at the core of halui.
So I've done an end-run around the problem, which works nicely.
My mill runs from a Raspberry Pi, connected via a Mesa ethernet card. It occurred to me that if HAL could twiddle an actual gpio pin, then I could easily read that, and hook it up to action. And of course if there's one thing the RPi has, it's plenty of gpio.
So I loaded hal_gpio, and hooked up a couple of output pins:
Those pins were chosen because they were eacy immediately adjacent to another unused pin. Gpio 16 is next to 19, and 20 is next to 26. I jumpered those two pairs.
Then I wrote a short script using gpiomon to watch pins 19 and 26 for transitions.
This works perfectly.
While I'm pleased to have found this solution, it sure seems silly to have had to consume 4 gpio pins in order to do it.
Thanks for all your suggestions!
paul
So I've done an end-run around the problem, which works nicely.
My mill runs from a Raspberry Pi, connected via a Mesa ethernet card. It occurred to me that if HAL could twiddle an actual gpio pin, then I could easily read that, and hook it up to action. And of course if there's one thing the RPi has, it's plenty of gpio.
So I loaded hal_gpio, and hooked up a couple of output pins:
loadrt hal_gpio outputs=GPIO16,GPIO20
addf hal_gpio.write servo-thread
net external-estop-off \
estop-latch.0.fault-out => hal_gpio.GPIO16-out
net coolant-mist => hal_gpio.GPIO20-outThose pins were chosen because they were eacy immediately adjacent to another unused pin. Gpio 16 is next to 19, and 20 is next to 26. I jumpered those two pairs.
Then I wrote a short script using gpiomon to watch pins 19 and 26 for transitions.
#!/bin/bash
estop=19
vacuum=26
switch()
{
echo Turning $1 $2 # e.g. "Turning vacuum on"
wget -q -O /dev/null http://service:9901/event:cnc-mill-$1-$2 &
}
while read pinevent
do
echo got $pinevent # this will be "19-1", "19-0", "26-1", or "26-0"
case $pinevent in
$estop-1)
switch spindle off
;;
$vacuum-0)
switch vacuum off
;;
$vacuum-1)
switch vacuum on
;;
esac
done < <( gpiomon --line-buffered --format="%o-%e" gpiochip0 19 26)This works perfectly.
While I'm pleased to have found this solution, it sure seems silly to have had to consume 4 gpio pins in order to do it.
Thanks for all your suggestions!
paul
- pgf
- pgf
11 Apr 2025 18:01 - 11 Apr 2025 19:36
Running an external program from a HAL pin was created by pgf
Running an external program from a HAL pin
Category: HAL
[ Damn. I edited the post to clarify some wording, and now the code blocks are broken. I'm not going to try to fix them. :-/ ]
I'd like to run an external program after an e-stop event. I thought it was going to be easy.
I have the program (which goes into the background, so there's no delay) in M101. M101 works when I invoke it via MDI.
I have a g-code snippet which invokes M101:
[/code][/code][/code]
I'd like to run an external program after an e-stop event. I thought it was going to be easy.
I have the program (which goes into the background, so there's no delay) in M101. M101 works when I invoke it via MDI.
I have a g-code snippet which invokes M101:
(subroutine which just runs my spindle off script)
o<my_spindle_off> sub
(MSG, my_spindle_off)
M101
o<my_spindle_off> endsub
That, in turn, is run via MDI_COMMAND, just like my homing and touch-off routines:
[code][HALUI]
MDI_COMMAND = o<reset_g54> call
MDI_COMMAND = o<auto_x_minus> call
MDI_COMMAND = o<auto_x_plus> call
MDI_COMMAND = o<auto_y_minus> call
MDI_COMMAND = o<auto_y_plus> call
MDI_COMMAND = o<auto_z_minus> call
MDI_COMMAND = o<home_x> call
MDI_COMMAND = o<home_y> call
MDI_COMMAND = o<home_z> call
MDI_COMMAND = o<reset_g54_rot> call
MDI_COMMAND = o<my_spindle_off> call
In custom.hal:
[code]loadrt estop_latch
addf estop-latch.0 servo-thread
net estop-loopout \
iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net estop-loopin \
iocontrol.0.user-enable-out => estop-latch.0.ok-in
net estop-reset \
iocontrol.0.user-request-enable => estop-latch.0.reset
net remote-estop \
estop-latch.0.fault-in <= hm2_7i96.0.gpio.003.in_not
And in custom_postgui.hal:
[code]net external-estop-off \
estop-latch.0.fault-out => halui.mdi-command-10
With halshow, I can see net external-estop-off and pin estop-latch.0.fault-out change state when I go in and out of e-stop state, but my command never runs. Ideas?
paul- tuxcnc
- tuxcnc
25 Mar 2025 18:52
Replied by tuxcnc on topic Remora - ethernet NVEM / EC300 / EC500 cnc board
Remora - ethernet NVEM / EC300 / EC500 cnc board
Category: Computers and Hardware
External e-stop (fault) on EC500 input.
loadrt estop_latch
addf estop-latch.0 servo-thread
net estop-loopout iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net user-enable-out iocontrol.0.user-enable-out => remora.enable
net estop-loopin remora.status => estop-latch.0.ok-in => estop-latch.0.reset
net estop-reset iocontrol.0.user-request-enable => remora.reset
net remote-estp estop-latch.0.fault-in <= remora.input.02.not- rodw

23 Feb 2025 07:36
QT dragon works well with my setup (as does Axis) I don't use estop_latch with it.
Replied by rodw on topic estop issue
estop issue
Category: HAL
The video (not mine) explains why. My last couple of machines I used a safety relay so estop is external and I utilised an external reset button but I did test and consider using user_request_enable. You should not depend on a software estop if you have ired one in anyway.
You should use estop-latch
Why?
-
Yes, there are instances when it is very useful, but not on simple/hobby/small machines, and especially not for beginners.
QT dragon works well with my setup (as does Axis) I don't use estop_latch with it.
- tommylight

23 Feb 2025 00:29
-
Yes, there are instances when it is very useful, but not on simple/hobby/small machines, and especially not for beginners.
Replied by tommylight on topic estop issue
estop issue
Category: HAL
Why?You should use estop-latch
-
Yes, there are instances when it is very useful, but not on simple/hobby/small machines, and especially not for beginners.
- rodw

23 Feb 2025 00:05
Replied by rodw on topic estop issue
estop issue
Category: HAL
You should use estop-latch
There is an example in hal examples on the forum
and this video
There is an example in hal examples on the forum
and this video
- MTTI

17 Feb 2025 08:16
But i'm not an expert in this type of configuration...
Replied by MTTI on topic New and Working RTAI debs for 2.9
New and Working RTAI debs for 2.9
Category: Installing LinuxCNC
You're right, into the HAL file, there is only mention of servo-thread:
Thanks for this answer.
I would like to install RTAI due to the jitter in my setup, which is around 70k.
I'm using 4 stepper motors with encoders (closed loop) and a USC board from PICO.
Sometimes, though not very often, I get an "Unexpected realtime delay" message.
Do you think this could be related to the jitter amount?
I've tried every optimization I could find in the BIOS...
Just having a look at the PICO config, is the base thread used ? From a quick look nothing appears to attach to the base thread. Which would lead me to think that a simple RT_PREEMPT kernel would be suffice. The PICO board would seem to operate in a simialr way to a mesa 7i90 using the EPP protocol. IE using the parallel port to send timing info to a FPGA.
# Generated by stepconf 1.1 at Tue Jan 28 10:21:07 2025
# Si vous modifiez ce fichier, il sera
# écrasé quand vous relancerez Stepconf
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS num_spindles=[TRAJ]SPINDLES
# next load the PID module, for four PID loops
loadrt pid num_chan=4
loadrt plasmac
loadrt hal_ppmc epp_dir=1
# make some signals for the scope for tuning.
loadrt ddt count=4
# add components for E-stop logic
loadrt estop_latch count=1
loadrt and2 count=1
# set up the realtime thread
# read inputs first
addf ppmc.0.read servo-thread
# then run the motion controller
addf motion-command-handler servo-thread
addf and2.0 servo-thread
addf estop-latch.0 servo-thread
addf motion-controller servo-thread
# then the PID loops
addf pid.0.do-pid-calcs servo-thread
addf pid.1.do-pid-calcs servo-thread
addf pid.2.do-pid-calcs servo-thread
addf pid.3.do-pid-calcs servo-thread
# write outputs last
addf ppmc.0.write servo-thread
# ---PLASMA INPUT DEBOUNCE---
loadrt dbounce names=db_breakaway,db_float,db_ohmic,db_arc-ok
addf db_float servo-thread
addf db_ohmic servo-thread
addf db_breakaway servo-thread
addf db_arc-ok servo-thread
# ---JOINT ASSOCIATED WITH THE Z AXIS---
net plasmac:axis-position joint.2.pos-fb => plasmac.axis-z-position
# ---PLASMA INPUTS---
# ---all modes---
net plasmac:float-switch => db_float.in
net plasmac:breakaway => db_breakaway.in
net plasmac:ohmic-probe => db_ohmic.in
net plasmac:ohmic-sense-in => plasmac.ohmic-sense-in
# ---modes 0 & 1
net plasmac:arc-voltage-in => plasmac.arc-voltage-in
# ---modes 1 & 2
net plasmac:arc-ok-in => db_arc-ok.in
# ---mode 2
net plasmac:move-up => plasmac.move-up
net plasmac:move-down => plasmac.move-down
# ---PLASMA OUTPUTS---
# ---all modes---
net plasmac:ohmic-enable <= plasmac.ohmic-enable
net plasmac:scribe-arm <= plasmac.scribe-arm
net plasmac:scribe-on <= plasmac.scribe-on
# connect limit/home switch outputs to motion controller
net Xminlim <= ppmc.0.din.01.in
net Xminlim => joint.0.neg-lim-sw-in
net Xmaxlim <= ppmc.0.din.02.in
net Xmaxlim => joint.0.pos-lim-sw-in
net Xhome <= ppmc.0.din.00.in
net Xhome => joint.0.home-sw-in
net Yminlim <= ppmc.0.din.05.in
net Yminlim => joint.1.neg-lim-sw-in
net Ymaxlim <= ppmc.0.din.06.in
net Ymaxlim => joint.1.pos-lim-sw-in
net Yhome <= ppmc.0.din.04.in
net Yhome => joint.1.home-sw-in
net Zminlim <= ppmc.0.din.09.in
net Zminlim => joint.2.neg-lim-sw-in
net Zmaxlim <= ppmc.0.din.10.in
net Zmaxlim => joint.2.pos-lim-sw-in
net Zhome <= ppmc.0.din.08.in
net Zhome => joint.2.home-sw-in
net Aminlim <= ppmc.0.din.12.in
net Aminlim => joint.3.neg-lim-sw-in
net Amaxlim <= ppmc.0.din.13.in
net Amaxlim => joint.3.pos-lim-sw-in
net Ahome <= ppmc.0.din.11.in
net Ahome => joint.3.home-sw-in
# connect index pulses to motion controller
# uncomment these lines only if you have a Rev 2 USC board
# newsig Xindex bit
# newsig Yindex bit
# newsig Zindex bit
# newsig Aindex bit
# linksp Xindex <= ppmc.0.encoder.00.index-enable
# linksp Xindex => joint.0.index-enable
# linksp Yindex <= ppmc.0.encoder.01.index-enable
# linksp Yindex => joint.1.index-enable
# linksp Zindex <= ppmc.0.encoder.02.index-enable
# linksp Zindex => joint.2.index-enable
# linksp Aindex <= ppmc.0.encoder.03.index-enable
# linksp Aindex => joint.3.index-enable
#
# Connect I/O controller I/Os
#
# connect e-stop write/sense to I/O controller
# and univstep's fault with estop's output, so estop FF is reset, but
# prevent continued estop signal from univstep from holding FF cleared
net ppmcEstop ppmc.0.din.15.in-not
net ppmcEstop and2.0.in0
net EstopOkIn estop-latch.0.fault-in
net EstopOkIn and2.0.out
net EstopOkOut <= ppmc.0.dout.07.out
net EstopOkOut iocontrol.0.emc-enable-in
net EstopOkOut estop-latch.0.ok-out
net EstopOkOut and2.0.in1
net emc-estop-out iocontrol.0.user-enable-out
net emc-estop-out estop-latch.0.ok-in
net emc-estop-reset iocontrol.0.user-request-enable
net emc-estop-reset estop-latch.0.reset
net emc-estop-out estop-latch.0.ok-in
# connect spindle fwd/rev to I/O controller
net SpindleFwd <= ppmc.0.dout.00.out
net SpindleFwd => spindle.0.forward
net SpindleRev <= ppmc.0.dout.01.out
net SpindleRev => spindle.0.reverse
# connect spindle brake to I/O controller
net SpindleBrakeOn <= ppmc.0.dout.02.out
net SpindleBrakeOn => spindle.0.brake
# connect mist/flood coolant to I/O controller
net MistOn <= ppmc.0.dout.03.out
net MistOn => iocontrol.0.coolant-mist
net FloodOn <= ppmc.0.dout.04.out
net FloodOn => iocontrol.0.coolant-flood
# connect position feedback signals to encoders
net Xpos-fb <= ppmc.0.encoder.00.position
net Ypos-fb <= ppmc.0.encoder.01.position
net Zpos-fb <= ppmc.0.encoder.02.position
net Apos-fb <= ppmc.0.encoder.03.position
# get feedback scaling from ini file
setp ppmc.0.encoder.00.scale [JOINT_0]INPUT_SCALE
setp ppmc.0.encoder.01.scale [JOINT_1]INPUT_SCALE
setp ppmc.0.encoder.02.scale [JOINT_2]INPUT_SCALE
setp ppmc.0.encoder.03.scale [JOINT_3]INPUT_SCALE
# connect PID output signals to step generators
net Xoutput => ppmc.0.stepgen.00.velocity
net Youtput => ppmc.0.stepgen.01.velocity
net Zoutput => ppmc.0.stepgen.02.velocity
net Aoutput => ppmc.0.stepgen.03.velocity
# connect axis enables to step generators
net Xenable => ppmc.0.stepgen.00.enable
net Yenable => ppmc.0.stepgen.01.enable
net Zenable => ppmc.0.stepgen.02.enable
net Aenable => ppmc.0.stepgen.03.enable
# set output scaling from ini file
# input and output scales should (normally) be the same for a USC
setp ppmc.0.stepgen.00.scale [JOINT_0]OUTPUT_SCALE
setp ppmc.0.stepgen.01.scale [JOINT_1]OUTPUT_SCALE
setp ppmc.0.stepgen.02.scale [JOINT_2]OUTPUT_SCALE
setp ppmc.0.stepgen.03.scale [JOINT_3]OUTPUT_SCALE
# add a couple of tuning test links
# if these are useful will want to add them to the other axes as well
# or make these setup with the tuning script
# net Xoutput ddt.0.in
# net Xpos-fb ddt.1.in
# HAL config file for servos -- expanded from core_servo.hal
# for a full four axis setup
# create four position feedback signals
# connect position feedback to PID loop
net Xpos-fb => pid.0.feedback
net Ypos-fb => pid.1.feedback
net Zpos-fb => pid.2.feedback
net Apos-fb => pid.3.feedback
# connect position feedback to motion module
net Xpos-fb => joint.0.motor-pos-fb
net Ypos-fb => joint.1.motor-pos-fb
net Zpos-fb => joint.2.motor-pos-fb
net Apos-fb => joint.3.motor-pos-fb
# create PID to DAC output signals
# connect output signals to output of PID loops
net Xoutput <= pid.0.output
net Youtput <= pid.1.output
net Zoutput <= pid.2.output
net Aoutput <= pid.3.output
# set PID loop output limits to +/-1.00
setp pid.0.maxoutput [JOINT_0]PID_MAX_VEL
setp pid.1.maxoutput [JOINT_1]PID_MAX_VEL
setp pid.2.maxoutput [JOINT_2]PID_MAX_VEL
setp pid.3.maxoutput [JOINT_3]PID_MAX_VEL
# set PID loop gains
setp pid.0.Pgain [JOINT_0]P
setp pid.0.Igain [JOINT_0]I
setp pid.0.Dgain [JOINT_0]D
setp pid.0.bias [JOINT_0]BIAS
setp pid.0.FF0 [JOINT_0]FF0
setp pid.0.FF1 [JOINT_0]FF1
setp pid.0.FF2 [JOINT_0]FF2
setp pid.0.deadband [JOINT_0]DEADBAND
setp pid.1.Pgain [JOINT_1]P
setp pid.1.Igain [JOINT_1]I
setp pid.1.Dgain [JOINT_1]D
setp pid.1.bias [JOINT_1]BIAS
setp pid.1.FF0 [JOINT_1]FF0
setp pid.1.FF1 [JOINT_1]FF1
setp pid.1.FF2 [JOINT_1]FF2
setp pid.1.deadband [JOINT_1]DEADBAND
setp pid.2.Pgain [JOINT_2]P
setp pid.2.Igain [JOINT_2]I
setp pid.2.Dgain [JOINT_2]D
setp pid.2.bias [JOINT_2]BIAS
setp pid.2.FF0 [JOINT_2]FF0
setp pid.2.FF1 [JOINT_2]FF1
setp pid.2.FF2 [JOINT_2]FF2
setp pid.2.deadband [JOINT_2]DEADBAND
setp pid.3.Pgain [JOINT_3]P
setp pid.3.Igain [JOINT_3]I
setp pid.3.Dgain [JOINT_3]D
setp pid.3.bias [JOINT_3]BIAS
setp pid.3.FF0 [JOINT_3]FF0
setp pid.3.FF1 [JOINT_3]FF1
setp pid.3.FF2 [JOINT_3]FF2
setp pid.3.deadband [JOINT_3]DEADBAND
# create four position command signals
# connect position commands to motion controller
net Xpos-cmd <= joint.0.motor-pos-cmd
net Ypos-cmd <= joint.1.motor-pos-cmd
net Zpos-cmd <= joint.2.motor-pos-cmd
net Apos-cmd <= joint.3.motor-pos-cmd
# connect position commands to PID input
net Xpos-cmd => pid.0.command
net Ypos-cmd => pid.1.command
net Zpos-cmd => pid.2.command
net Apos-cmd => pid.3.command
# create bit signals to enable/disable the PID loops
# connect the signals to the motion controller
net Xenable <= joint.0.amp-enable-out
net Yenable <= joint.1.amp-enable-out
net Zenable <= joint.2.amp-enable-out
net Aenable <= joint.3.amp-enable-out
# connect the signals to the PID blocks
net Xenable => pid.0.enable
net Yenable => pid.1.enable
net Zenable => pid.2.enable
net Aenable => pid.3.enable
But i'm not an expert in this type of configuration...
- tommylight

14 Feb 2025 19:37
Replied by tommylight on topic Remora - ethernet NVEM / EC300 / EC500 cnc board
Remora - ethernet NVEM / EC300 / EC500 cnc board
Category: Computers and Hardware
- rodw

16 Jan 2025 07:56 - 16 Jan 2025 07:57
Replied by rodw on topic First Start Up - E Stops
First Start Up - E Stops
Category: General LinuxCNC Questions
Well, looks like you have
so you should remove or comment out this line
net remote-estop estop-latch.0.fault-in <= hm2_[HOSTMOT2](7i96S).0.gpio.04.in_not
and replace it with this
# --- ESTOP-EXT ---
net estop-ext <= hm2_7i96s.0.inm.00.input-03so you should remove or comment out this line
net remote-estop estop-latch.0.fault-in <= hm2_[HOSTMOT2](7i96S).0.gpio.04.in_not
and replace it with this
net estop-ext => estop-latch.0.fault-in- notJamesLee
- notJamesLee
16 Jan 2025 04:06
Replied by notJamesLee on topic First Start Up - E Stops
First Start Up - E Stops
Category: General LinuxCNC Questions
okay so i went to that linked tutorial I commented out the existing estop loop and ended up actually testing code from the last entry on the first page (copied and pasted below) but modified with my pin for the estop.
Code i am using:
Now i am getting a similar error where it it thinks pins are double assigned. Should I have commented out other pin assignments? Or could i not be assinging the pin corectly?
error message:
Code i am using:
loadrt estop_latch addf estop-latch.0 servo-thread net estop-loopout iocontrol.0.emc-enable-in <= estop-latch.0.ok-out net estop-loopin iocontrol.0.user-enable-out => estop-latch.0.ok-in net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset net remote-estop estop-latch.0.fault-in <= hm2_[HOSTMOT2](7i96s).0.gpio.040.in_notNow i am getting a similar error where it it thinks pins are double assigned. Should I have commented out other pin assignments? Or could i not be assinging the pin corectly?
error message:
.hal:258: Signal 'a-pos-fb' can not add OUT pin 'hm2_7i96s.0.encoder.00.position'. It already has OUT pin ' hm2_7i96s.0.stepgen.03.position-fb' 2034
Time to create page: 1.842 seconds