Setting up limit switches and a bunch of other things

More
30 Jun 2021 04:52 - 30 Jun 2021 04:54 #213306 by BOOTSTRAPPYWORKSHOP
Okay, brand new to LinuxCNC.  I have built a few 3D printers running Marlin. I am running 2.8.0 on an old Dell using it's serial port to connect to a C10 breakout board from CNC4PC.  www.cnc4pc.com/c10-bi-directional-parall...-interface-card.html .

I am using standard mechanical limit switches. www.cnc4pc.com/pub/media/productattachments/files/WS_229.pdf

The physical ESTOP switch does not work wired up like that. For starters the stepconf wizard will only let me label it an ESTOP IN, and simply won't recognize the second wire when plugged in as pictured.  When I move the wire to Pin 1 where I can assign it ESTOP OUT, or reverse them, or invert them - in any combination - I either get an ESTOP that I can't turn on or that I can't turn off. So I've unplugged it completely for now and am just using F1 on the keyboard. I haven't tried the lower "ESTOP as Hardware Disable" setup pictured here, but plan to when I get the limit switches going and suspect it will work. : www.cnc4pc.com/pub/media/productattachments/files/WS_239.pdf

When I run the Z home the Z carriage goes up very slowly, hits the switch, and just keeps trying to go up until I hit the ESTOP/F1 in the gui(gmoccapy). I'm fine with the speed for homing, but why is the signal not triggering the carriage to stop? I have to assign each limit switch HOME X, HOME Y, etc to avoid an error code - anything else and I can't even get the jog controls because an error greys them out. 

I am also trying to hook op an OpenBuilds XYZ probe, and I think it's not working for the same or similar reason - my own inexperience.  I've tried assigning this one to PROBE, All HOME, All Limits, and I think a few others and I just get a whole lotta nothing happening. The blue signal wire is plugged into pin 11, and the black is plugged into a free COM next to pin 9. The lights on the probe fire up because it's getting 5v.  docs.openbuilds.com/doku.php?id=docs:xyzprobe:wiringgeneric

I also can't get the machine to allow me to select a tool. I suspect that's because I can't get it to home.

I also have the router connected to an IOT Relay running into the OUTPUT pin 17+GRND on the board and it seems to be working.  I have to wait until the system is completely powered up to hit the power switch on the relay or it will just start up the router and keep going.  However if I wait to hit the physical switch until I have gmoccapy fired up I can turn the router on and off with the onscreen button in gmoccapy until I'm I'm blue in the face with no issues. 

I know that's a whole lot to unpack, what am I missing here? I'm not trying to dial in the machine yet, just trying to get to the point I can run some basic gcode spit out by FreeCAD.
Last edit: 30 Jun 2021 04:54 by BOOTSTRAPPYWORKSHOP. Reason: clarification

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

More
30 Jun 2021 05:41 #213309 by BeagleBrainz
Going by the diagram Pin 10 is your ESTOP in.
The pin next to Pin 10 is the common.

ESTOP switches are usually normally closed, so if the switch fails of a wire comes loose your machine will go into an ESTOP condition.

Your Pin1 is an output, so I can't really understand why that would be part of your ESTOP circuit. Unless you are using it to connect to an indicator lamp or relay.

Now your PDF shows 2 examples of connecting an ESTOP, one where the EN Pin is shorted to 5v and the other where the EN Pin is electrically shorted to Pin 10. Which diagram are you using for your wiring ?

So for the moment I think we should concentrate on your ESTOP issue.

If you could be so kind as to attach your ini and hal files that would be great.
the location of these files, in case you are not aware are:
/home/yourusername/linuxcnc/configs/nameofyourconfig/
The following user(s) said Thank You: BOOTSTRAPPYWORKSHOP

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

More
30 Jun 2021 12:15 #213336 by andypugh
It is typically best if the e-stop physically prevents the hardware from running.
But for a stepper-controlled machine, especially a 3D printer, there probably isn't any real need for an e-stop at all.

You certainly can set up an e-stop loop with a linuxCNC-controlled output running through the switch to an input, but that would be unusual and is something that you would probably have to configure in the HAL by hand.

Bear in mind that the wizards will create a basic config for you, but at some point they have done all that they can, and if you want any more elaborate config you can edit the HAL and INI files by hand. But be aware that the wizards will over-write your changes unless they are confined to the CUSTOM_HAL and CUSTOM_POSTGUI HAL files. Simplest is just to decide when you are done with the wizards and take ownership of the config files yourself.
The following user(s) said Thank You: BOOTSTRAPPYWORKSHOP

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

More
30 Jun 2021 20:51 - 02 Jul 2021 00:08 #213369 by BOOTSTRAPPYWORKSHOP
I think these are the files you are talking about.  

EDIT:
I tried the alternate wiring suggested in the PDF and it did not work.  So ripped it back out. Keyboard ESTOP is working just fine. I have better things to do than screw with a nice-to-have.

Pressing F5 starts up MDI, but then trying to home Z just causes a crash.If I can't home the system I can't load a tool.  Although I just officially tested the jogging controls with a tool running and I can manually cut plywood with the jog controls.

EDIT: 
Been reading this thread: forum.linuxcnc.org/49-basic-configuratio...roblem-homing-z-axis

Should I add "HOME_IGNORE_LIMITS = NO" to the ini(obviously without the quotes)?

EDIT:
This is the ESTOP and the limit switches I am attempting to use.  www.amazon.com/Emergency-Stop-Limited-Mi...f_=pd_bap_d_rp_186_t

I don't see a single thing about running them off of 5v.

EDIT :

Had an idea.  Switched the limit switch wires from NC to NO, took off the inverts, and changed "Home [axis}" to "limit [Axis}". GMOCCAPY started up with no errors. The limit switches now deaden the machine when tripped, I had to reverse the Z wire back to NC jog the axis down while holding it closed, and then change it back to NO. I jogged the machine into a corner on axis almost touching all three switches and hit the home which zeroed the DRO indicated by it turning green and only displaying zeroes. Suddenly the tool change was available. I had set the XYZ probe to "Probe In" and so I decided to try it with a bit in the router. I jogged it down to the probe and got the message that the probe had been tripped. So I guess I have to figure out a program to have the machine do that automatically? Touch off is still grayed out, something about offsets, so I guess I have to figure out what that means.

I have a feeling the machine is basically running now.  It's just a matter of familiarization, not mechanical or something set wrong. Thank you for the replies.  
Attachments:
Last edit: 02 Jul 2021 00:08 by BOOTSTRAPPYWORKSHOP. Reason: update

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

More
03 Jul 2021 00:10 #213521 by andypugh
When you say "homing Z causes a crash" is that in the physical or software sense?

To save yourself problems with CAM packages later, configure Z with Z-0 at the top, and Z = -<full travel> at the bottom. LinuxCNC doesn't care how you do it, but many CAM packages insert a G53 G0 Z0 in the code (rapid to machine coordinates Z = 0) You can probably guess how wrong that is if machine Z is not top-of-travel.

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

More
03 Jul 2021 07:43 - 03 Jul 2021 07:45 #213539 by BOOTSTRAPPYWORKSHOP
Crash as in the the carriage hits the limit switch and then the end of travel and the motor keeps turning as though it never closed the limit switch. I haven't tried setting the switches to "Home [axis]" since switching the wires over to NO. Not all of them, I tried just homing Z. 

And yes, Z0 is at the top.

But no, as of yet the machine has not performed a successful autohome, but I can zero out all of the axises manually if I set them all as "limits" in stepconf. Then manually jogging the router down to the touch probe I was able to verify that it is working because as soon as the bit got to the touch pad I got a message where the error messages pop up. But when I jogged the Z all the way up closing the limit switch, and the program ESTOPed no longer allowing me to turn the virtual power switch on to use the jog controls, so I had to stop, pull the wire, plug it in so that the switch was now configured for NC, hold it closed, jog the z back down, and then reconfigure the switch for NO.
Last edit: 03 Jul 2021 07:45 by BOOTSTRAPPYWORKSHOP.

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

More
03 Jul 2021 13:05 - 03 Jul 2021 13:08 #213556 by bevins
You have alot going on there. You cant do everything at once and expect to have good results.

Split it up into logical steps. example: Inputs and outputs.

Check your inputs. I would start by connecting back the estop and get that working. That is one of the basic things that you need to understand or you will just be going in circles. It is not normal that it doesn't work.

Connect your estop input back up. Then go into the menu Machine/Show Hal Configuration then go into Pins and drill down until you get to your input. click Watch then click on your estop input number. It will show up on the right as a yellow or red circle. Toggle your estop. The color should change. If that is working leave it connected because the probable error is in your hal. If it works then open your hal and comment out the following: like below:#net estop-out <= iocontrol.0.user-enable-out
#net estop-out => iocontrol.0.emc-enable-in

Put this:
loadrt estop_latch
addf estop-latch.0 servo-thread
net estop-loopout iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net estop-loopin iocontrol.0.user-enable-out => estop-latch.0.ok-in
net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset
net remote-estop estop-latch.0.fault-in <= hm2_7i92.0.7i76.0.0.input-00-not


That should get your estop working. Don't go any further until this is working.

Then start on your home and limit switches. Do the same in the SHow Hal Configuration but select signals instead of pins and you should see all your signals like max-x and all-home etc....

Just a suggestion.

By the way, you have errors in your ini file for your homing.You are missing some entries. Get the estop working and all switches then come back here and we will help get your homing and limits working.
Last edit: 03 Jul 2021 13:08 by bevins.

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

More
03 Jul 2021 13:09 #213557 by bevins
WTF? What is wrong with the code and spoiler tags. It is hosed.

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

More
03 Jul 2021 13:28 #213559 by BigJohnT
New update... seems they didn't do their homework before releasing it.

JT

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

More
04 Jul 2021 19:53 #213712 by BOOTSTRAPPYWORKSHOP
Those files are auto-generated. How are there sections that just missing?

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

Time to create page: 0.117 seconds
Powered by Kunena Forum