Advanced Search

Search Results (Searched for: stepper spindle)

01 Nov 2023 21:16

Mesa board for CNC lathe upgrade

Category: Driver Boards

Hi,
I've been pouring over a bunch of threads here on Mesa boards and I'm pretty sure that I want to upgrade my system to use one, but I'm still quite confused about the best one to choose and the overall process of getting it hooked up and any other hardware required.  I'm sure this info is already out there somewhere but I'm having a really hard time piecing it all together.

I have been running LinuxCNC on a dedicated desktop PC using a parallel port interface to control my CNC lathe.  I've had some issues with latency and timing, particularly with threading operations.  I'd like to upgrade my setup to use a Mesa board for (hopefully) better performance and also to get away from using the parallel port.  I think an ideal solution would be to use a Raspberry Pi with the Mesa board so that I don't need to tie up a full PC.  I've read about varying results of this approach on this forum.  Mesa makes the 7c81 board (seems to be out of stock currently) specifically to interface with the GPIO of the RPI or I could get one of the ethernet boards, but some users complain about timing issues with ethernet on the RPI.  An ethernet board also seems nice if I decide to use it with a PC instead of an RPI.  Which boards have people had success with when controlling with an RPI?

My current setup (using the PC with parallel ports) can control 3 open loop steppers, has 6 limit switches, an encoder for the spindle and an MPG with a quadrature encoder, and about 5 other buttons/knobs for input.  So I'd like to get a Mesa board that can handle all of those outputs and inputs.  In the future, I'd also be curious about using some glass scales on the X and Z axes of the lathe to provide feedback, but maybe that's another topic.

Are there any self-contained guides or tutorials on getting the mesa board setup with LinuxCNC?  Will I need to change the firmware on the FPGA to configure it?  Do I even need to run a real-time OS if the FPGA is controlling all the fast timing? 

I really appreciate all help and suggestions!
Carson
27 Oct 2023 00:11

Remora - ethernet NVEM cnc board

Category: Computers and OS's

Frame size you might have some searching to do, they have 60mm frame size but Im not sure the nema equivalent.
Im fairly sure AC servos will be better, as the motors will probably be 200v. I dont remember if the ac servos get converted back to DC anyway.

When it came to sourcing the motors between AC and DC, my main deciding factor became supply voltage. I found it hard to source the servo drive with my voltage requirements for AC servos, as most I came across were 220v, where DC servo drives I could use 48v DC. My machine is a 110v machine, so it was the deciding factor. If you do not have these limitations, probably go with AC

Yeah my spindle is 220v, so I would rather use AC servos, I seen some on omc-stepperonline but their kind of expensive for the Nm output they have. Also for some reason they seem to be pretty low or out of stock.
25 Oct 2023 08:57

Tool Changer DIY with a Stepper or a Servo?

Category: Milling Machines

The ATC itself have no sensors - the VFD have some - like Temeprature, RPM, Failure of Spindle etc.- but for Clamping and Unclamping it looks there is no sensor inside the IBAG HF80. My idea is to build an sensor under the ATC - a very small one to check tool is inside. I mean the ATC is working over years without these sensors - but for me it looks better to control this - i have seen tools learn flying after a tool-changer problem because of alumnium-chips - and the spindle was damaged on the top - very expensive for the friend of me. Was Portatec wth an 12KW Spindle.
22 Oct 2023 16:57

Fusion 360 post issues (maybe?) on 2 axis lathe conversion

Category: Turning

You do need a spindle-speed-in for G95 to work.

You probably don't need a simulated encoder to achieve this. You can just connect spindle.0.speed-out to spindle.0.speed in in the HAL.

But, it would be much better to have an actual spindle encoder. There are many ways to get one set up, including using a gear in the head and a gear tooth sensor.



Thanks will try that hal code. Planning on adding an encoder soon just wanted to see movement and cut a few parts to test out the steppers.  

22 Oct 2023 13:07

Tool Changer DIY with a Stepper or a Servo?

Category: Milling Machines

Hello,
have mesa 7i97 running and use 3 axis with AC Servos. So i have two axis i can use in future and so my idea is to use one of them for the Tool-Changer Carousell i build by myself.
The question is - which system of motor and drive is good enough  - so a closed loop stepper is okay - but how can i wire a stepper to a 7i97 or for the easiest way should i use a servo - so i can connect like my other axis on the 7i97?
The prices around 200 € for an simple ac-servo and around 100€ for an closed loop stepper - i need only a small one i think - it rotate only 8 tools. My Tools are special on SKI 20 not SK20 - that made the tool-holder very expensive. Around 600 € for one. So i don't think i will upgrade to more as 8 tools - now i have 5 holders... ibag HF80 SKI20 spindle expensive one for 40.000 RPMs.
Have someone build such thing and have any ideas?
I want to build something like this:
12 Oct 2023 19:13 - 12 Oct 2023 19:15

setting up 7i92 for directio on steppers

Category: PnCConf Wizard

I'm looking at connecting 7i92tm boards to  a couple lathes which have been running through parallel ports . I want to simply connect the 7i92 directly to the current cheap breakout boards . I'm looking at this through vmware just to get a feel for it and I am confused as to how a direction pin is selected in the wizard . I'm seeing stepgen but nothing for direction which has me a bit confused .

At this point I just want to get the steppers running and I will eventually hook up encoders for the spindle
03 Oct 2023 21:33

Remora - ethernet NVEM cnc board

Category: Computers and OS's

Hello! I am new to the CNC world and am currently building my first machine. Stepper drivers have have not arrived yet, but I already have the ec500-rt1052 and I’m trying to configure it. After countless failed experiments with Windows and Linux virtual machines (I still have to live with the culture shock of seeing the mach3 UI color scheme), I finally came to LinuxCNC on the RPi.

The first problem I tried to solve was changing the IP address to connect to my local network (yes, I know a network switch between ec500 and RPi is a bad idea). I changed the address and added debug code in

Remora-RT1052-cpp/Remora-RT1052-cpp/source/ethernet.h
Remora-NVEM/LinuxCNC/Components/NVMPG/nvmpg.c
Remora-NVEM/LinuxCNC/Components/Remora-nv/remora-nv.c

Did I miss anything?

According to linuxCNC STDOUT it can find the controller and establish TCP and UDP connections. But it is not even possible to toggle the emergency stop in the GUI. At same point it starts to complain in the output "Ethernet ERROR: Resource temporarily unavailable"

As the next attempt I rolled back my changes and returned to 10.10.10.10. It allows to toggle the emergency stop and even to run the sample code. But again at some point it blocks and starts to print "Ethernet ERROR: Resource temporarily unavailable"

I can imagine, that "Resource temporarily unavailable" by missing stepper drivers or by not connected spindle (however I am not sure that is the real reason). But why it does not work at all with the changed IP address? Should it be changed somewhere else? 

This is an Ethernet related error, basically no response back from the controller board in the time expected. 
03 Oct 2023 18:58

Remora - ethernet NVEM cnc board

Category: Computers and OS's

Hello! I am new to the CNC world and am currently building my first machine. Stepper drivers have have not arrived yet, but I already have the ec500-rt1052 and I’m trying to configure it. After countless failed experiments with Windows and Linux virtual machines (I still have to live with the culture shock of seeing the mach3 UI color scheme), I finally came to LinuxCNC on the RPi.

The first problem I tried to solve was changing the IP address to connect to my local network (yes, I know a network switch between ec500 and RPi is a bad idea). I changed the address and added debug code in

Remora-RT1052-cpp/Remora-RT1052-cpp/source/ethernet.h
Remora-NVEM/LinuxCNC/Components/NVMPG/nvmpg.c
Remora-NVEM/LinuxCNC/Components/Remora-nv/remora-nv.c

Did I miss anything?

According to linuxCNC STDOUT it can find the controller and establish TCP and UDP connections. But it is not even possible to toggle the emergency stop in the GUI. At same point it starts to complain in the output "Ethernet ERROR: Resource temporarily unavailable"

As the next attempt I rolled back my changes and returned to 10.10.10.10. It allows to toggle the emergency stop and even to run the sample code. But again at some point it blocks and starts to print "Ethernet ERROR: Resource temporarily unavailable"

I can imagine, that "Resource temporarily unavailable" by missing stepper drivers or by not connected spindle (however I am not sure that is the real reason). But why it does not work at all with the changed IP address? Should it be changed somewhere else? 
21 Sep 2023 13:13

Orientation position problem after run Gcode

Category: General LinuxCNC Questions

my hall file :
# Generated by PNCconf at Tue Feb 18 06:20:29 2020
# If you make changes to this file, they will be
# overwritten when you run PNCconf again
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS num_dio=34
loadrt hostmot2
loadusr io
loadrt hm2_eth board_ip="10.10.10.10" config=" num_encoders=6 num_pwmgens=0 num_stepgens=5 sserial_port_0=000000"
setp   hm2_7i96s.0.watchdog.timeout_ns 10000000
loadrt pid names=pid.x,pid.y,pid.z,pid.a,pid.s,orient-pid
loadrt orient names=orient
loadrt mux2 names=orient-mux,z-limit-mux
loadrt or2 names=orient-mux-or,spindle-enable-or,atc-out-or,cam-out-or
loadrt xor2 names=spindle-enable-xor
loadrt near names=near-spindle
loadrt debounce cfg=1
loadrt edge count=1
loadrt and2 names=spindle-is-oriented-and,probe-and
loadrt bitwise names=probe-comp
loadrt conv_s32_u32 names=conv1

addf hm2_7i96s.0.read            servo-thread
addf motion-command-handler     servo-thread
addf motion-controller          servo-thread
addf z-limit-mux        servo-thread
addf pid.x.do-pid-calcs         servo-thread
addf pid.y.do-pid-calcs         servo-thread
addf pid.z.do-pid-calcs         servo-thread
addf pid.a.do-pid-calcs         servo-thread
addf pid.s.do-pid-calcs         servo-thread
addf orient-pid.do-pid-calcs    servo-thread
addf hm2_7i96s.0.write           servo-thread


setp hm2_7i96s.0.dpll.01.timer-us -50
setp hm2_7i96s.0.stepgen.timer-number 1


addf orient         servo-thread
addf orient-mux         servo-thread
addf orient-mux-or      servo-thread
addf spindle-enable-or      servo-thread
addf spindle-enable-xor         servo-thread
addf near-spindle       servo-thread
addf debounce.0             servo-thread
addf edge.0         servo-thread
addf spindle-is-oriented-and    servo-thread
addf probe-and          servo-thread
addf conv1          servo-thread
addf atc-out-or                 servo-thread
addf cam-out-or                 servo-thread

# motion controller IO:
net tool-change-confirmed motion.digital-out-00 => iocontrol.0.tool-changed
# switch atc ranges from toolchange subroutine
net z-limit-select motion.digital-out-01        => z-limit-mux.sel
# spindle index pulse wired to motion controller
net spindle-index-enable                        => motion.digital-in-01
     
# atc-home
net atc-home         motion.digital-in-16       <=  hm2_7i96s.0.7i77.0.0.input-07
net atc-home                                   =>  hm2_7i96s.0.7i77.0.0.output-02
# atc-range
net atc-range                                   <=  hm2_7i96s.0.7i77.0.0.input-06
# atc-direction
net atc-direction    motion.digital-out-04      =>  hm2_7i96s.0.7i77.0.0.output-03
# atc-run
net atc-run          motion.digital-out-03      => hm2_7i96s.0.7i77.0.0.output-04
#net atc-run          motion.digital-out-03      =>  atc-out-or.in0
#net atc-out-or       atc-out-or.out             =>  hm2_7i96s.0.7i77.0.0.output-04
# atc-dec
#net atc-dec          atc-out-or.in1             <=  hm2_7i96s.0.7i77.0.0.input-16
# encoder atc
net atc-enc-1 motion.digital-in-11              <=  hm2_7i96s.0.7i77.0.0.input-11
net atc-enc-2 motion.digital-in-12              <=  hm2_7i96s.0.7i77.0.0.input-12
net atc-enc-3 motion.digital-in-13              <=  hm2_7i96s.0.7i77.0.0.input-13
net atc-enc-4 motion.digital-in-14              <=  hm2_7i96s.0.7i77.0.0.input-14
net atc-enc-5 motion.digital-in-10              <=  hm2_7i96s.0.7i77.0.0.input-15
# optical probe interface wired to motion controller for atc probe activation
#net probe-touch-reset  motion.digital-out-02   <= hm2_7i96s.0.7i77.0.0.output-01
#net probe-touch-in     motion.digital-in-18
#net probe-touch-error  motion.digital-in-19
# --- ESTOP-OUT ---
#net estop-out  =>     hm2_7i96s.0.7i77.0.0.output-00
# --- ESTOP-EXT ---
net estop-ext     <=  hm2_7i96s.0.7i77.0.0.input-31

# --- ESTOP-EXT ---
#net estop-ext     <=  hm2_7i96s.0.7i77.0.0.input-01
# --- SPINDLE-ENABLE ---
#net spindle-enable  =>     hm2_7i96s.0.ssr.00.out-00
# --- MACHINE-IS-ENABLED ---Spindle_On
net machine-is-enabled  =>     hm2_7i96s.0.7i77.0.0.output-00
# --- MACHINE-IS-ENABLED ---Servo_OUT
#net machine-is-enabled  =>     hm2_7i96s.0.7i77.0.0.output-09
# --- MACHINE-IS-ENABLED ---Servo A_OUT
#net machine-is-enabled  =>     hm2_7i96s.0.7i77.0.0.output-15
# --- MACHINE-IS-ENABLED ---Z brake
#net machine-is-enabled  =>     hm2_7i96s.0.7i77.0.0.output-01

# --- COOLANT-MIST ---
#net coolant-mist  =>     hm2_7i96s.0.7i77.0.0.output-06
#net coolant-mist  =>     hm2_7i96s.0.7i77.0.0.output-00
# --- COOLANT-FLOOD ---
net coolant-flood  =>     hm2_7i96s.0.7i77.0.0.output-05

# --- MAX-X ---
net max-x     <=  hm2_7i96s.0.7i77.0.0.input-01-not
# --- MIN-X ---
net min-x     <=  hm2_7i96s.0.7i77.0.0.input-00-not
# --- MAX-Y ---
net max-y     <=  hm2_7i96s.0.7i77.0.0.input-03-not
# --- MIN-Y ---
net min-y     <=  hm2_7i96s.0.7i77.0.0.input-02-not
# --- MAX-Z ---
net max-z     <=  hm2_7i96s.0.7i77.0.0.input-05-not
# --- MIN-Z ---
net min-z     <=  hm2_7i96s.0.7i77.0.0.input-04-not
# --- HOME-X ---
net home-x     <=  hm2_7i96s.0.7i77.0.0.input-08
# --- HOME-Y ---
net home-y     <=  hm2_7i96s.0.7i77.0.0.input-09
# --- HOME-Z ---
#net home-z     <=  hm2_7i96s.0.7i77.0.0.input-10
# --- HOME-A ---
#net a-home-sw    <=  hm2_7i96s.0.7i77.0.0.input-31-not
#*******************
#  AXIS X JOINT 0
#*******************
setp   pid.x.Pgain     [JOINT_0]P
setp   pid.x.Igain     [JOINT_0]I
setp   pid.x.Dgain     [JOINT_0]D
setp   pid.x.bias      [JOINT_0]BIAS
setp   pid.x.FF0       [JOINT_0]FF0
setp   pid.x.FF1       [JOINT_0]FF1
setp   pid.x.FF2       [JOINT_0]FF2
setp   pid.x.deadband  [JOINT_0]DEADBAND
setp   pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp   pid.x.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.x.maxerror 0.012700
net x-index-enable  => pid.x.index-enable
net x-enable        =>  pid.x.enable
net x-pos-cmd       =>  pid.x.command
net x-vel-cmd       =>  pid.x.command-deriv
net x-pos-fb        =>  pid.x.feedback
net x-output        <=  pid.x.output
# Step Gen signals/setup
setp   hm2_7i96s.0.stepgen.00.dirsetup        [JOINT_0]DIRSETUP
setp   hm2_7i96s.0.stepgen.00.dirhold         [JOINT_0]DIRHOLD
setp   hm2_7i96s.0.stepgen.00.steplen         [JOINT_0]STEPLEN
setp   hm2_7i96s.0.stepgen.00.stepspace       [JOINT_0]STEPSPACE
setp   hm2_7i96s.0.stepgen.00.position-scale  [JOINT_0]STEP_SCALE
setp   hm2_7i96s.0.stepgen.00.step_type        0
setp   hm2_7i96s.0.stepgen.00.control-type     1
setp   hm2_7i96s.0.stepgen.00.maxaccel         [JOINT_0]STEPGEN_MAXACCEL
setp   hm2_7i96s.0.stepgen.00.maxvel           [JOINT_0]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net x-pos-cmd    <= joint.0.motor-pos-cmd
net x-vel-cmd    <= joint.0.vel-cmd
net x-output     => hm2_7i96s.0.stepgen.00.velocity-cmd
net x-pos-fb     <= hm2_7i96s.0.stepgen.00.position-fb
net x-pos-fb     => joint.0.motor-pos-fb
net x-enable     <= joint.0.amp-enable-out
net x-enable     => hm2_7i96s.0.stepgen.00.enable
# ---setup home / limit switch signals---
net home-x    =>  joint.0.home-sw-in
net min-x     =>  joint.0.neg-lim-sw-in
net max-x     =>  joint.0.pos-lim-sw-in

# ---Encoder feedback signals/setup---

setp    hm2_7i96s.0.encoder.00.counter-mode 0
setp    hm2_7i96s.0.encoder.00.filter 1
setp    hm2_7i96s.0.encoder.00.index-invert 0
setp    hm2_7i96s.0.encoder.00.index-mask 0
setp    hm2_7i96s.0.encoder.00.index-mask-invert 0
setp    hm2_7i96s.0.encoder.00.scale  [JOINT_0]ENCODER_SCALE
#net x-pos-fb               <=  hm2_7i96s.0.encoder.00.position
net x-vel-fb               <=  hm2_7i96s.0.encoder.00.velocity
net x-pos-fb               =>  joint.0.motor-pos-fb
net x-index-enable    joint.0.index-enable  <=>  hm2_7i96s.0.encoder.00.index-enable
net x-pos-rawcounts        <=  hm2_7i96s.0.encoder.00.rawcounts



#*******************
#  AXIS Y JOINT 1
#*******************
setp   pid.y.Pgain     [JOINT_1]P
setp   pid.y.Igain     [JOINT_1]I
setp   pid.y.Dgain     [JOINT_1]D
setp   pid.y.bias      [JOINT_1]BIAS
setp   pid.y.FF0       [JOINT_1]FF0
setp   pid.y.FF1       [JOINT_1]FF1
setp   pid.y.FF2       [JOINT_1]FF2
setp   pid.y.deadband  [JOINT_1]DEADBAND
setp   pid.y.maxoutput [JOINT_1]MAX_OUTPUT
setp   pid.y.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.y.maxerror 0.012700
net y-index-enable  =>  pid.y.index-enable
net y-enable        =>  pid.y.enable
net y-pos-cmd       =>  pid.y.command
net y-vel-cmd       =>  pid.y.command-deriv
net y-pos-fb        =>  pid.y.feedback
net y-output        <=  pid.y.output
# Step Gen signals/setup
setp   hm2_7i96s.0.stepgen.01.dirsetup        [JOINT_1]DIRSETUP
setp   hm2_7i96s.0.stepgen.01.dirhold         [JOINT_1]DIRHOLD
setp   hm2_7i96s.0.stepgen.01.steplen         [JOINT_1]STEPLEN
setp   hm2_7i96s.0.stepgen.01.stepspace       [JOINT_1]STEPSPACE
setp   hm2_7i96s.0.stepgen.01.position-scale  [JOINT_1]STEP_SCALE
setp   hm2_7i96s.0.stepgen.01.step_type        0
setp   hm2_7i96s.0.stepgen.01.control-type     1
setp   hm2_7i96s.0.stepgen.01.maxaccel         [JOINT_1]STEPGEN_MAXACCEL
setp   hm2_7i96s.0.stepgen.01.maxvel           [JOINT_1]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net y-pos-cmd    <= joint.1.motor-pos-cmd
net y-vel-cmd    <= joint.1.vel-cmd
net y-output     => hm2_7i96s.0.stepgen.01.velocity-cmd
net y-pos-fb     <= hm2_7i96s.0.stepgen.01.position-fb
net y-pos-fb     => joint.1.motor-pos-fb
net y-enable     <= joint.1.amp-enable-out
net y-enable     => hm2_7i96s.0.stepgen.01.enable
net y-pos-rawcounts        <=  hm2_7i96s.0.encoder.01.rawcounts
# ---setup home / limit switch signals---
net home-y    =>  joint.1.home-sw-in
net min-y     =>  joint.1.neg-lim-sw-in
net max-y     =>  joint.1.pos-lim-sw-in

# ---Encoder feedback signals/setup---
setp    hm2_7i96s.0.encoder.01.counter-mode 0
setp    hm2_7i96s.0.encoder.01.filter 1
setp    hm2_7i96s.0.encoder.01.index-invert 0
setp    hm2_7i96s.0.encoder.01.index-mask 0
setp    hm2_7i96s.0.encoder.01.index-mask-invert 0
setp    hm2_7i96s.0.encoder.01.scale  [JOINT_1]ENCODER_SCALE
#net y-pos-fb               <=  hm2_7i96s.0.encoder.01.position
net y-vel-fb               <=  hm2_7i96s.0.encoder.01.velocity
net y-pos-fb               =>  joint.1.motor-pos-fb
net y-index-enable    joint.1.index-enable  <=>  hm2_7i96s.0.encoder.01.index-enable
net y-pos-rawcounts        <=  hm2_7i96s.0.encoder.01.rawcounts
#*******************
#  AXIS Z JOINT 2
#*******************
setp   pid.z.Pgain     [JOINT_2]P
setp   pid.z.Igain     [JOINT_2]I
setp   pid.z.Dgain     [JOINT_2]D
setp   pid.z.bias      [JOINT_2]BIAS
setp   pid.z.FF0       [JOINT_2]FF0
setp   pid.z.FF1       [JOINT_2]FF1
setp   pid.z.FF2       [JOINT_2]FF2
setp   pid.z.deadband  [JOINT_2]DEADBAND
setp   pid.z.maxoutput [JOINT_2]MAX_OUTPUT
setp   pid.z.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.z.maxerror 0.012700
net z-index-enable  =>  pid.z.index-enable
net z-enable        =>  pid.z.enable
net z-pos-cmd       =>  pid.z.command
#net z-vel-cmd       =>  pid.z.command-deriv
net z-pos-fb        =>  pid.z.feedback
net z-output        <=  pid.z.output
# Step Gen signals/setup
setp   hm2_7i96s.0.stepgen.02.dirsetup        [JOINT_2]DIRSETUP
setp   hm2_7i96s.0.stepgen.02.dirhold         [JOINT_2]DIRHOLD
setp   hm2_7i96s.0.stepgen.02.steplen         [JOINT_2]STEPLEN
setp   hm2_7i96s.0.stepgen.02.stepspace       [JOINT_2]STEPSPACE
setp   hm2_7i96s.0.stepgen.02.position-scale  [JOINT_2]STEP_SCALE
setp   hm2_7i96s.0.stepgen.02.step_type        0
setp   hm2_7i96s.0.stepgen.02.control-type     1
setp   hm2_7i96s.0.stepgen.02.maxaccel         [JOINT_2]STEPGEN_MAXACCEL
setp   hm2_7i96s.0.stepgen.02.maxvel           [JOINT_2]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net z-pos-cmd    <= joint.2.motor-pos-cmd
net z-vel-cmd    <= joint.2.vel-cmd
net z-output     => hm2_7i96s.0.stepgen.02.velocity-cmd
net z-pos-fb     <= hm2_7i96s.0.stepgen.02.position-fb
net z-pos-fb     => joint.2.motor-pos-fb
net z-enable     <= joint.2.amp-enable-out
net z-enable     => hm2_7i96s.0.stepgen.02.enable
# ---setup home / limit switch signals---
net atc-range     =>  joint.2.home-sw-in
#net home-z    =>  joint.2.home-sw-in
net min-z     =>  joint.2.neg-lim-sw-in
net max-z     =>  joint.2.pos-lim-sw-in
# switch z-axis soft limits
setp z-limit-mux.in0 [JOINT_2]MAX_LIMIT
setp z-limit-mux.in1 [JOINT_2]MAX_LIMIT_ATC
net z-limit-out <= z-limit-mux.out
# ini.2.max_limit is connectedd in custom_postgui.hal
# ---setup home / limit switch signals---
net a-home-sw     =>  joint.3.home-sw-in
net a-neg-limit     =>  joint.3.neg-lim-sw-in
net a-pos-limit     =>  joint.3.pos-lim-sw-in
#MPG ENC
#setp    hm2_7i96s.0.encoder.04.counter-mode 0
#setp    hm2_7i96s.0.encoder.04.scale  [JOINT_4]ENCODER_SCALE

# ---Encoder feedback signals/setup---
net y-pos-rawcounts        <=  hm2_7i96s.0.encoder.01.rawcounts
setp    hm2_7i96s.0.encoder.02.counter-mode 0
setp    hm2_7i96s.0.encoder.02.filter 1
setp    hm2_7i96s.0.encoder.02.index-invert 0
setp    hm2_7i96s.0.encoder.02.index-mask 0
setp    hm2_7i96s.0.encoder.02.index-mask-invert 0
setp    hm2_7i96s.0.encoder.02.scale  [JOINT_2]ENCODER_SCALE
#net z-pos-fb               <=  hm2_7i96s.0.encoder.02.position
net z-vel-fb               <=  hm2_7i96s.0.encoder.02.velocity
net z-pos-fb               =>  joint.2.motor-pos-fb
net z-index-enable    joint.2.index-enable  <=>  hm2_7i96s.0.encoder.02.index-enable
net y-pos-rawcounts        <=  hm2_7i96s.0.encoder.01.rawcounts

#*******************
#  SPINDLE S
#*******************
setp   pid.s.Pgain     [SPINDLE_9]P
setp   pid.s.Igain     [SPINDLE_9]I
setp   pid.s.Dgain     [SPINDLE_9]D
setp   pid.s.bias      [SPINDLE_9]BIAS
setp   pid.s.FF0       [SPINDLE_9]FF0
setp   pid.s.FF1       [SPINDLE_9]FF1
setp   pid.s.FF2       [SPINDLE_9]FF2
setp   pid.s.deadband  [SPINDLE_9]DEADBAND
setp   pid.s.maxoutput [SPINDLE_9]MAX_OUTPUT
setp   pid.s.error-previous-target true
setp   orient-pid.Pgain     [SPINDLE_ORIENT]P
setp   orient-pid.Igain     [SPINDLE_ORIENT]I
setp   orient-pid.Dgain     [SPINDLE_ORIENT]D
setp   orient-pid.bias      [SPINDLE_ORIENT]BIAS
setp   orient-pid.FF0       [SPINDLE_ORIENT]FF0
setp   orient-pid.FF1       [SPINDLE_ORIENT]FF1
setp   orient-pid.FF2       [SPINDLE_ORIENT]FF2
setp   orient-pid.deadband  [SPINDLE_ORIENT]DEADBAND
setp   orient-pid.maxoutput [SPINDLE_ORIENT]MAX_OUTPUT
setp   orient-pid.error-previous-target true
net spindle-index-enable   <=> pid.s.index-enable <=> orient-pid.index-enable
net spindle-motion-enable      spindle.0.on  =>  pid.s.enable => spindle-enable-or.in0
net spindle-vel-cmd-rpm     => pid.s.command
net spindle-vel-fb-rpm      => pid.s.feedback
net spindle-vel-output pid.s.output orient-mux.in0
net spindle-output         <=  orient-mux.out
# ---PWM Generator signals/setup---
setp   hm2_7i96s.0.7i77.0.1.analogout5-scalemax  [SPINDLE_9]OUTPUT_SCALE
setp   hm2_7i96s.0.7i77.0.1.analogout5-minlim    [SPINDLE_9]OUTPUT_MIN_LIMIT
setp   hm2_7i96s.0.7i77.0.1.analogout5-maxlim    [SPINDLE_9]OUTPUT_MAX_LIMIT
net spindle-output      => hm2_7i96s.0.7i77.0.1.analogout5
net spindle-enable      => hm2_7i96s.0.7i77.0.1.spinena
# ---Encoder feedback signals/setup---
setp    hm2_7i96s.0.encoder.05.counter-mode 0
setp    hm2_7i96s.0.encoder.05.filter 1
setp    hm2_7i96s.0.encoder.05.index-invert 0
setp    hm2_7i96s.0.encoder.05.index-mask 0
setp    hm2_7i96s.0.encoder.05.index-mask-invert 0
setp    hm2_7i96s.0.encoder.05.scale  [SPINDLE_9]ENCODER_SCALE
net spindle-revs             <=   hm2_7i96s.0.encoder.05.position
net spindle-vel-fb-rps       <=   hm2_7i96s.0.encoder.05.velocity
net spindle-index-enable     <=>  hm2_7i96s.0.encoder.05.index-enable
# ---setup spindle control signals---
net spindle-vel-cmd-rps        <=  spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs    <=  spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm        <=  spindle.0.speed-out
net spindle-vel-cmd-rpm-abs    <=  spindle.0.speed-out-abs
net spindle-enable-or-out spindle-enable-or.in1 spindle-enable-xor.out
net spindle-enable             <=  spindle-enable-or.out
net spindle-cw                 <=  spindle.0.forward
net spindle-ccw                <=  spindle.0.reverse
net spindle-brake              <=  spindle.0.brake
net spindle-revs               =>  spindle.0.revs
net spindle-at-speed           =>  spindle.0.at-speed
net spindle-vel-fb-rps         =>  spindle.0.speed-in
net spindle-index-enable      <=>  spindle.0.index-enable
net spindle-is-oriented        =>  spindle.0.is-oriented
net spindle-orient-fault       =>  spindle.0.orient-fault
net spindle-locked             <=  spindle.0.locked
net spindle-locked             =>  spindle-enable-xor.in0 => orient-mux-or.in1
net orient-angle spindle.0.orient-angle orient.angle
net orient-mode spindle.0.orient-mode orient.mode
net orient-enable spindle.0.orient => orient.enable orient-mux-or.in0 spindle-enable-xor.in1
net orient-mux-sel orient-mux-or.out orient-mux.sel orient-pid.enable
net spindle-revs => orient.position orient-pid.feedback near-spindle.in2
net orient-command orient.command orient-pid.command near-spindle.in1
setp near-spindle.difference 0.01
#setp near-spindle.difference 0.5
#setp near-spindle.difference 1.5
#mux for switching between velocity and position pid output for the spindle#
net spindle-pos-output orient-pid.output orient-mux.in1
net spindle-near near-spindle.out => debounce.0.0.in
setp debounce.0.delay 20
#setp debounce.0.delay 50
net spindle-is-oriented-and0  <= debounce.0.0.out
net spindle-is-oriented-and0  => spindle-is-oriented-and.in0
net orient-enable             => spindle-is-oriented-and.in1
net spindle-is-oriented-edge  <= spindle-is-oriented-and.out
net spindle-is-oriented-edge  => edge.0.in
net spindle-is-oriented       <= edge.0.out
# rising edge
#setp edge.0.in-edge false
setp edge.0.in-edge true
# only rising edge
#setp edge.0.both false
setp edge.0.both true
#output pulse length
setp edge.0.out-width-ns 10000000
#home the spindle during first revolution
sets spindle-index-enable true
#fault on unhomed spindle
#net spindle-orient-fault      <= spindle.0.index-enablenet spindle-orient-fault      <= spindle.0.index-enable

# ---Setup spindle at speed signals---
sets spindle-at-speed true
#******************************
# connect miscellaneous signals
#******************************
#  ---HALUI signals---
net axis-select-x  halui.axis.x.select
net jog-x-pos      halui.axis.x.plus
net jog-x-neg      halui.axis.x.minus
net jog-x-analog   halui.axis.x.analog
net x-is-homed     halui.joint.0.is-homed
net axis-select-y  halui.axis.y.select
net jog-y-pos      halui.axis.y.plus
net jog-y-neg      halui.axis.y.minus
net jog-y-analog   halui.axis.y.analog
net y-is-homed     halui.joint.1.is-homed
net axis-select-z  halui.axis.z.select
net jog-z-pos      halui.axis.z.plus
net jog-z-neg      halui.axis.z.minus
net jog-z-analog   halui.axis.z.analog
net z-is-homed     halui.joint.2.is-homed
net jog-selected-pos      halui.axis.selected.plus
net jog-selected-neg      halui.axis.selected.minus
net spindle-manual-cw     halui.spindle.0.forward
net spindle-manual-ccw    halui.spindle.0.reverse
net spindle-manual-stop   halui.spindle.0.stop
net machine-is-on         halui.machine.is-on
net jog-speed             halui.axis.jog-speed
net MDI-mode              halui.mode.is-mdi
#  ---coolant signals---
net coolant-mist      <=  iocontrol.0.coolant-mist
net coolant-flood     <=  iocontrol.0.coolant-flood
#  ---probe signal---
net probe-touch-in     =>  motion.probe-input
#  ---motion control signals---
net in-position               <=  motion.in-position
net machine-is-enabled        <=  motion.motion-enabled
#  ---digital in / out signals---
#  ---estop signals---
net estop-out     <=  iocontrol.0.user-enable-out
net estop-ext     =>  iocontrol.0.emc-enable-in


#  --- tool change signals---
net tool-prepare-loopback   iocontrol.0.tool-prepare     =>     iocontrol.0.tool-prepared


21 Sep 2023 02:45

ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board

Category: Driver Boards

Dredging this one out of the archives -- how are people getting on with this hardware/firmware solution? I'd love to play around with this on a 3020  router with your usual steppers, limit sensors, EMO, and maybe a 0-10V for spindle. Is there a config that works for this use case?

Thanks
20 Sep 2023 22:55 - 20 Sep 2023 22:55

Trouble with Z axis/touch plate calibration

Category: General LinuxCNC Questions

 
Thanks Todd for the help.

Lets assume that I do not have any lost motion or missed steps (although I would like to know exactly how to check this). I am fairly positive that it is calibration issue as I did a quick and not so accurate calibration when I first set the machine up. I was expecting/planning to do a more accurate calibration once I worked out most of the bugs and got the machine broke-in. 

I just finished calibrating the Z-axis. I am within about .0005"-.001" tolerance. I think for wood applications that is acceptable. Now I need to figure out the touch plate. Once I get the touch plate thickness working correctly, then Z0.0 should be just touching the spoilboard (provided I have the calibration correct)?

I decided this morning to swap out my touch plate for a more accurate piece of aluminum because the touch plate I was using is a cheap one that has too much variance for me. After changing the touch plate and the offset (thickness) in the 100.ngc file I did a touch off and then ran Z0.0 and it stopped .8035" (which is the difference between the old touch plate and the new) above the spoilboard. So from what I can tell, changing the offset in 100.ngc file does not appear to do anything. So where do I actually put the offset (touch plate thickness) value for the touch plate?

Here is my 100.ngc file. My new touch plate is 1.572" thick. See the bolded section.
<pre>
o100 sub
G20
( Set current Z position to 0 so that we will always be moving down )
G10 L20 P0 Z0
( Probe to Z-.5 at F2 [Uses machine units, I work in inch, this is meant to be slow!] )
G38.2 Z-.25 f2
[b]( Set Z0 at point where probe triggers with offset of +1.004 [this is the thickness of my touch plate. You must adjust this for your plate / setup] )
(G10 L20 = Set Coordinate System // P - coordinate system 0-9 0 = Not active)
G10 L20 P1 Z1.572[/b]
( Rapid up to Z.5 above the material )
(G10 L20 P1)
(Use machine coordinates)
G90
G53 G0
(Incremental mode)
G91
(Rapid Z up 1 inches)
G0 Z1
o100 endsub
</pre>

Here is the Z axis section of my INI file.
# Generated by PNCconf at Fri Mar  3 16:12:30 2023
# Using LinuxCNC version:  Master (2.9)
# If you make changes to this file, they will be
# overwritten when you run PNCconf again

[EMC]
MACHINE = lcnc
DEBUG = 0
VERSION = 1.1

[DISPLAY]
DISPLAY = gmoccapy
EMBED_TAB_NAME = Center_panel
EMBED_TAB_LOCATION = ntb_preview
EMBED_TAB_COMMAND = gladevcp -c gladevcp  -H gvcp_call_list.hal -x {XID} gvcp-panel.ui
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 1.000000
MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/shawn/linuxcnc/nc_files
INCREMENTS = 20in 10in 1in .5in .1in .05in .01in .005in .001in .0005in .0001in
POSITION_FEEDBACK = ACTUAL
# Jog Speed - Also sets Jog Speed in LCNC Axis Manual Control Screen only if lower than MAX_LINEAR_VELOCITY. Otherwise MAX_LINEAR_VELOCITY sets this value. #
DEFAULT_LINEAR_VELOCITY = 2.00000
# Sets the Jog Speed/Max Velocity in LCNC Axis Manual Control Screen #
MAX_LINEAR_VELOCITY = 2.00000
MIN_LINEAR_VELOCITY = 0.016670
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.6666671
EDITOR = gedit
GEOMETRY = xyz
CYCLE_TIME = 100

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
PROGRAM_EXTENSION = .ngc,.NGC,.nc,.NC,.txt,.tap Gcode file
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var
SUBROUTINE_PATH = macros

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 2000000

[HMOT]
# **** This is for info only ****
CARD0=hm2_7i76e.0

[HAL]
HALUI = halui
HALFILE = lcnc.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal
SHUTDOWN = shutdown.hal

[HALUI]
# MDI_COMMAND=o100 call

[KINS]
JOINTS = 4
KINEMATICS = trivkins coordinates=XYYZ kinstype=BOTH

[TRAJ]
COORDINATES =  XYYZ
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 0.33
MAX_LINEAR_VELOCITY = 3.33

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
TOOL_CHANGE_QUILL_UP = 1

[MACROS]
MACRO = touch_plate_z

#******************************************
[AXIS_X]
MAX_VELOCITY = 3.3333333333333335
MAX_ACCELERATION = 90.0
MIN_LIMIT = -0.001
MAX_LIMIT = 44.761

[JOINT_0]
TYPE = LINEAR
HOME = 0.2
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 3.3333333333333335
MAX_ACCELERATION = 90
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 4.17
STEPGEN_MAXACCEL = 112.5
P = 500
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
# these are in nanoseconds
DIRSETUP   = 8000
DIRHOLD    = 5000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 10170.17
MIN_LIMIT = -0.001
MAX_LIMIT = 44.761
# Distance traveled off limit switch once switch is triggered
HOME_OFFSET = -0.100000
HOME_SEARCH_VEL = -0.833333
HOME_LATCH_VEL = 0.033333
# Speed from HOME_OFFSET to final HOME location
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
#******************************************

#******************************************
[AXIS_Y]
MAX_VELOCITY = 3.3333333333333335
MAX_ACCELERATION = 90.0
MIN_LIMIT = -0.001
MAX_LIMIT = 49.851

[JOINT_1]
TYPE = LINEAR
HOME = 2.703
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 3.3333333333333335
MAX_ACCELERATION = 90
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 4.17
STEPGEN_MAXACCEL = 112.5
P = 500
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
# these are in nanoseconds
DIRSETUP   = 8000
DIRHOLD    = 5000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = -10159.9564
MIN_LIMIT = -0.001
MAX_LIMIT = 49.851
HOME_OFFSET = 0.100000
HOME_SEARCH_VEL = -0.933333
HOME_LATCH_VEL = 0.333333
HOME_FINAL_VEL = 0.900000
HOME_IGNORE_LIMITS = YES
HOME_USE_INDEX = NO
HOME_SEQUENCE = -2

[JOINT_2]
TYPE = LINEAR
HOME = 2.703
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 3.3333333333333335
MAX_ACCELERATION = 90
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 4.17
STEPGEN_MAXACCEL = 112.5
P = 500
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
# these are in nanoseconds
DIRSETUP   = 8000
DIRHOLD    = 5000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = -10159.9564
MIN_LIMIT = -0.001
MAX_LIMIT = 49.851
HOME_OFFSET = 0.100000
HOME_SEARCH_VEL = -0.933333
HOME_LATCH_VEL = 0.333333
HOME_FINAL_VEL = 0.900000
HOME_IGNORE_LIMITS = YES
HOME_USE_INDEX = NO
HOME_SEQUENCE = -2
#******************************************

#******************************************
[AXIS_Z]
MAX_VELOCITY = 0.5
MAX_ACCELERATION = 50.0
MIN_LIMIT = -5.251
MAX_LIMIT = 0.001

[JOINT_3]
TYPE = LINEAR
HOME = -0.2
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 0.5
MAX_ACCELERATION = 50.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 0.62
STEPGEN_MAXACCEL = 62.5
P = 500
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
# these are in nanoseconds
DIRSETUP   = 8000
DIRHOLD    = 5000
STEPLEN    = 2500
STEPSPACE  = 2500
STEP_SCALE = 10304.26
MIN_LIMIT = -5.251
MAX_LIMIT = 0.001
HOME_OFFSET = -0.100000
HOME_SEARCH_VEL = 0.500000
HOME_LATCH_VEL = -0.033333
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
#******************************************

Here is my HAL file in case it helps.
# Generated by PNCconf at Fri Mar  3 16:12:30 2023
# Using LinuxCNC version:  Master (2.9)
# If you make changes to this file, they will be
# overwritten when you run PNCconf again

loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_eth board_ip="10.10.10.10" config="num_encoders=1 num_pwmgens=0 num_stepgens=4 sserial_port_0=00xxxx" 
setp    hm2_7i76e.0.watchdog.timeout_ns 5000000
loadusr -W hal_input -KRAL Logitech Gamepad F310
loadrt pid names=pid.x,pid.y1,pid.y2,pid.z,pid.s
loadrt mux16 names=jogspeed

addf hm2_7i76e.0.read          servo-thread
addf motion-command-handler   servo-thread
addf motion-controller        servo-thread
addf pid.x.do-pid-calcs       servo-thread
addf pid.y1.do-pid-calcs       servo-thread
addf pid.y2.do-pid-calcs       servo-thread
addf pid.z.do-pid-calcs       servo-thread
addf pid.s.do-pid-calcs       servo-thread
addf jogspeed                 servo-thread
addf hm2_7i76e.0.write         servo-thread
setp hm2_7i76e.0.dpll.01.timer-us -50
setp hm2_7i76e.0.stepgen.timer-number 1

# external output signals


# --- ESTOP-OUT ---
net estop-out  =>     hm2_7i76e.0.7i76.0.0.output-00

# --- ROUTER-ON ---
net coolant-mist   =>     hm2_7i76e.0.7i76.0.0.output-08

# --- DUST-COLLECTOR-ON
net coolant-flood   =>  hm2_7i76e.0.7i76.0.0.output-01

# external input signals

# --- ESTOP-EXT ---
net estop-ext     <=  hm2_7i76e.0.7i76.0.0.input-04

# --- BOTH-HOME-X ---
net both-home-x     <=  hm2_7i76e.0.7i76.0.0.input-05-not

# --- HOME-Y1 ---
net home-y1     <=  hm2_7i76e.0.7i76.0.0.input-06-not

# --- BOTH-HOME-Y2 ---
net both-home-y2     <=  hm2_7i76e.0.7i76.0.0.input-07-not

# --- BOTH-HOME-Z ---
net both-home-z     <=  hm2_7i76e.0.7i76.0.0.input-08-not

#*******************
#  AXIS X JOINT 0
#*******************

setp   pid.x.Pgain     [JOINT_0]P
setp   pid.x.Igain     [JOINT_0]I
setp   pid.x.Dgain     [JOINT_0]D
setp   pid.x.bias      [JOINT_0]BIAS
setp   pid.x.FF0       [JOINT_0]FF0
setp   pid.x.FF1       [JOINT_0]FF1
setp   pid.x.FF2       [JOINT_0]FF2
setp   pid.x.deadband  [JOINT_0]DEADBAND
setp   pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp   pid.x.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.x.maxerror 0.000500

net x-index-enable  <=> pid.x.index-enable
net x-enable        =>  pid.x.enable
net x-pos-cmd       =>  pid.x.command
net x-pos-fb        =>  pid.x.feedback
net x-output        <=  pid.x.output

# Step Gen signals/setup

setp   hm2_7i76e.0.stepgen.00.dirsetup        [JOINT_0]DIRSETUP
setp   hm2_7i76e.0.stepgen.00.dirhold         [JOINT_0]DIRHOLD
setp   hm2_7i76e.0.stepgen.00.steplen         [JOINT_0]STEPLEN
setp   hm2_7i76e.0.stepgen.00.stepspace       [JOINT_0]STEPSPACE
setp   hm2_7i76e.0.stepgen.00.position-scale  [JOINT_0]STEP_SCALE
setp   hm2_7i76e.0.stepgen.00.step_type        0
setp   hm2_7i76e.0.stepgen.00.control-type     1
setp   hm2_7i76e.0.stepgen.00.maxaccel         [JOINT_0]STEPGEN_MAXACCEL
setp   hm2_7i76e.0.stepgen.00.maxvel           [JOINT_0]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net x-pos-cmd    <= joint.0.motor-pos-cmd
net x-vel-cmd    <= joint.0.vel-cmd
net x-output     => hm2_7i76e.0.stepgen.00.velocity-cmd
net x-pos-fb     <= hm2_7i76e.0.stepgen.00.position-fb
net x-pos-fb     => joint.0.motor-pos-fb
net x-enable     <= joint.0.amp-enable-out
net x-enable     => hm2_7i76e.0.stepgen.00.enable

# ---setup home / limit switch signals---

net both-home-x     =>  joint.0.home-sw-in
net both-home-x     =>  joint.0.neg-lim-sw-in
net both-home-x     =>  joint.0.pos-lim-sw-in

#*******************
#  AXIS Y1 JOINT 1
#*******************

setp   pid.y1.Pgain     [JOINT_1]P
setp   pid.y1.Igain     [JOINT_1]I
setp   pid.y1.Dgain     [JOINT_1]D
setp   pid.y1.bias      [JOINT_1]BIAS
setp   pid.y1.FF0       [JOINT_1]FF0
setp   pid.y1.FF1       [JOINT_1]FF1
setp   pid.y1.FF2       [JOINT_1]FF2
setp   pid.y1.deadband  [JOINT_1]DEADBAND
setp   pid.y1.maxoutput [JOINT_1]MAX_OUTPUT
setp   pid.y1.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.y1.maxerror 0.000500

net y1-index-enable  <=> pid.y1.index-enable
net y1-enable        =>  pid.y1.enable
net y1-pos-cmd       =>  pid.y1.command
net y1-pos-fb        =>  pid.y1.feedback
net y1-output        <=  pid.y1.output

# Step Gen signals/setup

setp   hm2_7i76e.0.stepgen.01.dirsetup        [JOINT_1]DIRSETUP
setp   hm2_7i76e.0.stepgen.01.dirhold         [JOINT_1]DIRHOLD
setp   hm2_7i76e.0.stepgen.01.steplen         [JOINT_1]STEPLEN
setp   hm2_7i76e.0.stepgen.01.stepspace       [JOINT_1]STEPSPACE
setp   hm2_7i76e.0.stepgen.01.position-scale  [JOINT_1]STEP_SCALE
setp   hm2_7i76e.0.stepgen.01.step_type        0
setp   hm2_7i76e.0.stepgen.01.control-type     1
setp   hm2_7i76e.0.stepgen.01.maxaccel         [JOINT_1]STEPGEN_MAXACCEL
setp   hm2_7i76e.0.stepgen.01.maxvel           [JOINT_1]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net y1-pos-cmd    <= joint.1.motor-pos-cmd
net y1-vel-cmd    <= joint.1.vel-cmd
net y1-output     => hm2_7i76e.0.stepgen.01.velocity-cmd
net y1-pos-fb     <= hm2_7i76e.0.stepgen.01.position-fb
net y1-pos-fb     => joint.1.motor-pos-fb
net y1-enable     <= joint.1.amp-enable-out
net y1-enable     => hm2_7i76e.0.stepgen.01.enable

# ---setup home / limit switch signals---

net home-y1     =>  joint.1.home-sw-in
net home-y1     =>  joint.1.neg-lim-sw-in
# net home-y1     =>  joint.2.pos-lim-sw-in

#*******************
#  Tandem AXIS Y2 JOINT 2
#*******************

setp   pid.y2.Pgain     [JOINT_2]P
setp   pid.y2.Igain     [JOINT_2]I
setp   pid.y2.Dgain     [JOINT_2]D
setp   pid.y2.bias      [JOINT_2]BIAS
setp   pid.y2.FF0       [JOINT_2]FF0
setp   pid.y2.FF1       [JOINT_2]FF1
setp   pid.y2.FF2       [JOINT_2]FF2
setp   pid.y2.deadband  [JOINT_2]DEADBAND
setp   pid.y2.maxoutput [JOINT_2]MAX_OUTPUT
setp   pid.y2.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.y2.maxerror 0.000500

net y2-index-enable  <=> pid.y2.index-enable
net y2-enable        =>  pid.y2.enable
net y2-pos-cmd       =>  pid.y2.command
net y2-pos-fb        =>  pid.y2.feedback
net y2-output        <=  pid.y2.output

# Step Gen signals/setup for tandem axis

setp   hm2_7i76e.0.stepgen.02.dirsetup        [JOINT_2]DIRSETUP
setp   hm2_7i76e.0.stepgen.02.dirhold         [JOINT_2]DIRHOLD
setp   hm2_7i76e.0.stepgen.02.steplen         [JOINT_2]STEPLEN
setp   hm2_7i76e.0.stepgen.02.stepspace       [JOINT_2]STEPSPACE
setp   hm2_7i76e.0.stepgen.02.position-scale  [JOINT_2]STEP_SCALE
setp   hm2_7i76e.0.stepgen.02.step_type        0
setp   hm2_7i76e.0.stepgen.02.control-type     1
setp   hm2_7i76e.0.stepgen.02.maxaccel         [JOINT_2]STEPGEN_MAXACCEL
setp   hm2_7i76e.0.stepgen.02.maxvel           [JOINT_2]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net y2-pos-cmd    <= joint.2.motor-pos-cmd
net y2-vel-cmd    <= joint.2.vel-cmd
net y2-output     => hm2_7i76e.0.stepgen.02.velocity-cmd
net y2-pos-fb     <= hm2_7i76e.0.stepgen.02.position-fb
net y2-pos-fb     => joint.2.motor-pos-fb
net y2-enable     <= joint.2.amp-enable-out
net y2-enable     => hm2_7i76e.0.stepgen.02.enable

# ---setup home / limit switch signals---

net both-home-y2     =>  joint.2.home-sw-in
net both-home-y2     =>  joint.2.neg-lim-sw-in
net both-home-y2     =>  joint.2.pos-lim-sw-in

#*******************
#  AXIS Z JOINT 3
#*******************

setp   pid.z.Pgain     [JOINT_3]P
setp   pid.z.Igain     [JOINT_3]I
setp   pid.z.Dgain     [JOINT_3]D
setp   pid.z.bias      [JOINT_3]BIAS
setp   pid.z.FF0       [JOINT_3]FF0
setp   pid.z.FF1       [JOINT_3]FF1
setp   pid.z.FF2       [JOINT_3]FF2
setp   pid.z.deadband  [JOINT_3]DEADBAND
setp   pid.z.maxoutput [JOINT_3]MAX_OUTPUT
setp   pid.z.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.z.maxerror 0.000500

net z-index-enable  <=> pid.z.index-enable
net z-enable        =>  pid.z.enable
net z-pos-cmd       =>  pid.z.command
net z-pos-fb        =>  pid.z.feedback
net z-output        <=  pid.z.output

# Step Gen signals/setup

setp   hm2_7i76e.0.stepgen.03.dirsetup        [JOINT_3]DIRSETUP
setp   hm2_7i76e.0.stepgen.03.dirhold         [JOINT_3]DIRHOLD
setp   hm2_7i76e.0.stepgen.03.steplen         [JOINT_3]STEPLEN
setp   hm2_7i76e.0.stepgen.03.stepspace       [JOINT_3]STEPSPACE
setp   hm2_7i76e.0.stepgen.03.position-scale  [JOINT_3]STEP_SCALE
setp   hm2_7i76e.0.stepgen.03.step_type        0
setp   hm2_7i76e.0.stepgen.03.control-type     1
setp   hm2_7i76e.0.stepgen.03.maxaccel         [JOINT_3]STEPGEN_MAXACCEL
setp   hm2_7i76e.0.stepgen.03.maxvel           [JOINT_3]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net z-pos-cmd    <= joint.3.motor-pos-cmd
net z-vel-cmd    <= joint.3.vel-cmd
net z-output     => hm2_7i76e.0.stepgen.03.velocity-cmd
net z-pos-fb     <= hm2_7i76e.0.stepgen.03.position-fb
net z-pos-fb     => joint.3.motor-pos-fb
net z-enable     <= joint.3.amp-enable-out
net z-enable     => hm2_7i76e.0.stepgen.03.enable

# ---setup home / limit switch signals---

net both-home-z     =>  joint.3.home-sw-in
net both-home-z     =>  joint.3.neg-lim-sw-in
net both-home-z     =>  joint.3.pos-lim-sw-in


#******************************
# connect miscellaneous signals
#******************************

#  ---coolant signals---

net coolant-mist      <=  iocontrol.0.coolant-mist
net coolant-flood     <=  iocontrol.0.coolant-flood

#  ---probe signal---

net probe-in     =>  motion.probe-input

#limits debounce to stop false triggers
loadrt debounce cfg=1 #change to the number you want
setp debounce.0.delay 100 #this sets the delay 100 iterations of the servo-thread
addf debounce.0 servo-thread
net deb-probe-in debounce.0.0.in <= hm2_7i76e.0.7i76.0.0.input-09-not
net probe-in debounce.0.0.out
net probe-in => motion.probe-input

#  ---motion control signals---

net in-position               <=  motion.in-position
net machine-is-enabled        <=  motion.motion-enabled

#  ---digital in / out signals---

#  ---estop signals---

net estop-out     <=  iocontrol.0.user-enable-out
net estop-ext     =>  iocontrol.0.emc-enable-in

#  ---toolchange signals for custom tool changer---

net tool-number             <=  iocontrol.0.tool-prep-number
net tool-change-request     <=  iocontrol.0.tool-change
net tool-change-confirmed   =>  iocontrol.0.tool-changed
net tool-prepare-request    <=  iocontrol.0.tool-prepare
net tool-prepare-confirmed  =>  iocontrol.0.tool-prepared

Thanks

 
20 Sep 2023 18:12

servos and drives

Category: User Exchange

So, I have many servos and drives I need to make go away. Will eventually get them onto flea bay, but I figured is put the list here in cause anyone needs something for their retrofit / repairs. Items are located near toronto canada. Some I could ship easily, others like the maho stuff are really big and heavy.

1: Z axis sanyo servo from a brother TC 225. 720w.
2: X, Y, and Z axis sanyo servos froma brother TC 229. 1kw, 720w. 86mm flange.
3: 4 axis indramat servo kit from a Maho MC5HS. 7kw, 2.5kw, 1kw. BIG motors. Drives are analogue.
4: 3 sanyo RS1 drives and 2 sanyo P5 motors (500 and 400w). drives take analogue or pulse.
5: 4 sets with cables of leadshine nema34 120v easy servos (steppers with encoders).
6: 3 allen bradley ultra 3000 servo drives. can be used on the brother tc 229 servos or the P5's.

Part of the reason I am moving these on is that I NEED a new set of servos for a new machine build. 2 x 400w for x and y. 1 x 400w or 750w with brake for z. 1 x 750w for spindle. Looking for something "no fuss" kit with good performance (aiming for delta b3 if I buy new). maybe you got something to trade me?

Thanks.
 
14 Sep 2023 02:20

Mesa 7i92T pullups cause outputs (Spindle) to enable on reset or disconnect

Category: Driver Boards

Unfortunately, the charge pump on the MX4660 only inhibits movement on the stepper drivers (They stay on, and hold position). It has no effect on the outputs.
12 Sep 2023 19:04

Mesa 7i92T pullups cause outputs (Spindle) to enable on reset or disconnect

Category: Driver Boards

I'm in the process of migrating an Avid benchtop CNC machine from GRBL to LinuxCNC with a Mesa 7i92TF. The stepper driver in use is a MX4660, which has 4 stepper drivers for XYYZ, as well as several isolated inputs and outputs.

I'd like to keep backwards compatibility with the GRBL controller, such that all I have to do is swap whether the GRBL board or the Mesa 7i92 is connected to the DB25 port on the MX4660.  This is to allow me time to configure and get comfortable with LinuxCNC and still be able to revert back to GRBL if i need to use the machine before I'm ready to use it with LinuxCNC.

The 7i92TF has a DB25 IDC26 ports that can connect directly to the same ports on the MX4660, and there's a firmware for the 7i92TF that complements this arrangement.

So far, bringup and validation is going well - limit/homing switches are working, steppers are working, and as a result, homing is working, including gantry squaring.  The information available on these forums has been very helpful through this process!

I'm running into a problem with the output that controls Spindle Enable, however.  See attached MX4660 output diagram (dashed box on the left represents the "PC Parallel Port", or the Mesa 7i92TF in my case).

So, for both the PWM and the outputs (one of which I use for Spindle Enable), the optoisolators in the MX4660 need to be driven by whatever is connected to the DB25 port, and the circuit diagram suggests this can be done with pullups on the control card, which are gated to ground - this is essentially what the MX4660 does, however when the 7i92 is powered on (or, when LinuxCNC isn't running, or, when the ethernet cable is disconnected inadvertently causing a reset), the 7i92's pins all go to input mode, and the pullups take over and drive the signals high, which drives the LEDs in the optoisolators and turns ON whatever load they are controlling - in my case, the Spindle turns ON if I do any of the following:
- Disconnect the ethernet cable from the Mesa card
- Shut down LinuxCNC, including turning it off, unplugging it, or crashing it

This is obviously not a good failure mode.  The right electrical solution here is that for the MX4660, these signals shouldn't be pulled high by the control card (grbl, mesa, etc) on reset.  I designed my GRBL control board to work this way, but with the 7i92 I have two choices with the pull resistors on the ports: pull everything up, or pull everything down.  At first I thought switching to pull down would fix the problem, and it does as far as the output problem w/ spindle enable, however it also breaks all of the inputs (limit switches, probe)... See MX4660 input diagram.

So, for the limit signals, they are pulled high in the MX4660, and when the optoisolator is activated by the sensor, the signal is driven low.  When the optoisolator is not active, having the 7i92 in pull-down mode puts those pull-downs against the pull ups in the MX4660, and through experimentation, the 7i92 wins, and the inputs can never been seen as high - they always read low regardless of the sensor state.

Ideally, the controller used with the MX4660 should not pull all of the pins high OR low if it's in a reset state- it should leave all of them HiZ for the MX4660 to be in a safe state.  Unfortunately this isn't an option on the 7i92, right?

I've thought of two potential solutions here, and I wanted to ask for opinions on how to handle this:
1. Since I can select pull-up/pull-down based on the port on the 7i92, I could leave the DB25 port as pull-up, and set the IDC26 port to pull-down, and then move my spindle enable (and any other outputs) to the IDC26 port.  The problem with this solution is that it's not 100% backwards compatible with my GRBL controller pinout, which only uses the DB25 port on the 4660, however it's a simple cable swap to move back and forth.  The down-side to this is that it makes the 4 additional inputs available on the IDC26 port unusable (in the same way that using Mesa pulldowns on the DB25 port makes the limit switch inputs unusable).  Right now, I'm not using the 4 additional inputs on the IDC26 port, but I'm trying to make future expansion easier.
2. Use two outputs, and require one to be high (spindle enable) and one to be low (spindle inhibit) for the spindle to turn on.  This way the spindle wouldn't turn on in any case except when the mesa board was active and LinuxCNC was driving the enable pin high and the inhibit pin low.  This would be backwards compatible with the GRBL setup since the output I would use for spindle inhibit is unused, and already driven low. Downside to this is that it takes an extra output away, and it doesn't scale well as far as future expansion.
3. I haven't looked too far into this, but if I could selectively cut the traces to the pull up resistors for the output pins on the 79i2, that would also solve the problem. I'm not sure they are even accessible, and even if they are, I'm not sure I want to make that kind of a semi-permanent change to the board if I don't have to.
4. I could get one of the daughter boards (7i76, etc) and put my own circuitry between the Mesa boards and the MX4660, but I'm trying to keep things simple by connecting the 7i92 directly to the MX4660.

None of these solutions above are perfect.  Thoughts?

Thanks,
Dan
07 Sep 2023 22:01 - 07 Sep 2023 22:09

Remora - ethernet NVEM cnc board

Category: Computers and OS's

Thank you for your kindness.
Have you seen my pics? --> I think you should NOT TAKE ANY ADVISE from ME or my setup. My hal and ini is far from complete (right now some axis are reversed, shared homeswitches have to be configured, spindle CCW missing, spindle ENABLE and steppers ENABLE should be added, probe sensor to be configured, tool lenght sensor nada, and so on...) . I can only say that I set my FERROR = 1.0 on my old parallel break out board (but maybe that is totally not correct for your setup), but have not run ONE job so far with the nvme controller. But configuring these things is part of the fun for me.
Displaying 106 - 120 out of 176 results.
Time to create page: 4.431 seconds
Powered by Kunena Forum