- Posts: 79
- Thank you received: 0
Best practice for multiple sources of Hal signals (estop, jog, etc.)
My current setup seems to allow axis and the pendant estop or jog the machine, but I was never able to sort how to add my own jog buttons with pyvcp without conflicting with the pendant.
Thanks
Please Log in to join the conversation.
The preferred way is to use momentary switches to toggle events.
In this way any panel can change the state.
You can see the idea in HALUI - there are pins with 'is-on' for status and separate pins for on and off.
Unfortunately things like jog rate and jog increment don't work that way.
Each ui has it's own concept of jograte/increment.
How does your pendant connect to linuxcnc?
If it was me I would try to use GLADEvcp for the 'hub' of all ways to jog.
It would mean you would need to connect your USB pendant with python code to gladevcp.
And that would still leave AXIS independant for jog rate etc - AXIS is not friendly in that way. It can be hacked in using the .axisrc file python and HAL.
Depends on how much time/work you wish to put into it.
Chris M
Please Log in to join the conversation.
"is-on vs "on" --was always puzzled by the similar names For the time being I think I'll just work through the estop issue, as I rarely jog from the panel and I rarely run things from the pendant. Once I'm back up with gladevcp I may revisit. I just needed to see if I was missing something obvious.
Thanks again,
Ron
p.s. One more thing... when you refer to momentary switches toggling events you are suggesting multiple momentary switches through an "or" function?
Please Log in to join the conversation.
Please Log in to join the conversation.
dokwine wrote: Thanks for the reply Chris. A few additional thoughts/?s then..
Hah! Never put that together "is-on vs "on" --was always puzzled by the similar names
The pendant is a bit of a black box; it has a driver and comes with a bunch of preconfigured Hal statements providing access to the signals which, in turn, drive standard HALUI input pins and conflicting with the panel's HAL pin definitions I expect I won't go there right now, but when you refer to connecting the pendant to gladevcp via python, are you referring to bashing the pins directly within python as a way to avoid creating signals for the HAL pins?
For the time being I think I'll just work through the estop issue, as I rarely jog from the panel and I rarely run things from the pendant. Once I'm back up with gladevcp I may revisit. I just needed to see if I was missing something obvious.
Thanks again,
Ron
p.s. One more thing... when you refer to momentary switches toggling events you are suggesting multiple momentary switches through an "or" function?
So your pendant using only HAL pins actually can work fine.
You could feed those HAL pins into gladevcp python code and dispatch all commands from there.
The 'or' component should not be necessary.
Most states, say flood coolant, is held in linuxcnc's motion controller.
You change the state by sending messages to the controller and the controller sends you status of the state with messages.
so if you have two pendants that have flood buttons that are momentary, with an LED for status of that state, then if one button is pressed it passes a message to the controller to toggle it's state.
After it toggles it's state the controller sends a status message to both pendants to update their LEDs.
If this way the state of both pendants are always the same and no 'or' component is needed
If you use a physical toggle switch on one pendant then of course that process can't work the same.
The physical switch represents the 'status' of that pendant and it can't be changed automatically.
It also doesn't work if the state (such as jograte) is not held by the motion controller.
In these cases you can connect the pendants together with HAL pins or code and dispatch commands from one place.
Chris M
Please Log in to join the conversation.
I really appreciate the input,
Ron
Please Log in to join the conversation.
dokwine wrote: Thanks Chris and Rod. I think I have what I need to get this sorted.
Hi Ron,
Care to share what you came up with? Might be helpful for others.
Please Log in to join the conversation.
rodw wrote: It is possible to create an estop chain in hal where you have seperate switches that trigger an estop. Its not documented very well anywhere I can find but it looks something like this for 3 estop switches (in my config anyway.).
I used your code to setup a latch and it all seems to work, but I can never get the machine out of the external e-stop state. Can somebody tell me what I am doing wrong? I can see in Halshow that signals are generated and respond to the physical switches.
I have an 7i96, Chinese paralel port bob (both for input/output) connected to the machine.I also have a JoyStick USB card connected that supplies input signals for LinuxCNC. The BOB shows the leds and the usb JoyStick card supplies the inputs for the external stop signals (except for the main e-stop, that is coming from the 7i96).
(more info about using the JoyStick USB solution can be found at: git.cnckloon.nl/PeterT/CNCMachine/wiki/Joystick-USB with many thanks to Jerry www.youtube.com/channel/UCLOP1A92jZxEmfZf_CJWW7A , he has lots more stuff explained).
Please Log in to join the conversation.
Please Log in to join the conversation.
