Fanuc Serial Pulse Coders - Red cap servos, mesa 7i76e, how to?
- bnet
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 41
- Thank you received: 4
13 Oct 2025 02:49 #336358
by bnet
Replied by bnet on topic Fanuc Serial Pulse Coders - Red cap servos, mesa 7i76e, how to?
Here's a version that uses the digitally settable preset velocity mode to seek for the index of the encoder:
# =====================================================
# LinuxCNC HAL — Ultra3000 preset velocity index seek
# Board: 7i76e main + 7i84 (outputs) + 7i85 (encoder)
# Axis: X
# =====================================================
loadrt threads name1=servo-thread period1=1000000
# --- Load components ---
loadrt bldc count=1
loadrt encoder num_chan=1
loadrt mux2 count=1
loadrt and2 count=1
loadrt not count=1
loadrt timedelay count=1
loadrt oneshot count=1
addf encoder.update servo-thread
addf bldc servo-thread
addf timedelay servo-thread
addf oneshot servo-thread
# =====================================================
# Encoder setup (7i85)
# =====================================================
setp hm2_7i85.0.encoder.00.scale 800
setp hm2_7i85.0.encoder.00.counter-mode 0
setp hm2_7i85.0.encoder.00.filter 1
net x-enc-a hm2_7i85.0.encoder.00.input-a
net x-enc-b hm2_7i85.0.encoder.00.input-b
net x-enc-z hm2_7i85.0.encoder.00.input-index
# =====================================================
# BLDC Hall synthesis (for Ultra3000 commutation)
# =====================================================
# 8-pole motor = 4 pole pairs
setp bldc.0.pole-pairs 4
setp bldc.0.encoder-scale 800
setp bldc.0.hall-offset 0 # will be updated after index alignment
net x-enc-pos hm2_7i85.0.encoder.00.position => bldc.0.enc-pos
net hall-u bldc.0.hall-u => hm2_7i84.0.output-00
net hall-v bldc.0.hall-v => hm2_7i84.0.output-01
net hall-w bldc.0.hall-w => hm2_7i84.0.output-02
# =====================================================
# Preset Velocity Control Output (7i84)
# =====================================================
# Choose an available output (here output-03)
net preset-vel-enable => hm2_7i84.0.output-03
# =====================================================
# Step/Dir control enable (7i76e stepgen 0)
# =====================================================
net stepgen-enable => hm2_7i76e.0.stepgen.00.enable
# =====================================================
# State control logic for startup alignment
# =====================================================
# --- Delay after power-up before preset allowed ---
setp timedelay.0.on-delay 0.25
net startup-delay timedelay.0.out => preset-allow
net always-true timedelay.0.in <= true
# --- Oneshoot from encoder index detection ---
setp oneshot.0.width 0.05
net x-enc-index hm2_7i85.0.encoder.00.index => oneshot.0.in
net index-found oneshot.0.out
# --- Preset velocity enable logic ---
# When not yet found index and startup delay done -> enable preset rotation
loadrt and2 count=1
net not-found-delay and2.0.in0 <= preset-allow
net not-found-delay and2.0.in1 <= not-index-found
net preset-active and2.0.out => hm2_7i84.0.output-03
# --- index found logic ---
loadrt not count=1
net index-found oneshot.0.out => not.0.in
net not-index-found not.0.out
# --- On index detection, disable preset and enable stepgen ---
net index-found stepgen-enable
# (this ties directly; optionally route through another delay)Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 19720
- Thank you received: 4574
15 Oct 2025 23:47 #336525
by andypugh
Replied by andypugh on topic Fanuc Serial Pulse Coders - Red cap servos, mesa 7i76e, how to?
The question is whether the drives can do preset velocity with no commutation.
ChatGPT (or any AI) is going to do very poorly with anything that hasn't been done before.
ChatGPT (or any AI) is going to do very poorly with anything that hasn't been done before.
Please Log in or Create an account to join the conversation.
- bnet
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 41
- Thank you received: 4
21 Oct 2025 00:54 #336799
by bnet
Replied by bnet on topic Fanuc Serial Pulse Coders - Red cap servos, mesa 7i76e, how to?
So does this mean that the BLDC module doesn't output commutation before/during the startup indexing procedure? If commutation outputs are suppressed before index pulse is found I may have a problem. I was thinking that it could output them, even if they were off by a little, and hopefully it wouldn't jostle the motor around too much.The question is whether the drives can do preset velocity with no commutation.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 19720
- Thank you received: 4574
22 Oct 2025 12:00 #336865
by andypugh
I think you are suggesting that you could supply "fake" commutation signals from LinuxCNC to the drive, and that might be enough to persuade the drive to start working?
That might actually work.
If the motor has little enough load on it at startup to magnetically align so that the "fake" commutation becomes true, just long enough for the drive to see the encoder index, then start running off that, you might be able to get things working.
I suppose it's worth a try, it's an hour's work and 3 wires.
Replied by andypugh on topic Fanuc Serial Pulse Coders - Red cap servos, mesa 7i76e, how to?
So does this mean that the BLDC module doesn't output commutation before/during the startup indexing procedure? If commutation outputs are suppressed before index pulse is found I may have a problem. I was thinking that it could output them, even if they were off by a little, and hopefully it wouldn't jostle the motor around too much.
I think you are suggesting that you could supply "fake" commutation signals from LinuxCNC to the drive, and that might be enough to persuade the drive to start working?
That might actually work.
If the motor has little enough load on it at startup to magnetically align so that the "fake" commutation becomes true, just long enough for the drive to see the encoder index, then start running off that, you might be able to get things working.
I suppose it's worth a try, it's an hour's work and 3 wires.
Please Log in or Create an account to join the conversation.
- bnet
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 41
- Thank you received: 4
24 Oct 2025 19:48 #337082
by bnet
Replied by bnet on topic Fanuc Serial Pulse Coders - Red cap servos, mesa 7i76e, how to?
This is what I'm thinking. I will try it as soon as I have time and report back.I think you are suggesting that you could supply "fake" commutation signals from LinuxCNC to the drive, and that might be enough to persuade the drive to start working?
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.082 seconds