Search Results (Searched for: 7i77 spindle)
Running servos in position mode instead of analog
Category: Driver Boards
You can't either because it's not "5ms". Using the HAL analog output command as your starting reference is not the right way to do that because nobody knows what voltage you have the drive set to respond to. At best the 3ms delay between encoders is valid.It's great he sent you a picture of a 1ms delay. But he told me the same thing. And when I asked why it's 5ms he could only point fingers at Linuxcnc but couldn't articulate any particular thing to look at that caused the delay.
I use a DYN4 with encoder feedback and it's plenty accurate. I use a 5000k rpm motor on my spindle controlled with step/direction from a 7i76e, it rigid taps all day. Analog control shouldn't make a difference except what is calculated as the deadzone. The analog command doesn't have an effect until the voltage is above/below the deadzone which is why you can't use the first blip of your HAL analog output command as a reference. If there was no deadzone you wouldn't be able to stop the motor but nothing about that is unique to DMM.Plenty of other setups use Linuxcnc and a 7i77 board but don't have this issue. I couldn't find a single example of someone using DMM with accurate encoder feedback. The only ones I found were using galil controllers and they used filters to remove the delays they were getting back from the encoder section.
Again sounds like you didn't tune the deadzone out of your PID. I'm assuming that because A, that's exactly what would happen as the drive just reached the Analog input threshold and B you never mentioned the deadzone then you posted the halscope image and the only way you come up with 5ms from looking at that is if you don't account for the deadzone at all. The size of the deadzone is dependant on other parameters set in the drive, it's on P78 of the manualAnd regardless of using a scope or not the servos would over current fault attempting to catch up to their commanded speed .I could never get them to run full speed in velocity mode with a closed loop.
Well built compared to what? Are you expecting a $250 servo drive to be as good as a $1k drive? If the "issue" is the "delay" then we gotta figure out what the actual delay is and if it's unreasonable. I have a DYN4 setup on a motor stand coupled with an encoder so I can test this. I didn't feel like setting up a Windows VM last night to re-configure the drive but I'll do that at some point today maybe. Like I said, I would expect a "delay" on the encoder output because of the nature of how it's generated. 3ms seems excessive, 1ms is probably fine but realistically it has to be compared with other drives doing the same thing.You have to ask yourself "why is no one else having the same issue running Linuxcnc and servos in closed loop". Maybe the issue is with DMM servos not being well built.
P.L.G freqrol
Category: Driver Boards
to check the encoder connection i dismantled it until i could see the wiring on the connector, below is the wiring for the encoder output connector
I have the impression that the 3 channels A,B,Z are single-ended, can you confirm this?
Between the connector and the encoder there is an electronic card with the following outputs
V+ - RED
G - BLACK
V- - BLUE
CG - GREY
G - YELLOW
B0 - WHITE
A0 - GREEN
if this is true, the encoder wiring on the 7i77 should look like this?
P.L.G freqrol
Category: Driver Boards
Following a misunderstanding of the freqrol drive and its configuration, I would like to exchange it for a more recent generation variable speed drive.
But I would like to keep its servo control.
The freqrol documentation mentions a P.L.G. spindle encoder.
Does anyone know what P.L.G corresponds to?
Does the PLG connection (below) correspond to a standard incremental encoder connection? A+/A-/B+/B-/Z+/Z-/5V
/GND
If yes, what do I wire Z+/Z- for?
1-PA
2-RA
3-PB
4-RB
5-AGA
6-NI5C
7-PZ
8-PI5C
9-AGA
the plg will be connected to a 7i77 card
Retrofit Precix 3 Axis Gantry Mill
Category: CNC Machines
This is more or less a follow up of a post from Randy:
forum.linuxcnc.org/27-driver-boards/3649...t-of-precix-5x10-cnc
We got a precix 3Axis Gantry mail in our department (University of applied arts vienna), which i want to give a 2nd life as the controller was broken for years. The mill has 3 DC-Servos and a 2.2KW Colombo Spindle
I Started it in Feb. 2023. Learned a lot over the summer and set up a new controller with new electricity but mostly relying on the old components (PSU, Motors, Spindle/VFD, Drivers are original). Controller is a mesa 7i77/7i92t.
Also learned to draw electric/electronic blueprints with KiCAD which was a great help
With the help of the forum I managed to run first G-Codes on the plain setup board (disconnected from the machine ) last week.
While tuning the motordrivers i ran into issues constantly tripping the breakers in front of the servo psu which is a beefy toroidal transformer(1500VA). Tripping happens when turning off! the PSU 1 out of 3 times. Also my ssr was blown already - maybe not a good idea i found out already.
So here is my question:
Who has more experience with induction/overvoltage issues running an old psu?
Suggestions for improving the electrical layout is appreciated, as the machine will hopefully run in an university environment again and i am not a trained electrician #safety.
I also attached some images and a schematic of my current controller setup.
Thx,
Armin
M19 and spindle-index-enable issues
Category: Advanced Configuration
In my case I think I had an issue with the high values of the encoder count on my mesa 7i77, the longer the spindle ran the longer the orient took because instead of 1 rotation orient, my spindle did 6-7 rotations ccw and then another 6-7 cw before the orient was completed, even if I ran in orient mode 1. I even tried to use M5 and a dwell before orienting but no success.
The only issue I had with the new component was G33.1 not synching properly and wanting to go at maximum speed into the workpiece, quite a sphincter tightening experience, but it seems that this issue was resolved by deleting the index_enable = 0 from case 0.
Regards,
Alex
Orientation position problem after run Gcode
Category: General LinuxCNC Questions
Have any idea for orientation with 7i77 ?I'd recommend using shielded cables and proper grounding.
I Ever use spindle motor mitsubishi Meldas it's have orientation mode internal .
When sent signal output to trick spindle amplifier orientation, it's will spin up (in second) and decrease speed down with lock position for orientation before toolchange .
I think if can reset index or position encoder before orient will work with 7i77 too , for clear all error signal before orient (I try a lot time if spindle run lower 3000 rpm will orient correct all time, but in real when working I use spindle 6500 rpm+ and will wrong position encoder maybe from noise)
Can for reset index or encoder position before M19 ?
Orientation position problem after run Gcode
Category: General LinuxCNC Questions
Hi Mr. PCWOK I would first verify the you have valid differential signals at the 7I77
You can do this by measuring the differential voltage with a voltmeter
You measure _between_ A and /A and _between_ B and /B
and verify that you have > 2V absolute in each state.
(you need to wiggle the spindle around to get each state)
One state should be >+2V and the other < -2V
(absolute value always greater than 2V)
I check done , result show below in picture
Asis,
Orientation position problem after run Gcode
Category: General LinuxCNC Questions
You can do this by measuring the differential voltage with a voltmeter
You measure _between_ A and /A and _between_ B and /B
and verify that you have > 2V absolute in each state.
(you need to wiggle the spindle around to get each state)
One state should be >+2V and the other < -2V
(absolute value always greater than 2V)
Orientation position problem after run Gcode
Category: General LinuxCNC Questions
My spindle type encoder differential signal , I can use function "hm2_7i96s.0 encoder.05.quad-error-enable true" right ?I would set the hm2_7i96s.0 encoder.05.quad-error-enable bit,
do your gcode test and see if hm2_7i96s.encoder.05.quad-error gets set true
Is the spindle encoder differential?
If so, is the 7I77 set for differential inputs?
Today I try.......
Change jumper on 7i77 Encoder 05 to quadrature position jump,
In hall I put use setp......... quad-error-enable true,
I test run step-up speed
M3 s200,
s500 ,
s1000
s2000
s3000
before s3000 all run good no show error .
When M3 s3000 it's show "hm2_7i96s.0: Encoder 5 : quadrature count error"
any for me check next step ?
Orientation position problem after run Gcode
Category: General LinuxCNC Questions
Ahh I just got you meaning set jumper.
I would set the hm2_7i96s.0 encoder.05.quad-error-enable bit,
do your gcode test and see if hm2_7i96s.encoder.05.quad-error gets set true
Is the spindle encoder differential?
If so, is the 7I77 set for differential inputs?
Hi MR.PCW
Yes, My spindle Encoder is Differential.
---- If so, is the 7I77 set for differential inputs?
Hmmm, I not sure , How to recheck ?
Now I use Differential Done by default Board.
Asis,
Orientation position problem after run Gcode
Category: General LinuxCNC Questions
Hi MR.PCWI would set the hm2_7i96s.0 encoder.05.quad-error-enable bit,
do your gcode test and see if hm2_7i96s.encoder.05.quad-error gets set true
Is the spindle encoder differential?
If so, is the 7I77 set for differential inputs?
Yes, My spindle Encoder is Differential.
---- If so, is the 7I77 set for differential inputs?
Hmmm, I not sure , How to recheck ?
Orientation position problem after run Gcode
Category: General LinuxCNC Questions
do your gcode test and see if hm2_7i96s.encoder.05.quad-error gets set true
Is the spindle encoder differential?
If so, is the 7I77 set for differential inputs?
Orientation position problem after run Gcode
Category: General LinuxCNC Questions
Hi MR.AcieraAh ok, it's actually an or2 component not a mux2 so that is fine then. I haven't gone over your hal in great detail and debugging spindle orientation can be a difficult task. Doing it remotely is very difficult indeed.
So the first thing I would suggest is to thoroughly test the spindle orient functionality by running the spindle and then do an M19 R0 then run the spindle again and do another M19 R0. You want this to work at least a hundred times using different spindle speeds and directions before moving on to other things.Today
Today I try to find this problem what or where to error
I try
m3 s1000 5minuts
recheck m19 r0 it's ok
m3 s2000 5 minuts
m3 s3000 3-4 mins
m3 s4000 4mins
m3 s5000 5 mins
m3 s6000 5mins
m3 s7000 5mins
before go next m3 i will M19 r0 for check , result = good
then I try run gcode about 1:30 - 2 mins
when gcode completed I try M19 r0 it's wrong position Orient.
Maybe I think when gcode run servo motor XYZ and motor water pump start too, Maybe noise in to Encoder05 on 7i77 for made it's error tracking ?
Asis,
Orientation position problem after run Gcode
Category: General LinuxCNC Questions
# 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
Orientation position problem after run Gcode
Category: General LinuxCNC Questions
My Board is 7i96s + 7i77
I use Encoder 05 from 7i77 setup to spindle Encoder
#*******************
# 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
First open linuxcnc program I will m3 s200 for index spindle setup.
I try M19 r0 it's move correct position on my mark Blue color on spindle
then I run file .ngc about 2minuts after gcode run completed I type M19 r0 , it's wrong position
why it's wrong position after run Gcode 2mins ?
I think , how for reset index spindle and I will m3 s200 for get new index spindle before ATC every time ?
or any solution for fix this problem ?