Hard buttons for spindle start stop in Gmoccapy

More
03 Jul 2021 10:39 #213552 by john11668
I would like to carry out spindle start  and stop from my machine panel.  I can see Hal pins for spindle speed increase  /decrease  but none for start / stop
Is there any facility for this? Am I just missing them??

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

  • Aciera
  • Aciera's Avatar
  • Away
  • Administrator
  • Administrator
More
03 Jul 2021 18:49 #213582 by Aciera
Have a look at the halui.spindle. pins:

linuxcnc.org/docs/html/man/man1/halui.1.html
The following user(s) said Thank You: john11668

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

More
04 Jul 2021 20:54 #213719 by john11668
Replied by john11668 on topic Hard buttons for spindle start stop in Gmoccapy
Will look a bit closer tomorrow, but sounds like it should give me what I want .
I need to get familiar with linux jargon though to take me forward.

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

More
12 Jul 2021 20:31 #214426 by john11668
Replied by john11668 on topic Hard buttons for spindle start stop in Gmoccapy
Probably gives me what I want , if only I could break through the mystery of linux .
So I want to start my spindle the appropriate Halui command seems to be :-
halui.spindle.N.start (bit in)

No doubt this is simple to experienced Linux users , but from my viewpoint I need to ask .. What is the significance of "Bit in " What does it mean ?

Then the N in the command . Is this a word with a specific meaning or is it a variable

Then "a rising edge on this pin starts the spindle".
I understand that my button is connected to a pin which is standing at 5v and pressing the button will drop this to ground voltage so a falling edge ??????
How do I cater for this ?

So I have called up halui in my ini file HAL section.
[HAL]
HALFILE = TCL_lathe__Base.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
HALUI = halui

I have 9 working buttons .
Five Jog buttons which drive the following jog functions and their commands reside in the Hal file :-
net jog-x-plus <= parport.1.pin-10-in-not => gmoccapy.jog.axis.jog-x-plus

net jog-x-minus <= parport.1.pin-09-in-not => gmoccapy.jog.axis.jog-x-minus

net jog-z-plus <= parport.1.pin-08-in-not => gmoccapy.jog.axis.jog-z-plus

net jog-z-minus <= parport.1.pin-07-in-not => gmoccapy.jog.axis.jog-z-minus

net turtle gmoccapy.jog.turtle-jog <= parport.1.pin-06-in

Then four program buttons which start and control program steps and these reside in the Custom postgui hal file ,

net startbutton parport.1.pin-05-in => halui.mode.auto halui.program.run
net stepbutton parport.1.pin-04-in => halui.program.step

net pausebutton parport.1.pin-02-in => halui.program.pause
net resumebutton parport.1.pin-03-in => halui.program.resume

So Now I wish to start my spindle using pin 06 on parport 1
I am guessing that I need something like this ? ( I say like this cos this just throws up an error to tell me that the expression is not valid)
net spindlestart parport.1.pin-06-in => halui.spindle.N.start

so what is wrong with my choice here ?
More important , Where do I find formats which are acceptable . I am floundering here

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

More
18 Jul 2021 11:25 #215220 by john11668
Replied by john11668 on topic Hard buttons for spindle start stop in Gmoccapy
Cant help saying I am very disappointed that this thread just dried up.
I expected more !

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

  • Aciera
  • Aciera's Avatar
  • Away
  • Administrator
  • Administrator
More
18 Jul 2021 11:58 - 18 Jul 2021 12:01 #215221 by Aciera

No doubt this is simple to experienced Linux users , but from my viewpoint I need to ask .. What is the significance of "Bit in " What does it mean ?


"Bit" means it's a boolean signal that can have the values TRUE or FALSE
"in" means the pin is an input (ie it needs to be connected to be fed with values from somewhere else)

Then the N in the command . Is this a word with a specific meaning or is it a variable


"N" stands for a number.
Example: halui.joint.N.home
If you want to use this pin for joint 0 then it would be halui.joint.0.home
for joint 2 it would be halui.joint.2.home

Then "a rising edge on this pin starts the spindle".
I understand that my button is connected to a pin which is standing at 5v and pressing the button will drop this to ground voltage so a falling edge ??????
How do I cater for this ?


Use the pin: parport.<p>.pin-<n>-in-not (bit) Tracks a physical input pin, but inverted
linuxcnc.org/docs/html/man/man1/hal_parport.1.html

so your line would look like this (presuming you have only one spindle):

net spindlestart parport.1.pin-06-in-not => halui.spindle.0.start
Last edit: 18 Jul 2021 12:01 by Aciera.
The following user(s) said Thank You: john11668

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

Moderators: newbynobiHansU
Time to create page: 0.069 seconds
Powered by Kunena Forum