Help needed to get my 7i76E + 7i85S + 7i73 on my mill going.

More
10 Sep 2017 00:10 #98754 by andypugh

OK, error message gone BUT...
Still no M3 so something must be missing in Andys code for Spindle.


Very likely. I have next to no idea what any of your HAL pins are called or how your spindle is powered.

You do know all these things, and are in a position to investigate your HAL and correct my wild guesses.

My next wild guess is that there is a miss-match between the pins you have enabling the spindle drive and the pins the spindle drive expects.

As a starting point, is your VFD configured for ON / REV or FWD / REV ?

(And is the spindle even a VFD?)

I am finding this thread _extremely_ frustrating. Could you at least start each new question with a summary of whether the previous problem is solved or not? And given that we are about 23 pages of posts in, the occasional summary of the hardware and machine status would be nice. This is not the only thread that we are all reading, and it is hard to remember which machine is which when trying to support half a dozen simultaneous build threads.

Please Log in or Create an account to join the conversation.

More
10 Sep 2017 07:54 #98758 by tecno
Sorry it is like this but I am a LCNC newbie, will try to improve my communication with relevant information.

Answers to your questions.

VFD
forum.linuxcnc.org/media/kunena/attachments/481/fwdrev.pdf
# --- SPINDLE-CW ---
net spindle-cw hm2_7i76e.0.7i76.0.0.output-08

# --- SPINDLE-CCW ---
net spindle-ccw hm2_7i76e.0.7i76.0.0.output-09

Old HAL with M3 OK but not 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

net spindle-index-enable <=> pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm => pid.s.command

### --- net some-signal-name pid.X.feedback >> already declared ---
net spindle-vel-fb-rpm => pid.s.feedback
net spindle-output <= pid.s.output

# ---setup spindle control signals---

net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
net spindle-vel-cmd-rpm <= motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs <= motion.spindle-speed-out-abs
net spindle-enable <= motion.spindle-on
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
net spindle-at-speed => motion.spindle-at-speed

### --- net some-signal-name axis.N.motor-position-fb hm2_7i76e.0.encoder.MM.position -- is the line below to be changed???
net spindle-vel-fb-rps => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable

net spindle-pos hm2_7i76e.0.encoder.04.position motion.spindle-revs ### new added line
net spindle-vel hm2_7i76.0.encoder.04.velocity motion.spindle-vel ### new added line

# ---Setup spindle at speed signals---

sets spindle-at-speed true

setp hm2_7i76e.0.7i76.0.0.spinout-scalemax 1200
setp hm2_7i76e.0.7i76.0.0.spinout-maxlim 2500

net spindle-enable hm2_7i76e.0.7i76.0.0.spinena
net spindle-vel-cmd-rpm-abs hm2_7i76e.0.7i76.0.0.spinout
net spindle-ccw hm2_7i76e.0.7i76.0.0.spindir

New HAL with no M3 but spindle encoder functioning

#*******************
# SPINDLE S
#*******************

net spindle-cmd-rpm motion.spindle-speed-out-abs => hm2_7i76e.0.7i76.0.0.spinout
net spindle-enable motion.spindle-on => hm2_7i76e.0.7i76.0.0.spinena
net spindle-ccw motion.spindle-reverse => hm2_7i76e.0.7i76.0.0.spindir
net spindle-index-enable motion.spindle-index-enable <=> hm2_7i76e.0.encoder.04.index-enable
net spindle-pos hm2_7i76e.0.encoder.04.position => motion.spindle-revs
net spindle-vel hm2_7i76e.0.encoder.04.velocity => motion.spindle-speed-in

setp hm2_7i76e.0.7i76.0.0.spinout-scalemax 1200
setp hm2_7i76e.0.7i76.0.0.spinout-maxlim 2500

I assume that the problem is this line
net spindle-enable motion.spindle-on => hm2_7i76e.0.7i76.0.0.spinena

is this correct?
net spindle-cw motion.spindle-forward => hm2_7i76e.0.7i76.0.0.spinena

Please Log in or Create an account to join the conversation.

More
10 Sep 2017 09:44 - 10 Sep 2017 09:56 #98761 by tecno
Down in my shop I tested to edit HAL to
net spindle-cw motion.spindle-forward => hm2_7i76e.0.7i76.0.0.spinena

Now M3 functions but M4 does not, why is that so?

/edit
M4 output 9 works OK but nothing happens = spindle is still
Last edit: 10 Sep 2017 09:56 by tecno.

Please Log in or Create an account to join the conversation.

More
10 Sep 2017 11:58 #98765 by andypugh
What is your VFD connected to?

The 7i76E spindle outputs rather assume ON / REV wiring rather than FWD / REV wiring.

Can you set the VFD to ON / REV mode?

To clarify With ON / REV wiring forwards is
Forwards spindle: ON = TRUE, REV = FALSE
Reverse Spindle: ON = TRUE, REV = TRUE

FWD / REV wiring has:
Forwards spindle: FWD = TRUE, REV = FALSE
Reverse Spindle: FWD = FALSE, REV = TRUE

Most VFDs can be set to either mode.

Please Log in or Create an account to join the conversation.

More
10 Sep 2017 12:04 - 10 Sep 2017 12:07 #98766 by tecno
I hope I understand what you ask for.

forum.linuxcnc.org/media/kunena/attachments/481/fwdrev.pdf
Above schematics is supplied by Peter and it has been working with the old HAL as shown here
forum.linuxcnc.org/39-pncconf/33069-help...oing?start=390#98758

VFD discussed here
forum.linuxcnc.org/27-driver-boards/32933-7i76e-to-vfd
Last edit: 10 Sep 2017 12:07 by tecno. Reason: added text

Please Log in or Create an account to join the conversation.

More
10 Sep 2017 13:06 - 10 Sep 2017 13:07 #98768 by andypugh
Do you actually have the VFS wired according to the PDF and to the terminals named there? Your previous post suggests that you are using GPIO for fwd and rev to the VFD:

# --- SPINDLE-CW ---
net spindle-cw hm2_7i76e.0.7i76.0.0.output-08
# --- SPINDLE-CCW ---
net spindle-ccw hm2_7i76e.0.7i76.0.0.output-09


Can you confirm that you are now connected according to the PDF, and wired to the ENA and DIR outputs of the 7I76E? (and that the wiring suggested above is no longer relevant?)
Last edit: 10 Sep 2017 13:07 by andypugh.

Please Log in or Create an account to join the conversation.

More
10 Sep 2017 13:16 #98769 by tecno
Connected as PDF out from 7i76e to VFD
Outputs 8 and 9 controls 3-phase contactor

This HAL code has been working MINUS encoder trouble

#*******************
# 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

net spindle-index-enable <=> pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm => pid.s.command

### --- net some-signal-name pid.X.feedback >> already declared ---
net spindle-vel-fb-rpm => pid.s.feedback
net spindle-output <= pid.s.output

# ---setup spindle control signals---

net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
net spindle-vel-cmd-rpm <= motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs <= motion.spindle-speed-out-abs
net spindle-enable <= motion.spindle-on
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
net spindle-at-speed => motion.spindle-at-speed

### --- net some-signal-name axis.N.motor-position-fb hm2_7i76e.0.encoder.MM.position -- is the line below to be changed???
net spindle-vel-fb-rps => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable

net spindle-pos hm2_7i76e.0.encoder.04.position motion.spindle-revs ### new added line
net spindle-vel hm2_7i76.0.encoder.04.velocity motion.spindle-vel ### new added line

# ---Setup spindle at speed signals---

sets spindle-at-speed true

setp hm2_7i76e.0.7i76.0.0.spinout-scalemax 1200
setp hm2_7i76e.0.7i76.0.0.spinout-maxlim 2500

net spindle-enable hm2_7i76e.0.7i76.0.0.spinena
net spindle-vel-cmd-rpm-abs hm2_7i76e.0.7i76.0.0.spinout
net spindle-ccw hm2_7i76e.0.7i76.0.0.spindir

Please Log in or Create an account to join the conversation.

More
10 Sep 2017 13:48 #98771 by andypugh
I have lost track of what HAL file you are using again.

Does the relay click when you reverse the spindle?

Please Log in or Create an account to join the conversation.

More
10 Sep 2017 13:57 #98772 by tecno
forum.linuxcnc.org/39-pncconf/33069-help...oing?start=380#98699

modified as below

net spindle-cmd-rpm motion.spindle-speed-out-abs => hm2_7i76e.0.7i76.0.0.spinout
net spindle-cw motion.spindle-forward => hm2_7i76e.0.7i76.0.0.spinena
net spindle-ccw motion.spindle-reverse => hm2_7i76e.0.7i76.0.0.spindir
net spindle-index-enable motion.spindle-index-enable <=> hm2_7i76e.0.encoder.04.index-enable
net spindle-pos hm2_7i76e.0.encoder.04.position => motion.spindle-revs
net spindle-vel hm2_7i76e.0.encoder.04.velocity => motion.spindle-speed-in

setp hm2_7i76e.0.7i76.0.0.spinout-scalemax 1200
setp hm2_7i76e.0.7i76.0.0.spinout-maxlim 2500

M3 works OK
M4 relay works but VFD is not outputting anything

spinena - spindir - spinout must be messed up somehow
If
net spindle-enable motion.spindle-on => hm2_7i76e.0.7i76.0.0.spinena = only M4 works

Please Log in or Create an account to join the conversation.

More
10 Sep 2017 14:43 - 10 Sep 2017 14:44 #98775 by PCW

net spindle-cw motion.spindle-forward => hm2_7i76e.0.7i76.0.0.spinena


Cannot be right because it will disable the spindle enable output and analog when not going forward

net spindle-enable motion.spindle-on => hm2_7i76e.0.7i76.0.0.spinena


Is correct

If this does not work with your VFD, the trouble is elsewhere
Last edit: 10 Sep 2017 14:44 by PCW.

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.136 seconds
Powered by Kunena Forum