Time to setup my lathe with 7i76e

More
15 Dec 2017 19:58 #103145 by tecno
Is is this way to do this?

# --- SPINDLE-ENABLE ---
net spindle-enable hm2_7i76e.0.7i76.0.0.output-06

# --- SPINDLE-DIR ---
net spindle-enable hm2_7i76e.0.7i76.0.0.output-06 => net spindle-dir hm2_7i76e.0.7i76.0.0.output-05

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

More
16 Dec 2017 14:21 #103167 by tecno
I think I have found why M4 is not working.



If I have M3 300 spindle is running OK, in above video I do short VFD Common and reverse and it changes direction.

I think that as it is now the spindle output from 7i76e is ±5V and not 0-5V.





How to change this?
Attachments:

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

More
16 Dec 2017 17:11 - 16 Dec 2017 17:13 #103171 by tecno
DOH...

Some dinner and a cup of coffee.

Wiring problem at enable to dir relay, the enable was cut as soon as dir relay was enegised.
net spindle-vel-cmd-rpm-abs (abs was missing)

So tomorrow I will turn parts for mounting the new encoder.
Last edit: 16 Dec 2017 17:13 by tecno.

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

More
17 Dec 2017 14:12 - 17 Dec 2017 14:14 #103209 by tecno
So now I have the encoder mounted on spindle motor (easiest to do and belt-drive is 1:1)



I have the spindle encoder connected to 7i85s W1, W2, W4 UP - ENCODER 2

How do I set this up in hal?

File Attachment:

File Name: CNC3000_20...2-17.hal
File Size:10 KB

File Attachment:

File Name: CNC3000_20...2-17.ini
File Size:3 KB
Attachments:
Last edit: 17 Dec 2017 14:14 by tecno.

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

More
17 Dec 2017 15:03 #103213 by tecno
Is this all that is needed in HAL and INI

additons to CNC3000.hal

setp hm2_7i76e.0.encoder.02.scale [AXIS_2]ENCODER_SCALE

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

setp hm2_7i76e.0.encoder.02.counter-mode 0
setp hm2_7i76e.0.encoder.02.filter 1
setp hm2_7i76e.0.encoder.02.index-invert 0
setp hm2_7i76e.0.encoder.02.index-mask 0
setp hm2_7i76e.0.encoder.02.index-mask-invert 0

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


Additions to CNC3000.ini

#********************
# Spindle
#********************

MAX_OUTPUT = 3000.0
ENCODER_SCALE = ???? (1250ppr)

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

More
17 Dec 2017 20:13 #103241 by tecno
I am getting nowhere with this spindle encoder.

num_encoders=4

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

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

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


ENCODER_SCALE = 5000


Now I get following error on joint 0 (x-axis will not move!)

File Attachment:

File Name: CNC3000_20...17-3.hal
File Size:10 KB



Any hints on what is wrong here?
Attachments:

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

More
17 Dec 2017 21:11 #103245 by PCW
The following error has nothing to do with the encoder
Its probably because you have the PID maxerror setting of .0005
it should be commented out or set to 0

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

More
18 Dec 2017 09:27 #103276 by tecno
Hmmm it works OK with HAL without encoder so there must be a bobo somewhere. Been messing around quite a bit ;)

Here working HAL

File Attachment:

File Name: CNC3000no_encoder.hal
File Size:10 KB
Attachments:

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

More
24 Dec 2017 00:48 #103501 by andypugh

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


Are the "other ends" of these signals set up?

I am curious to see how your encoder works, Vee-belts probably don't run exactly 1:1, I think you might see index creep when threading.

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

More
24 Dec 2017 07:05 #103523 by tecno
Morning Andy,

" other ends " = I´m lost here

I agree to your suspicion about creeping but this is the closest I can get for the moment. In future when I change the spindle motor to AC servo I will have wide toothed belt and rely on encoder in motor.

These are the latest *untested* HAL and INI, can you see any errors here?

File Attachment:

File Name: CNC3000_20...2-24.ini
File Size:3 KB

File Attachment:

File Name: CNC3000_20...2-24.hal
File Size:11 KB


Happy Holidays
Bengt
Attachments:

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

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