Hard buttons for spindle start stop in Gmoccapy
- john11668
- Offline
- Elite Member
- Posts: 199
- Thank you received: 10
Is there any facility for this? Am I just missing them??
Please Log in or Create an account to join the conversation.
- Aciera
- Away
- Administrator
- Posts: 3949
- Thank you received: 1705
Please Log in or Create an account to join the conversation.
- john11668
- Offline
- Elite Member
- Posts: 199
- Thank you received: 10
I need to get familiar with linux jargon though to take me forward.
Please Log in or Create an account to join the conversation.
- john11668
- Offline
- Elite Member
- Posts: 199
- Thank you received: 10
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.
- john11668
- Offline
- Elite Member
- Posts: 199
- Thank you received: 10
I expected more !
Please Log in or Create an account to join the conversation.
- Aciera
- Away
- Administrator
- Posts: 3949
- Thank you received: 1705
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
Please Log in or Create an account to join the conversation.