ATC with carousel.comp and M6 remap

More
04 Mar 2019 20:14 #127726 by gmarconi2
This is a working configuration of a 3-axis milling machine with a spindle and a 10-pocket ATC (carousel.comp Master)

carousel feedback is simulated with switch and relay in a breadboard.

The arm is driven by a motor, as is the carousel.

In my case the step motor and I use an Arduino interface to generate step dir, but I will try to follow the advice of "Andypugh"
to drive the engines with stepgen in velocity.

Greetings gmarconi2

File Attachment:

File Name: config.zip
File Size:9 KB
Attachments:
The following user(s) said Thank You: pl7i92

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

More
05 Mar 2019 11:46 #127779 by pl7i92
Thank you very mutch this might give som otheres a good startpoint

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

More
10 Mar 2019 21:26 - 10 Mar 2019 21:28 #128272 by gmarconi2
Goodmorning everyone
I use a fanuc AC spindle with a quadrature pulse generator without index, I can use it to see the actual speed.

I can control the spindle correctly, I have enabled spindle encoder on mesa 5i25-7i76 but in the hal file I do not see the pins of signals A and B.
I only see:
#*******************
# 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-abs => pid.s.command
net spindle-vel-fb-rpm-abs => pid.s.feedback
net spindle-output <= pid.s.output

# ---digital potentionmeter output signals/setup---

setp hm2_5i25.0.7i76.0.0.spinout-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-scalemax [SPINDLE_9]OUTPUT_SCALE

net spindle-output => hm2_5i25.0.7i76.0.0.spinout
net spindle-enable => hm2_5i25.0.7i76.0.0.spinena
net spindle-ccw => hm2_5i25.0.7i76.0.0.spindir

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

setp hm2_5i25.0.encoder.00.counter-mode 0
setp hm2_5i25.0.encoder.00.filter 1
setp hm2_5i25.0.encoder.00.index-invert 0
setp hm2_5i25.0.encoder.00.index-mask 0
setp hm2_5i25.0.encoder.00.index-mask-invert 0
setp hm2_5i25.0.encoder.00.scale [SPINDLE_9]ENCODER_SCALE

net spindle-revs <= hm2_5i25.0.encoder.00.position
net spindle-vel-fb-rps <= hm2_5i25.0.encoder.00.velocity
net spindle-index-enable <=> hm2_5i25.0.encoder.00.index-enable

# ---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 spindle-vel-fb-rps => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable

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

net spindle-vel-cmd-rps => near.0.in1
net spindle-vel-fb-rps => near.0.in2
net spindle-at-speed <= near.0.out
setp near.0.scale 1.000000
setp near.0.difference 3.333333

# **** Usa velocità mandrino EFFETTIVA dall'encoder mandrino
# spindle-velocity intermittente pertanto viene filtrata con passabasso
# **** velocità mandrino con il segno, pertanto usa componente assoluta per rimuovere il segno
# **** velocità EFFETTIVA è in giri/s e non giri/min pertanto viene scalata.

setp scale.spindle.gain 60
setp lowpass.spindle.gain 1.000000
net spindle-vel-fb-rps => scale.spindle.in
net spindle-fb-rpm scale.spindle.out => abs.spindle.in
net spindle-fb-rpm-abs abs.spindle.out => lowpass.spindle.in
net spindle-fb-rpm-abs-filtered lowpass.spindle.out


Greetings gmarconi2
Last edit: 10 Mar 2019 21:28 by gmarconi2.

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

More
11 Mar 2019 03:58 #128282 by tommylight
Encoder A and B can be seen in halmeter or in the hal configuration menu in linuxcnc.
In hal they are referred to only as encoder.n.
The following user(s) said Thank You: gmarconi2

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

More
17 Apr 2019 10:25 #131050 by gmarconi2
Good morning

I have an incremental encoder in the spindle motor, and everything works.
In reality however the spindle motor is coupled to the spindle with a belt, can I continue to use the encoder channels A and B on the spindle motor, and use index on the spindle?

Greetings Giampiero

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

More
17 Apr 2019 17:03 #131061 by tommylight
In general, yes, granted the count from index to index will not change due to reduction.
I do not know what happens if the count is not constant.
The following user(s) said Thank You: gmarconi2

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

Time to create page: 0.086 seconds
Powered by Kunena Forum