[SOLVED] QtDragon - Spindle at speed LED not working
31 Oct 2023 09:32 - 01 Nov 2023 15:19 #284162
by karnalta
[SOLVED] QtDragon - Spindle at speed LED not working was created by karnalta
Hello all,
I have wired my VFD spindle at speed pin to the input 10 of my 7i96S mesa board.
The pin work correctly when monitored in HAL Show.
In my HAL file I have declared it like so :
I have wired my VFD spindle at speed pin to the input 10 of my 7i96S mesa board.
The pin work correctly when monitored in HAL Show.
In my HAL file I have declared it like so :
net spindle-at-speed spindle.0.at-speed <= hm2_7i96s.0.inm.00.input-10
But in the QtDragon UI, the At Speed LED turn on immediately at spindle startup.
I am probably missing something ?
Thank for help.
Last edit: 01 Nov 2023 15:19 by karnalta.
Please Log in or Create an account to join the conversation.
31 Oct 2023 10:14 #284168
by rodw
Replied by rodw on topic QtDragon - Spindle at speed LED not working
I think you need to
net spindle-at-speed => some-qtdragon-pin-for-at-speed
check the docs.
net spindle-at-speed => some-qtdragon-pin-for-at-speed
check the docs.
Please Log in or Create an account to join the conversation.
31 Oct 2023 10:29 #284170
by karnalta
linuxcnc.org/docs/devel/html/gui/qtdragon.html#_hal_pins
Replied by karnalta on topic QtDragon - Spindle at speed LED not working
I was thinking as you but did not find anything here :I think you need to
net spindle-at-speed => some-qtdragon-pin-for-at-speed
check the docs.
linuxcnc.org/docs/devel/html/gui/qtdragon.html#_hal_pins
Please Log in or Create an account to join the conversation.
31 Oct 2023 12:47 #284180
by cmorley
Replied by cmorley on topic QtDragon - Spindle at speed LED not working
Do you have a spindle speed feedback pin connected?
Qtdragon calculates spindle at speed it's self using spindle request and spindle feedback.
Can you post your config?
Qtdragon calculates spindle at speed it's self using spindle request and spindle feedback.
Can you post your config?
Please Log in or Create an account to join the conversation.
31 Oct 2023 13:22 #284182
by karnalta
Here is relevant part of my config :
Replied by karnalta on topic QtDragon - Spindle at speed LED not working
No I don't, my VFD is set to feedback a digital signal when at speed.Do you have a spindle speed feedback pin connected?
Qtdragon calculates spindle at speed it's self using spindle request and spindle feedback.
Can you post your config?
Here is relevant part of my config :
# SPINDLE IO
# ----------
net spindle-enable spindle.0.on => hm2_7i96s.0.ssr.00.out-00 => hm2_7i96s.0.pwmgen.00.enable
net spindle-cw spindle.0.forward => hm2_7i96s.0.ssr.00.out-01
net spindle-ccw spindle.0.reverse => hm2_7i96s.0.ssr.00.out-02
net spindle-output-rpm spindle.0.speed-out-abs => hm2_7i96s.0.pwmgen.00.value
net spindle-at-speed spindle.0.at-speed <= hm2_7i96s.0.inm.00.input-10
# SETUP MESA BOARD
# ----------------
# General
setp hm2_7i96s.0.pwmgen.pwm_frequency 20000
setp hm2_7i96s.0.pwmgen.pdm_frequency 6000000
setp hm2_7i96s.0.watchdog.timeout_ns 5000000
setp hm2_7i96s.0.dpll.01.timer-us -50
setp hm2_7i96s.0.stepgen.timer-number 1
setp hm2_7i96s.0.inm.00.input-10-slow 1
# Spindle
setp hm2_7i96s.0.pwmgen.00.output-type 1
setp hm2_7i96s.0.pwmgen.00.scale 24000
net spindle-manual-cw halui.spindle.0.forward
net spindle-manual-ccw halui.spindle.0.reverse
net spindle-manual-stop halui.spindle.0.stop
Please Log in or Create an account to join the conversation.
01 Nov 2023 05:35 #284236
by cmorley
Replied by cmorley on topic QtDragon - Spindle at speed LED not working
you can try this.
add the file into your config folder
add this line to the INI under the [DISPLAY] setting:
USER_COMMAND_FILE = CONFIGFOLDER/qtdragonrc.py
This should make the led automatically follow the pin spindle.0.at-speed state
add the file into your config folder
add this line to the INI under the [DISPLAY] setting:
USER_COMMAND_FILE = CONFIGFOLDER/qtdragonrc.py
This should make the led automatically follow the pin spindle.0.at-speed state
Please Log in or Create an account to join the conversation.
01 Nov 2023 05:44 #284237
by cmorley
Replied by cmorley on topic QtDragon - Spindle at speed LED not working
save the file as qtdragonrc.py
Please Log in or Create an account to join the conversation.
01 Nov 2023 11:55 #284248
by karnalta
Here is my full qtdragonrc.py file because you already helped me out in another thread
Replied by karnalta on topic QtDragon - Spindle at speed LED not working
I have no error or warning but it does not work.you can try this.
add the file into your config folder
add this line to the INI under the [DISPLAY] setting:
USER_COMMAND_FILE = CONFIGFOLDER/qtdragonrc.py
This should make the led automatically follow the pin spindle.0.at-speed state
Here is my full qtdragonrc.py file because you already helped me out in another thread
print('\nUser command file for button hiding found\n')
# needed to instance patch
# reference: https://ruivieira.dev/python-monkey-patching-for-readability.html
import types
# import the handlerfile to get reference to it's libraries.
# use <screenname>_handler
import qtdragon_hd_handler as SELF
###############################################
# add hook to hide buttons
###############################################
self.w.action_flood.hide()
self.w.btn_ref_laser.hide()
self.w.btn_laser_on.hide()
###############################################
# add hook to bind at-speed to pin
###############################################
def before_loop__(self):
try:
self.w.led_at_speed.setProperty('follow_halpin_state',True)
self.w.led_at_speed.setProperty('halpin_name','spindle.0.at-speed')
self.w.led_at_speed. _hal_init()
except Exception as e:
pass
# Here we are instance patching the original handler file to add a new
# function that calls our new function (of the same name)
# defined in this file
self.before_loop__ = types.MethodType(before_loop__, self)
Please Log in or Create an account to join the conversation.
01 Nov 2023 12:43 #284249
by cmorley
Replied by cmorley on topic QtDragon - Spindle at speed LED not working
Sorry yes dragon_hd has a different name for the led.
change all references of 'self.w.led_at_speed' to 'self.w.hal_led_atspeed'
change all references of 'self.w.led_at_speed' to 'self.w.hal_led_atspeed'
Please Log in or Create an account to join the conversation.
01 Nov 2023 15:18 #284264
by karnalta
Thank you.
Replied by karnalta on topic QtDragon - Spindle at speed LED not working
Yep, working fine nowSorry yes dragon_hd has a different name for the led.
change all references of 'self.w.led_at_speed' to 'self.w.hal_led_atspeed'
Thank you.
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.088 seconds