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

More
21 Jun 2021 16:24 #212559 by Boris
Thanks PCW - it looks like you are correct.

I ran halcmd and halcmd show pin | grep -e spindle -e speed -e rpm

the results are below. I'm pretty sure it is the bottom two lines for the rpm display. When I looked in the HAL files I couldn't find a reference to them. Do I need to add them to HAL file somehow? I haven't gotten to editing ini and hal files yet. I have just been using the files generated by pncconf wizard.

cnclathe@CNCLathe:~$ halcmd show pin | grep -e spindle -e speed -e rpm
36 float IN 0 abs.spindle.in <== spindle-fb-rpm
36 bit OUT FALSE abs.spindle.is-negative
36 bit OUT FALSE abs.spindle.is-positive
36 float OUT 0 abs.spindle.out ==> spindle-fb-rpm-abs
36 bit OUT FALSE abs.spindle.sign
36 s32 OUT 228 abs.spindle.time
59 bit IN FALSE gmoccapy.spc_spindle.decrease
59 bit IN FALSE gmoccapy.spc_spindle.increase
59 float IN 60 gmoccapy.spc_spindle.scale
59 float OUT 1.666667 gmoccapy.spc_spindle.scaled-value
59 float OUT 100 gmoccapy.spc_spindle.value
59 bit IN FALSE gmoccapy.spindle.reset-spindle-override
59 bit IN FALSE gmoccapy.spindle.spindle-override.analog-enable
59 bit IN FALSE gmoccapy.spindle.spindle-override.count-enable
59 s32 IN 0 gmoccapy.spindle.spindle-override.counts
59 float IN 0 gmoccapy.spindle.spindle-override.direct-value
59 bit IN FALSE gmoccapy.spindle_at_speed_led
59 float IN 0 gmoccapy.spindle_feedback_bar

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

More
21 Jun 2021 16:34 #212561 by Boris
I found the file below - do I need to add it to a hal file to get gmoccapy to work correctly as I'm guessing the pncconf wizard misses a few bits?



###################################################################
# moccapy_postgui.hal file from Norbert Schechner #
###################################################################

loadrt abs names=abs_spindle_feedback
addf abs_spindle_feedback servo-thread

net spindle-speed-limited => abs_spindle_feedback.in
net spindle-abs abs_spindle_feedback.out => gmoccapy.spindle_feedback_bar
net spindle-at-speed gmoccapy.spindle_at_speed_led

# the unlink pin commands are only used, because they are connected
# in core_sim.hal and we use this file to simulate
unlinkp iocontrol.0.tool-change
unlinkp iocontrol.0.tool-changed
unlinkp iocontrol.0.tool-prep-number

net tool-change gmoccapy.toolchange-change <= iocontrol.0.tool-change
net tool-changed gmoccapy.toolchange-changed <= iocontrol.0.tool-changed
net tool-prep-number gmoccapy.toolchange-number <= iocontrol.0.tool-prep-number

net tooloffset-x gmoccapy.tooloffset-x <= motion.tooloffset.x
net tooloffset-z gmoccapy.tooloffset-z <= motion.tooloffset.z

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

More
21 Jun 2021 16:55 #212563 by PCW
It looks like the spindle speed data path starts here:

36 float IN 0 abs.spindle.in <== spindle-fb-rpm

So the first question is does the signal "spindle-fb-rpm" connect to the 7I96 encoder
velocity pin?

halcmd show signal spindle-fb-rpm

would answer this question

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

More
21 Jun 2021 17:14 #212564 by Boris
This is the result. tbh I'm not sure exactly what I am looking at. I will be reading up on hal basics tonight I think. I knew I'd hit this wall eventually.

cnclathe@CNCLathe:~$ halcmd show signal spindle-fb-rpm
Signals:
Type Value Name (linked to)
float 0 spindle-fb-rpm
==> abs.spindle.in
<== scale.spindle.out
float 0 spindle-fb-rpm-abs
<== abs.spindle.out
==> lowpass.spindle.in
float 0 spindle-fb-rpm-abs-filtered
<== lowpass.spindle.out
==> pyvcp.spindle-speed

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

More
21 Jun 2021 17:15 - 21 Jun 2021 17:22 #212565 by Boris
This should be a better format

cnclathe@CNCLathe:~$ halcmd show signal spindle-fb-rpm
Signals:
Type Value Name (linked to)
float 0 spindle-fb-rpm
==> abs.spindle.in
<== scale.spindle.out
float 0 spindle-fb-rpm-abs
<== abs.spindle.out
==> lowpass.spindle.in
float 0 spindle-fb-rpm-abs-filtered
<== lowpass.spindle.out
==> pyvcp.spindle-speed

File Attachment:

File Name: halcmd_sho...gnal.hal
File Size:1 KB
Attachments:
Last edit: 21 Jun 2021 17:22 by Boris.

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

More
21 Jun 2021 17:57 #212569 by PCW
Need to trace the pin "scale.spindle.in" connections now

halshow show pin scale.spindle.in

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

More
21 Jun 2021 18:16 #212573 by Boris
Thanks PCW - appreciate your patience. Doesn't look like that cmd worked?


cnclathe@CNCLathe:~$ halshow show pin scale.spindle.in

Cannot read file <show>

Usage:
halshow [Options] [watchfile]
Options:
--help (this help)
--fformat format_string_for_float
--iformat format_string_for_int

Notes:
Create watchfile in halshow using: 'File/Save Watch List'
linuxcnc must be running for standalone usage

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

More
21 Jun 2021 18:22 #212575 by PCW
sorry

halcmd show pin scale.spindle.in

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

More
21 Jun 2021 18:26 #212577 by Boris
No worries at all.

cnclathe@CNCLathe:~$ halcmd show pin scale.spindle.in
Component Pins:
Owner Type Dir Value Name
46 float IN 0 scale.spindle.in <== spindle-vel-fb-rps

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

More
21 Jun 2021 18:49 #212579 by PCW
now

halcmd show pin spindle-vel-fb-rps

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

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