Mesa 7i76e Spindel Setup in LinuxCNC Configuration
05 Jan 2024 20:24 - 06 Jan 2024 19:21 #289897
by N3pu
Mesa 7i76e Spindel Setup in LinuxCNC Configuration was created by N3pu
Hey,
after I get the XYZ running in gmoccapy I am at the spindel.
The hardware is connected, see attachted. Thats not the problem I think.
- Until now I configured closely 100% with PNC-Conf. But the spindle setup can not be done in pnc conf or can it?!
- Adding manual lines in .hal and .ini means I can never change my configuration with PNC-Conf again, right?
What I have done to get the spindle turning:
In .HAL I added:
# --- DIGITAL POTENTIOMETER OUTPUT SETUP ---
setp hm2_7i76e.0.7i76.0.0.spinout-minlim [SPINDLE_0]OUTPUT_MIN_LIMIT
setp hm2_7i76e.0.7i76.0.0.spinout-maxlim [SPINDLE_0]OUTPUT_MAX_LIMIT
setp hm2_7i76e.0.7i76.0.0.spinout-scalemax [SPINDLE_0]OUTPUT_SCALE
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs => hm2_7i76e.0.7i76.0.0.spinout
net spindle-ccw <= spindle.0.reverse => hm2_7i76e.0.7i76.0.0.spindir
net spindle-enable <= spindle.0.on => hm2_7i76e.0.7i76.0.0.spinena
In .INI I added the last 3 vars:
[SPINDLE_0]
P = 0
I = 0
D = 0
FF0 = 1
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 2000
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 10000
OUTPUT_SCALE = 10000
At this point I can switch on the spindle and set the speed. My spindle has max 10k RPM so 1:1 to the GUI displayed value.
- How can I connect my encoder (spindle speed feedback) to the GUI and set the spindle is at speed window in accordance to this feedback?
The encoder feedback is working in the HALshow. Just A and B Encoder is ok. Index Signal is not wokring. The calculated velocity speed is about factor 66 to 69 (Could the factor be 2/3? I have resolver feedback in the motor. No discrete encoder). That means the velocity = 66 * real speed of motor.
- In the GUI there is a fixed value (6.000) in the grey bar below spindle control. I think this is the feedback value, right? Here I will need my 10.000 RPM. The red LEP will change to Green, when the spindle is "at Speed" / "in defined window" , correct?
- Just for understanding: When I will try to do synchronized tapping / threading then the Z Axis will be feeded in the spindle speed by the encoder feedback, correct?!
Have a nice weekend
after I get the XYZ running in gmoccapy I am at the spindel.
The hardware is connected, see attachted. Thats not the problem I think.
- Until now I configured closely 100% with PNC-Conf. But the spindle setup can not be done in pnc conf or can it?!
- Adding manual lines in .hal and .ini means I can never change my configuration with PNC-Conf again, right?
What I have done to get the spindle turning:
In .HAL I added:
# --- DIGITAL POTENTIOMETER OUTPUT SETUP ---
setp hm2_7i76e.0.7i76.0.0.spinout-minlim [SPINDLE_0]OUTPUT_MIN_LIMIT
setp hm2_7i76e.0.7i76.0.0.spinout-maxlim [SPINDLE_0]OUTPUT_MAX_LIMIT
setp hm2_7i76e.0.7i76.0.0.spinout-scalemax [SPINDLE_0]OUTPUT_SCALE
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs => hm2_7i76e.0.7i76.0.0.spinout
net spindle-ccw <= spindle.0.reverse => hm2_7i76e.0.7i76.0.0.spindir
net spindle-enable <= spindle.0.on => hm2_7i76e.0.7i76.0.0.spinena
In .INI I added the last 3 vars:
[SPINDLE_0]
P = 0
I = 0
D = 0
FF0 = 1
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 2000
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 10000
OUTPUT_SCALE = 10000
At this point I can switch on the spindle and set the speed. My spindle has max 10k RPM so 1:1 to the GUI displayed value.
- How can I connect my encoder (spindle speed feedback) to the GUI and set the spindle is at speed window in accordance to this feedback?
The encoder feedback is working in the HALshow. Just A and B Encoder is ok. Index Signal is not wokring. The calculated velocity speed is about factor 66 to 69 (Could the factor be 2/3? I have resolver feedback in the motor. No discrete encoder). That means the velocity = 66 * real speed of motor.
- In the GUI there is a fixed value (6.000) in the grey bar below spindle control. I think this is the feedback value, right? Here I will need my 10.000 RPM. The red LEP will change to Green, when the spindle is "at Speed" / "in defined window" , correct?
- Just for understanding: When I will try to do synchronized tapping / threading then the Z Axis will be feeded in the spindle speed by the encoder feedback, correct?!
Have a nice weekend
Last edit: 06 Jan 2024 19:21 by N3pu.
Please Log in or Create an account to join the conversation.
05 Jan 2024 20:32 #289898
by PCW
Replied by PCW on topic Mesa 7i76e Spindel Setup in LinuxCNC Configuration
For spindle synchronized motion you need to set the encoder scale
to the number of encoder counts per revolution (and you need index to work)
to the number of encoder counts per revolution (and you need index to work)
Please Log in or Create an account to join the conversation.
06 Jan 2024 19:30 #289988
by N3pu
Replied by N3pu on topic Mesa 7i76e Spindel Setup in LinuxCNC Configuration
Where do I find this encoder scale? In the encoder section of 7i76e is nothing?
For the index I am not sure if I have it or not.
I tried something by setting the "hm2_7i76e.0.encoder.00.input-index" Bit in Halshow.
Then I turned the motor by hand one round and the bit was reset. I marked this position on the motor wheel. It´s reproduceable. So that means my Z Signal is working?! It´s not really possible to measure by a multimeter on the Z+ / Z- Pins. I think the Signaltime is to short by turning the motor.
For the index I am not sure if I have it or not.
I tried something by setting the "hm2_7i76e.0.encoder.00.input-index" Bit in Halshow.
Then I turned the motor by hand one round and the bit was reset. I marked this position on the motor wheel. It´s reproduceable. So that means my Z Signal is working?! It´s not really possible to measure by a multimeter on the Z+ / Z- Pins. I think the Signaltime is to short by turning the motor.
Please Log in or Create an account to join the conversation.
06 Jan 2024 19:58 - 06 Jan 2024 20:17 #289994
by PCW
Replied by PCW on topic Mesa 7i76e Spindel Setup in LinuxCNC Configuration
The spindle encoder scale can be set in pncconf or by editing the .ini file
You set the index-enable signal and check that it gets cleared in the same
rotational position when the spindle is rotated by hand. If index-enable is only
cleared at one repeatable position, index is working.
The actual index signal is often quite a narrow pulse to hard to check in other ways
You set the index-enable signal and check that it gets cleared in the same
rotational position when the spindle is rotated by hand. If index-enable is only
cleared at one repeatable position, index is working.
The actual index signal is often quite a narrow pulse to hard to check in other ways
Last edit: 06 Jan 2024 20:17 by PCW.
Please Log in or Create an account to join the conversation.
06 Jan 2024 20:49 #289999
by N3pu
Replied by N3pu on topic Mesa 7i76e Spindel Setup in LinuxCNC Configuration
Perfect! So maybe someone else can bring me on the track how to get the encoder signals connected correctly to gmoccapy regarding speedbar and speed is okay signal...
Please Log in or Create an account to join the conversation.
07 Jan 2024 19:25 #290134
by N3pu
Replied by N3pu on topic Mesa 7i76e Spindel Setup in LinuxCNC Configuration
Ok, I found some information out and yeah, it´s very easy to get result if you know for what you have to search for ![:) :)](/media/kunena/emoticons/smile.png)
I dind´t noticed the section "parameters" in Halshow until now. Now I found the Encoder Scale for the 7i76e there!
BTW: My Scale is 1000 / - 1000.
I was able now to get the Feedback in RPM from the Encoder and forwarding this value to the gmoccapy speed-bar.
But I am not able to get the spindle-at.speed-signal to work.
I used the near function like everybody else is doing I think. I watched the input values in the halshow. They are correct. But the output of near is everytime false. In my oppinion it should work fine?! Could somebody have a look please?
After everything works well. I will post a small summary.
Here the near function I located in custom.hal:
# ---Encoder feedback signals/setup---
setp hm2_7i76e.0.encoder.00.counter-mode 1
setp hm2_7i76e.0.encoder.00.filter 1
setp hm2_7i76e.0.encoder.00.index-invert 0
setp hm2_7i76e.0.encoder.00.index-mask 0
setp hm2_7i76e.0.encoder.00.index-mask-invert 0
setp hm2_7i76e.0.encoder.00.scale [SPINDLE_0]ENCODER_SCALE
net spindle-revs <= hm2_7i76e.0.encoder.00.position
net spindle-vel-fb-rps <= hm2_7i76e.0.encoder.00.velocity
net spindle-vel-fb-rpm <= hm2_7i76e.0.encoder.00.velocity-rpm
net spindle-index-enable <=> hm2_7i76e.0.encoder.00.index-enable
# ---Setup spindle at speed signals---
loadrt near
net spindle-vel-cmd-rpm => near.0.in1
net spindle-vel-fb-rpm => near.0.in2
net spindle-at-speed <= near.0.out
setp near.0.scale 1.10000
setp near.0.difference 20
The line in main HAL i´ve tried to deactivate - but no change:
# ---Einrichtung der Signale zur Spindel-Geschwindigkeits-Steuerung---
#sets spindle-at-speed true
![:) :)](/media/kunena/emoticons/smile.png)
I dind´t noticed the section "parameters" in Halshow until now. Now I found the Encoder Scale for the 7i76e there!
BTW: My Scale is 1000 / - 1000.
I was able now to get the Feedback in RPM from the Encoder and forwarding this value to the gmoccapy speed-bar.
But I am not able to get the spindle-at.speed-signal to work.
I used the near function like everybody else is doing I think. I watched the input values in the halshow. They are correct. But the output of near is everytime false. In my oppinion it should work fine?! Could somebody have a look please?
After everything works well. I will post a small summary.
Here the near function I located in custom.hal:
# ---Encoder feedback signals/setup---
setp hm2_7i76e.0.encoder.00.counter-mode 1
setp hm2_7i76e.0.encoder.00.filter 1
setp hm2_7i76e.0.encoder.00.index-invert 0
setp hm2_7i76e.0.encoder.00.index-mask 0
setp hm2_7i76e.0.encoder.00.index-mask-invert 0
setp hm2_7i76e.0.encoder.00.scale [SPINDLE_0]ENCODER_SCALE
net spindle-revs <= hm2_7i76e.0.encoder.00.position
net spindle-vel-fb-rps <= hm2_7i76e.0.encoder.00.velocity
net spindle-vel-fb-rpm <= hm2_7i76e.0.encoder.00.velocity-rpm
net spindle-index-enable <=> hm2_7i76e.0.encoder.00.index-enable
# ---Setup spindle at speed signals---
loadrt near
net spindle-vel-cmd-rpm => near.0.in1
net spindle-vel-fb-rpm => near.0.in2
net spindle-at-speed <= near.0.out
setp near.0.scale 1.10000
setp near.0.difference 20
The line in main HAL i´ve tried to deactivate - but no change:
# ---Einrichtung der Signale zur Spindel-Geschwindigkeits-Steuerung---
#sets spindle-at-speed true
Please Log in or Create an account to join the conversation.
07 Jan 2024 21:02 - 07 Jan 2024 21:03 #290144
by PCW
Replied by PCW on topic Mesa 7i76e Spindel Setup in LinuxCNC Configuration
Do you have:
addf near.0 servo-thread
in your hal file?
addf near.0 servo-thread
in your hal file?
Last edit: 07 Jan 2024 21:03 by PCW.
The following user(s) said Thank You: N3pu
Please Log in or Create an account to join the conversation.
08 Jan 2024 18:33 #290233
by N3pu
Replied by N3pu on topic Mesa 7i76e Spindel Setup in LinuxCNC Configuration
Oh no, i did not had this.
Now it works.. Thank you very much PCW. You brought my maschine to life!
Main things should work for now..
Now it works.. Thank you very much PCW. You brought my maschine to life!
Main things should work for now..
Please Log in or Create an account to join the conversation.
Time to create page: 0.103 seconds