Hello Guest it is May 26, 2019, 01:38:52 AM

Author Topic: Limit switches OEM trig  (Read 6764 times)

0 Members and 1 Guest are viewing this topic.

Limit switches OEM trig
« on: January 16, 2011, 06:41:14 PM »
Seems impossibly easy but I have tried to set up x and y limit switches and they don't function properly.  I've assigned them port one, pins 11,12,13,15 enabled them and set them active low. I went to System hotkeys setup and assigned OEM triggers #1,2,3,4 the stop code 1003.  Here's my XML:

<OEM1>1003</OEM1>
  <OEM2>1003</OEM2>
  <OEM3>-1</OEM3>
  <OEM4>1003</OEM4>
  <OEM5>1003</OEM5>
  <OEM6>-1</OEM6>

when I check the pin state in the diagnostics screen (mach3 CNC Demo) I can see the switches changing state when activated..

However instead of stopping the motors they continue to run.  If I select the stop button on the screen they stop.

What am I doing wrong????

Thanks

Offline Hood

*
  •  25,820 25,820
  • Carnoustie, Scotland
    • View Profile
Re: Limit switches OEM trig
« Reply #1 on: January 16, 2011, 06:45:25 PM »
No need to set them as system HotKeys, just setting the port and pin number in Ports and Pins, inputs to the X++ X-- XHome etc is all you need to do.
Hood

Offline Hood

*
  •  25,820 25,820
  • Carnoustie, Scotland
    • View Profile
Re: Limit switches OEM trig
« Reply #2 on: January 16, 2011, 06:48:34 PM »
Heres a screenshot of where to setthem.
Hood

Offline BR549

*
  •  6,865 6,865
    • View Profile
Re: Limit switches OEM trig
« Reply #3 on: January 16, 2011, 06:49:57 PM »
IF you want them to act as limit switchs then you have to set them up as limit switches. In Config, portsand pins, inputs, assign the port and pin to the correct axis limit function.

Hope that helps, (;-) TP

Offline Hood

*
  •  25,820 25,820
  • Carnoustie, Scotland
    • View Profile
Re: Limit switches OEM trig
« Reply #4 on: January 16, 2011, 06:50:38 PM »
Thats showing all axis limits and homes but obviously if you just have X and Y then you set them to the appropriae ports and pins and have the others disabled.

One thing worth mentioning, if you are using normally closed switches (safest way) then you can wire them all in series and that way all axis and home switches will only require one input to get used up.
Hood
Re: Limit switches OEM trig
« Reply #5 on: January 16, 2011, 07:09:57 PM »
Thanks Hood.  I have the switches configured as you show them with the exception that I'm using discrete inputs for each switch.  I am assuming that your arrangement is used to conserve inputs, but even though I'm using individual inputs the result should be the same.  The only difference is I've set active low.  Since I can see the switch changing state in the diagnostic screen I'm also assuming that Mach3 can see and should act on the switch.

I'm using Smoothstepper and CNCP4's c25 breakout board. 

I'm pretty much at wits end because it seems like a simple circuit and the diag screen shows the switch changing state.... 

Offline Hood

*
  •  25,820 25,820
  • Carnoustie, Scotland
    • View Profile
Re: Limit switches OEM trig
« Reply #6 on: January 17, 2011, 02:30:47 AM »
What are you meaning by "with the exception that I'm using discrete inputs for each switch"
Are your switches normally open or normally closed?
Hood
Re: Limit switches OEM trig
« Reply #7 on: January 17, 2011, 05:32:47 AM »
By discrete I meant my switch arrangement is individually wired switches to inputs while you are suggesting a serial arrangement where three  switches are wired in series example: X--, X++, X home wired in series terminated at port 1 input 11. In my setup I have each axis with it's own switch wired to individual inputs. So I'm using 4 switches and 4 inputs, I'm not using home.  What I was suggesting (asking) is that in your arrangement when one switch is active all three inputs on port 1 change state while in my arrangement only one of the three change state does this matter?  I assume that any of the three X axis inputs changing state (when the switch is active) should stop the X axis motor.

I have wired the switches 5vdc common NC (didn't work), I've also wired them 5vdc common NO (didn't work).  I've changed the common to ground and used the same two wiring schemes..no change and I've also tried to change the setting to "Active Low" in the Port/Pin screen no change.

I'm using a C25 breakout board and SmoothStepper.  I believe the C25 sets all unconnected inputs to ground through a pull down resistor so all the inputs at Mach 3 would see low voltage.

Does Mach3 look at each assigned input and expect to see a high voltage and act on switch input changing the input from high to low?

Offline Hood

*
  •  25,820 25,820
  • Carnoustie, Scotland
    • View Profile
Re: Limit switches OEM trig
« Reply #8 on: January 17, 2011, 05:46:41 AM »
Ok
Mach doesnt care, if it sees a limit it E-Stops so if you have separate switches the only benefit is you can look on diags page and see which switch has tripped, in reality its just as easy if not easier looking at the machines position to determine that.
The only disadvantage of using all separate inputs is you quickly use inputs up , if using the parallel port this could be a problem as you only have a limited amount of inputs and that is why most have all switches wired NC and in series, as they only use up one input.

Not sure how your bob works but you will see if the switches are working on the diagnostics page, when the switch is pressed the LED should light and when released the LED will go off. If the LEDs for them are lit  when they are not activated and off when they are, you will need to change the active low setting in ports and pins.

Hood
Re: Limit switches OEM trig
« Reply #9 on: January 17, 2011, 10:58:16 AM »
Court,

Please note the C25 only provides additional filtering to regular inputs of the Smooth Stepper (pins 2-9 on LPT2 are different), so the inputs should work as described in the Smooth Stepper manual: http://warp9td.com/documentation/SmoothStepperUserManualV1.0.pdf , page 25.  The input pins are pulled up, so you should run a GND through the NC connection of the switches, so it will be a ground signal what should trigger the signal.

Pins 2-9 LPT2 on the C25 work differently. This they are not buffered on the C25, we added buffering and Schmitt triggers like it is done in our breakout boards.

My recommendation is that you input those pins on LPT2 pins 2-9 and activate them with a high running through the NC position of the switch.  It is always better to use a high on limits and e-stop as if a cables gets pinched somewhere in the machine and it ends up making contact with ground, will trigger the fault immediately.

I will look for the post that you mention in mach support forum and place a copy if this there.

Arturo Duncan
http://cnc4pc.com