spindle encoder question gmoccapy/Orac/7i96 ***Solved***

More
22 Jun 2021 21:26 - 22 Jun 2021 21:27 #212701 by PCW
It would be something like (in the main hal file):

loadrt near
addf near.0 servo-thread

net spindle-speed-fb near.0.in1
net spindle-vel-cmd-rpm near.0.in2
net spindle-at-speed near.0.out ## need to disconnect from GPIO
setp near.0.scale 1.2 (20% tolerance)

man near

for near component description
Last edit: 22 Jun 2021 21:27 by PCW.
The following user(s) said Thank You: Boris

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

More
23 Jun 2021 20:12 - 23 Jun 2021 20:16 #212763 by Boris
Hi PCW - those lines were added and it's solved the issue. Feedback bar and LED are working as they should. Thank you very much for your patience. Managed to get a much better understanding of the ini and hal files in the process.

For anyone else with this issue I think there were a couple of causes. Firstly there were missing pins and secondly there was an erroneous line in the main hal file that was pulling the postgui.hal file too early and giving a 'gmoccapy.spindle_feedback_bar does not exist' error message.

I had to delete the following line from line 2 of my main hal file;

source postgui_call_list.hal

No idea how or why it ended up in there. But it cleared the error message I was getting due to the gmoccapy pins I added to the postgui hal file.

To the main hal file I added the following lines;

loadrt near

# --- SPINDLE-AT-SPEED ---
#net spindle-at-speed <= hm2_7i96.0.gpio.026.in ***(I commented out this this line)
net spindle-speed-fb near.0.in1
net spindle-vel-cmd-rpm near.0.in2
net spindle-at-speed near.0.out
## need to disconnect from GPIO
setp near.0.scale 1.2

to the custom_postgui.hal file I added the following lines;

net spindle-speed-fb hm2_7i96.0.encoder.00.velocity-rpm
net spindle-speed-fb <= gmoccapy.spindle_feedback_bar

net spindle-at-speed <= gmoccapy.spindle_at_speed_led



Hope that helps anyone suffering the same issue. Cheers again PCW :) :) :)
Last edit: 23 Jun 2021 20:16 by Boris.

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

Moderators: piasdom
Time to create page: 0.058 seconds
Powered by Kunena Forum