Category: Driver Boards
Hi, I'm having a similar error code when trying to run LinuxCNC
Note: Using POSIX realtime
".custom.hal:81: Pin 'hm2_7i76e.0.7i76.0.0.enc0.count' does not exist"
3999
(The 3999 number changes everytime we try to start up the program)
This only happens when we use a specific code in our custom.hal to control the axis' with a MPG controller.
We've already checked the field power TB1 (pin 5 +24V pin 8 GND) and when we measure P3 there is a 5V available.
The Custom.Hal we used is below.
loadrt mux4 count=1
loadrt mux8 count=1
loadrt select8 count=1
loadrt conv_float_s32 count=1
addf mux4.0 servo-thread
addf mux8.0 servo-thread
addf select8.0 servo-thread
addf conv-float-s32.0 servo-thread
# For velocity mode, set to 1
# In velocity mode the axis stops when the dial is stopped
# even if that means the commanded motion is not completed,
# For position mode (the default), set to 0
# In position mode the axis will move exactly jog-scale
# units for each count, regardless of how long that might take,
setp axis.x.jog-vel-mode 0
setp axis.y.jog-vel-mode 0
setp axis.z.jog-vel-mode 0
# This sets the scale that will be used based on the input to the mux4
setp mux4.0.in1 0.001
setp mux4.0.in2 0.01
setp mux4.0.in3 0.1
# This selects axis (off=0, x=1, y=2, ...)
setp mux8.0.in0 0
setp mux8.0.in1 1
setp mux8.0.in2 2
setp mux8.0.in3 3
setp mux8.0.in4 4
setp mux8.0.in5 5
setp mux8.0.in6 6
setp mux8.0.in7 7
# The inputs to the mux4 component
net scale1 mux4.0.sel0 <= hm2_7i76e.0.7i76.0.0.input-20
net scale2 mux4.0.sel1 <= hm2_7i76e.0.7i76.0.0.input-21
# The inputs to the mux8 component
net mux8-sel0 <= hm2_7i76e.0.7i76.0.0.input-22
net mux8-sel1 <= hm2_7i76e.0.7i76.0.0.input-23
net mux8-sel2 <= hm2_7i76e.0.7i76.0.0.input-24
net mux8-sel0 => mux8.0.sel0
net mux8-sel1 => mux8.0.sel1
net mux8-sel2 => mux8.0.sel2
net mux-float conv-float-s32.0.in <= mux8.0.out
net mux-s32 <= conv-float-s32.0.out
net mux-s32 => select8.0.sel
net axis-select-x <= select8.0.out1
net axis-select-y <= select8.0.out2
net axis-select-z <= select8.0.out3
net axis-select-4 <= select8.0.out4
net axis-select-5 <= select8.0.out5
net axis-select-6 <= select8.0.out6
net axis-select-x => axis.x.jog-enable
net axis-select-y => axis.y.jog-enable
net axis-select-z => axis.z.jog-enable
# The output from the mux4 is sent to each axis jog scale
net mpg-scale <= mux4.0.out
net mpg-scale => axis.x.jog-scale
net mpg-scale => axis.y.jog-scale
net mpg-scale => axis.z.jog-scale
# The encoder output counts to the axis. Only the selected axis will move.
net encoder-counts <= hm2_7i76e.0.7i76.0.0.enc0.count
net encoder-counts => axis.x.jog-counts
net encoder-counts => axis.y.jog-counts
net encoder-counts => axis.z.jog-counts