- Posts: 18115
- Thank you received: 5334
homing with Phase Z encoder on MESA 7i96s
- PCW
- Offline
- Moderator
-
Less
More
1 year 4 months ago #330321
by PCW
Replied by PCW on topic homing with Phase Z encoder on MESA 7i96s
To check, in halcmd:
sets b-index-enable true
and watch b-index-enable in halshow
Then move the axis past an index mark
b-index-enable should go false when the index is detected
sets b-index-enable true
and watch b-index-enable in halshow
Then move the axis past an index mark
b-index-enable should go false when the index is detected
Please Log in or Create an account to join the conversation.
- JackRay
- Offline
- Elite Member
-
Less
More
- Posts: 226
- Thank you received: 14
1 year 4 months ago #330412
by JackRay
Replied by JackRay on topic homing with Phase Z encoder on MESA 7i96s
yes, I checked all that with 4 encoders but I never saw any change in the Z signal. I think my .hal is compliant. Could there be a connection subtlety on the 7i96s card?
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
-
Less
More
- Posts: 18115
- Thank you received: 5334
1 year 4 months ago - 1 year 4 months ago #330416
by PCW
Replied by PCW on topic homing with Phase Z encoder on MESA 7i96s
You are not guaranteed to see any change in the Z signal
as its a short pulse and quite hard to catch at the 1 KHz servo thread.
(especially with higher resolution scales)
This is why the actual index event is captured in hardware.
The index (Z) signal is only provided as a hal signal for debugging
or using it as a GP input. It's normally not of any other use.
If index enable goes false on an index event, the index was detected.
as its a short pulse and quite hard to catch at the 1 KHz servo thread.
(especially with higher resolution scales)
This is why the actual index event is captured in hardware.
The index (Z) signal is only provided as a hal signal for debugging
or using it as a GP input. It's normally not of any other use.
If index enable goes false on an index event, the index was detected.
Last edit: 1 year 4 months ago by PCW. Reason: clarify
Please Log in or Create an account to join the conversation.
- JackRay
- Offline
- Elite Member
-
Less
More
- Posts: 226
- Thank you received: 14
1 year 4 months ago #330466
by JackRay
Replied by JackRay on topic homing with Phase Z encoder on MESA 7i96s
I don't quite understand, but that means I could never use it as a homing device? my encoders are 2500 pulses/ 10000 pulses quadrature hole.
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
-
Less
More
- Posts: 18115
- Thank you received: 5334
1 year 4 months ago - 1 year 4 months ago #330469
by PCW
Replied by PCW on topic homing with Phase Z encoder on MESA 7i96s
No, homing to index is common and fully supported.
I'm just saying that the actual index hal pin is not useful
for homing. The index-enable pin is what's used to communicate
index information from the hardware/driver to LinuxCNC
That is, this hal statement:
net phaseZ [HMOT](CARD0).encoder.00.input-index
Doesn't do anything useful.
But this hal statement:
net b-index-enable joint.3.index-enable <=> [HMOT](CARD0).encoder.00.index-enable
Allows LinuxCNC to enable index detection AND allows the driver to inform LinuxCNC
when the index has been detected.
To test whether the index hardware is working (assuming you can move the axis past
an index mark), you would:
With LinuxCNC running, use halshow to watch the signal b-index-enable
and then with either halshow or halcmd, set b-index-enable true"
halcmd sets b-index-enable true
halshow should now show b-index-enable true
now, if you move the axis past an index mark, b-index-enable should go false.
This is how you test for correct index operation.
I'm just saying that the actual index hal pin is not useful
for homing. The index-enable pin is what's used to communicate
index information from the hardware/driver to LinuxCNC
That is, this hal statement:
net phaseZ [HMOT](CARD0).encoder.00.input-index
Doesn't do anything useful.
But this hal statement:
net b-index-enable joint.3.index-enable <=> [HMOT](CARD0).encoder.00.index-enable
Allows LinuxCNC to enable index detection AND allows the driver to inform LinuxCNC
when the index has been detected.
To test whether the index hardware is working (assuming you can move the axis past
an index mark), you would:
With LinuxCNC running, use halshow to watch the signal b-index-enable
and then with either halshow or halcmd, set b-index-enable true"
halcmd sets b-index-enable true
halshow should now show b-index-enable true
now, if you move the axis past an index mark, b-index-enable should go false.
This is how you test for correct index operation.
Last edit: 1 year 4 months ago by PCW.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- JackRay
- Offline
- Elite Member
-
Less
More
- Posts: 226
- Thank you received: 14
1 year 4 months ago #330520
by JackRay
Replied by JackRay on topic homing with Phase Z encoder on MESA 7i96s
what do you think of my configuration:
# --- Encodeur configuration ---
setp [HMOT](CARD0).encoder.00.counter-mode 0
setp [HMOT](CARD0).encoder.00.filter 0
setp [HMOT](CARD0).encoder.00.scale [JOINT_3]ENCODER_B_SCALE
#setp [HMOT](CARD0).encoder.00.index-enable true
setp [HMOT](CARD0).encoder.00.index-mask 1
setp [HMOT](CARD0).encoder.00.index-invert 0
setp [HMOT](CARD0).encoder.00.index-mask-invert 0
# --- Feedback position/velocity via encodeur ---
net b-pos-fb <= [HMOT](CARD0).encoder.00.position
net b-pos-fb => pid.b.feedback
net b-pos-fb => joint.3.motor-pos-fb
net b-vel-fb <= [HMOT](CARD0).encoder.00.velocity
# --- Index pour homing ---
net b-index-enable joint.3.index-enable <=> [HMOT](CARD0).encoder.00.index-enable
net phaseZ [HMOT](CARD0).encoder.00.input-index
# --- Raw counts (optionnel debug) ---
net b-pos-rawcounts <= [HMOT](CARD0).encoder.00.rawcounts
# --- Switches (home et fins de course) ---
net b-home-sw => joint.3.home-sw-in
net b-neg-limit => joint.3.neg-lim-sw-in
net b-pos-limit => joint.3.pos-lim-sw-in
# --- Encodeur configuration ---
setp [HMOT](CARD0).encoder.00.counter-mode 0
setp [HMOT](CARD0).encoder.00.filter 0
setp [HMOT](CARD0).encoder.00.scale [JOINT_3]ENCODER_B_SCALE
#setp [HMOT](CARD0).encoder.00.index-enable true
setp [HMOT](CARD0).encoder.00.index-mask 1
setp [HMOT](CARD0).encoder.00.index-invert 0
setp [HMOT](CARD0).encoder.00.index-mask-invert 0
# --- Feedback position/velocity via encodeur ---
net b-pos-fb <= [HMOT](CARD0).encoder.00.position
net b-pos-fb => pid.b.feedback
net b-pos-fb => joint.3.motor-pos-fb
net b-vel-fb <= [HMOT](CARD0).encoder.00.velocity
# --- Index pour homing ---
net b-index-enable joint.3.index-enable <=> [HMOT](CARD0).encoder.00.index-enable
net phaseZ [HMOT](CARD0).encoder.00.input-index
# --- Raw counts (optionnel debug) ---
net b-pos-rawcounts <= [HMOT](CARD0).encoder.00.rawcounts
# --- Switches (home et fins de course) ---
net b-home-sw => joint.3.home-sw-in
net b-neg-limit => joint.3.neg-lim-sw-in
net b-pos-limit => joint.3.pos-lim-sw-in
Please Log in or Create an account to join the conversation.
Time to create page: 2.188 seconds