Gmoccapy - A new screen for linuxcnc

More
8 years 9 months ago #104541 by andypugh
You first need to decide what behaviour you want. then figure out how to make it happen.
My lathe has a 3-position switch Off - Auto - On. I think I did that with the LUT5 component but a mux_generic ("bb4") could be used too.
LUT5 is very useful, but not especially obvious to non-programmers.

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

More
8 years 9 months ago #104545 by rodw

andypugh wrote: LUT5 is very useful, but not especially obvious to non-programmers.


I think there would be many programmers out there today who find LUT5 "not especially obvious".

Don't get me started about today's programmers. I think I've had the dopiest one in the world working on my web site this last week on a project which should have taken a couple of hours to implement what was a very clear brief! I'm glad it was a fixed price and I'm not paying by the hour!

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

More
8 years 9 months ago #104547 by dhanger
Maybe a little background on my machine setup is in order. When I first set it up I used StepConf wizard and assigned the spindle brake to parport pin 8. I've used Axis in the past for a cnc router with no spindle brake, but with this machine when I assigned the pin, a checkbox for the spindle brake appeared in the Axis interface automatically. So I can switch the brake on and off manually when needed, and when running a program LinuxCNC takes care of the brake automatically. This is the exact behavior I want in gmocappy. Caleb is an experienced programmer, but he knows only what I've been able to explain about LinuxCNC hal files, which is only a small amount, so we're 'the blind leading the blind'.

I'll dig into the hal docs sometime soon, obviously I need a lot more savvy about that but just haven't taken the time. I thought this one little thing wouldn't be so obscure--at the moment it's the only thing that prevents me from using gmocappy, which is what I would prefer over Axis, especially since I went to the trouble of setting up a touch screen. :-)

Dan

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

More
8 years 9 months ago #104549 by andypugh
What does the spindle-brake HAL look like in the working Axis config?

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

More
8 years 9 months ago - 8 years 9 months ago #104558 by newbynobi
Hallo,

so let me jump in, before we get a mix of things ;-)
This is not a gmoccapy isue, but a hal connection problem!

So you have connected parport pin 8 to the signal spindle-brake, correct?
That signal is also connected to motion.spindle-brake

so in your hal file there must be two lines like (please correct the pin names, I have no computer availible with linuxcnc here)
Code:
net spindle-brake parport.0.pin-08-out net spindle-brake motion.spindle-brake

And the gladevcp button should loose the spindle brake, is that correct?
If so, we need a or component and connect the stuff as follows.
Please do that in your spindle-brake.hal file to avoid race conflicts, leave the actual lines in your main hal commented out!
Code:
loadrt or2 names=or_brake addf or_brake servo-thread net brake-one motion.spindle-brake => or_brake.in0 net brake-two spindle_brake_button.spindle_brake_button => or_brake.in1 net brake-out or_brake.out => parport.0.pin-08-out

Imagine the signal names being a cable , the first argument is a sender and the second is the receiver
like so:

net red_cable plug_in_the_wall => coffee_machine

you can not connect a tee cocker to the plug from the coffemachine, but to the cable so
net red_cable tee_cocker is OK
but net red_cable plug_from_the_tee_cooker is not OK!

Hope that does explain a little the problem you are having. With the or component we included a "double-plug"

man or2 gives good help

Norbert
Last edit: 8 years 9 months ago by newbynobi.

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

More
8 years 9 months ago #104564 by dhanger
Caleb here again. Okay, I think this is some really good help. The "or2" sounds like probably the way to go, I just needed help with the syntax, but I think I'm understanding it. One question I have: If I'm interpreting right, with this setup, the new toggle switch will still be *independent* of the spindle motion, and whether or not the brake is applied will be a function (using AND/OR/NOT operators) of both the state of the toggle button and whether or not the spindle is in motion. Is that correct? If so, my *guess* is that my dad will be fine with that, and we'll set it up so that the brake is applied *only* when the spindle is *not* in motion *and* the toggle button is pressed down, and otherwise the brake will be released.

However, my guess is that what my dad was probably most hoping for is for the new button and the automatic changes based on spindle movement to be connected, so that anytime the spindle begins moving, the brake is unconditionally released and the button becomes un-pushed to reflect this, and anytime the button stops moving, the brake is unconditionally applied and the button becomes pushed to reflect this. But, I don't know for sure that that's what he wants -- maybe he would actually prefer the situation I described above, where the button and spindle motion are independent, and for the brake only to be applied when the button is pushed and the spindle isn't moving. In fact, although I don't know for sure, the more I think about it, the more I suspect that it is what he wants. So, again, it's sounding like using the OR/AND operators are the way to go, and I think that example of syntax should be enough to help me figure out how to implement it right. :) Huge thanks to everyone for the continued help.

Cheers,
Caleb

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

Moderators: newbynobi, HansU
Time to create page: 0.292 seconds
Powered by Kunena Forum