- Posts: 20
- Thank you received: 0
Spindle control using XHC-WHB04B-6 pendant
2 years 11 months ago #284197
by pistrix
Spindle control using XHC-WHB04B-6 pendant was created by pistrix
Can somebody please point me to where I can read about how Gmoccapy operates the spindle. Specifically, how does it take into account the Spindle Starting RPM in Settings (or the parameter [DISPLAY] DEFAULT_SPINDLE_SPEED in the ini file) if S value is not yet specified?
I am asking this because I have an issue with starting the spindle using my pendant: The button to start the spindle activates the spindle through halui.spindle.0.start but if the S value is not yet specified, it sets the speed to 100 RPM (also, if S is specified, it starts the spindle to S+100 RPM which is even more puzzling). This creates all sorts of problems... I would like the pendant to start the spindle the same way as does the Gmoccapy - to the RPMs set in Settings if S is not yet specified or to the S value if specified.
I thought that understanding how Gmoccapy does it will give me an idea how to implement this on my pendant.
Here are the signals related to spindle and the pendant:
net pdnt.spindle.is-on whb.halui.spindle.is-on spindle.0.on
net pdnt.spindle.start whb.halui.spindle.start halui.spindle.0.start
net pdnt.spindle.stop whb.halui.spindle.stop halui.spindle.0.stop
net pdnt.spindle.forward whb.halui.spindle.forward halui.spindle.0.forward
net pdnt.spindle.reverse whb.halui.spindle.reverse halui.spindle.0.reverse
net pdnt.spindle.increase whb.halui.spindle.increase halui.spindle.0.increase
net pdnt.spindle.decrease whb.halui.spindle.decrease halui.spindle.0.decrease
net pdnt.spindle-speed-abs whb.halui.spindle-speed-cmd spindle.0.speed-out-abs
net pdnt.spindle-override.scale whb.halui.spindle-override.scale halui.spindle.0.override.scale
net pdnt.spindle.override.value halui.spindle.0.override.value whb.halui.spindle-override.value
net pdnt.spindle.override.increase whb.halui.spindle-override.increase halui.spindle.0.override.increase
net pdnt.spindle.override.decrease whb.halui.spindle-override.decrease halui.spindle.0.override.decrease
I am asking this because I have an issue with starting the spindle using my pendant: The button to start the spindle activates the spindle through halui.spindle.0.start but if the S value is not yet specified, it sets the speed to 100 RPM (also, if S is specified, it starts the spindle to S+100 RPM which is even more puzzling). This creates all sorts of problems... I would like the pendant to start the spindle the same way as does the Gmoccapy - to the RPMs set in Settings if S is not yet specified or to the S value if specified.
I thought that understanding how Gmoccapy does it will give me an idea how to implement this on my pendant.
Here are the signals related to spindle and the pendant:
net pdnt.spindle.is-on whb.halui.spindle.is-on spindle.0.on
net pdnt.spindle.start whb.halui.spindle.start halui.spindle.0.start
net pdnt.spindle.stop whb.halui.spindle.stop halui.spindle.0.stop
net pdnt.spindle.forward whb.halui.spindle.forward halui.spindle.0.forward
net pdnt.spindle.reverse whb.halui.spindle.reverse halui.spindle.0.reverse
net pdnt.spindle.increase whb.halui.spindle.increase halui.spindle.0.increase
net pdnt.spindle.decrease whb.halui.spindle.decrease halui.spindle.0.decrease
net pdnt.spindle-speed-abs whb.halui.spindle-speed-cmd spindle.0.speed-out-abs
net pdnt.spindle-override.scale whb.halui.spindle-override.scale halui.spindle.0.override.scale
net pdnt.spindle.override.value halui.spindle.0.override.value whb.halui.spindle-override.value
net pdnt.spindle.override.increase whb.halui.spindle-override.increase halui.spindle.0.override.increase
net pdnt.spindle.override.decrease whb.halui.spindle-override.decrease halui.spindle.0.override.decrease
Please Log in to join the conversation.
2 years 11 months ago #285909
by pistrix
Replied by pistrix on topic Spindle control using XHC-WHB04B-6 pendant
Nobody? Anyway, I will try to find a solution and write here if I succeed.
Please Log in to join the conversation.
2 years 10 months ago #287981
by HansU
Replied by HansU on topic Spindle control using XHC-WHB04B-6 pendant
Sorry for the late reply.
The [DISPLAY] DEFAULT_SPINDLE_SPEED value is only taken for the first time if no gmoccapy preference file is available. After that the starting speed will be set by the gmoccapy settings:
Spindle
See linuxcnc.org/docs/devel/html/gui/gmoccapy.html#_hardware
The [DISPLAY] DEFAULT_SPINDLE_SPEED value is only taken for the first time if no gmoccapy preference file is available. After that the starting speed will be set by the gmoccapy settings:
Spindle
- Starting RPM - Sets the rpm to be used if the spindle is started and no S value has been set.NoteThis value will be presetted according to your settings in
Code:[DISPLAY] DEFAULT_SPINDLE_SPEED of your INI file. If you change the settings on the settings page, that value will be default from that moment, your INI file will not be modified.
See linuxcnc.org/docs/devel/html/gui/gmoccapy.html#_hardware
Please Log in to join the conversation.
2 years 10 months ago #289008
by pistrix
Replied by pistrix on topic Spindle control using XHC-WHB04B-6 pendant
Thank you. I guess you missed what I wanted to ask. I would like to know "how" gmoccapy does it. I know where the settings are but I would like to know the mechanism behind operating the spindle. I wrote in my previous message why I need this.
Please Log in to join the conversation.
2 years 10 months ago #289373
by HansU
Replied by HansU on topic Spindle control using XHC-WHB04B-6 pendant
If you have not programmed a S word or have set S 0, then the speed defined in the settings is used.
For any other programmed S word, this value will be used.
For any other programmed S word, this value will be used.
Attachment not found
Please Log in to join the conversation.
2 years 10 months ago #289383
by pistrix
Replied by pistrix on topic Spindle control using XHC-WHB04B-6 pendant
Thank you for your patience and please allow me to explain my issue again:
I have a pendant with the button to start the spindle. It does so through halui.spindle.0.start but if the S value is not yet specified, it sets the speed to 100 RPM. This creates all sorts of problems...
I would like the pendant to start the spindle the same way as does Gmoccapy - to the RPMs set in Settings if S is not yet specified or to the S value if specified.
Do you maybe have an idea how to implement this?
I have a pendant with the button to start the spindle. It does so through halui.spindle.0.start but if the S value is not yet specified, it sets the speed to 100 RPM. This creates all sorts of problems...
I would like the pendant to start the spindle the same way as does Gmoccapy - to the RPMs set in Settings if S is not yet specified or to the S value if specified.
Do you maybe have an idea how to implement this?
Please Log in to join the conversation.
2 years 10 months ago #289384
by Aciera
Replied by Aciera on topic Spindle control using XHC-WHB04B-6 pendant
Gmoccapy uses the python interface command channel to start the spindle:
Code:
if command == "stop":
# documentation of self.command.spindle()
# linuxcnc.spindle(direction, speed, spindle=0)
self.command.spindle(0)
self.widgets.lbl_spindle_act.set_label("S 0")
elif command == "forward":
self.command.spindle(1, rpm_out)
elif command == "reverse":
self.command.spindle(-1, rpm_out)
else:
LOG.debug("Something went wrong, we have an unknown spindle widget {0}".format(command))
Please Log in to join the conversation.
2 years 10 months ago #289385
by Aciera
Replied by Aciera on topic Spindle control using XHC-WHB04B-6 pendant
linuxcnc.org/docs/html/config/python-interface.html
You could create a custom python component to control the spindle using the python interface
You could create a custom python component to control the spindle using the python interface
Please Log in to join the conversation.
Time to create page: 0.091 seconds
