Hello Guest it is April 20, 2024, 05:21:29 AM

Author Topic: Possible to deactivate an input?  (Read 4520 times)

0 Members and 1 Guest are viewing this topic.

Possible to deactivate an input?
« on: August 26, 2016, 02:45:13 AM »
Is it possible to deactivate an input?

I have a switch that I would like to deactivate when the homing is finish.

Thanks for any help, Jeff
Re: Possible to deactivate an input?
« Reply #1 on: August 26, 2016, 10:28:08 PM »
Short answer, yes, sort of.

Longer answer, we need to understand how the switch (input) is being controlled, are you using a motion controller (as homing is done within the motion controller as part of the probe type function).

Basically you'd write either a macropump or a brain so that when homing is complete the input is ignored...... the flip side of this is what makes the input active, and what does it do when its active..... how does it do it?

If you are going to write a brain or macropump, this list of buttons, LED's and DRO's is invaluable.
https://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwigptKeweDOAhWkB8AKHaX3BZEQFggcMAA&url=https%3A%2F%2Fwww.machsupport.com%2Fforum%2Findex.php%3Faction%3Ddlattach%3Btopic%3D19482.0%3Battach%3D27839&usg=AFQjCNGJn1E7RpKyfyjY7STvwaxPFsA6ng&sig2=AM0Ali4FbBd-mAmCE4byDg&bvm=bv.131286987,d.ZGg&cad=rja

You are probably looking at using GetLED(807) to GetLED(812) [depending upon what or how many axis you have], as this should tell you which axis are referenced.

Then depending upon what you're doing with the input (how are you making it do something?), you'd either choose to write a brain or macropump.

for a macropump (essentially it's a macro that runs in a loop testing if something is true or false via a number of conditional statements and if something is true or false, it does something else [note.... the loop runs at 10x per second [10hz] in mach3... which is I presume what this question is all about as you've not stipulated if you're using M3 or M4!).

use these two documents:
http://www.machsupport.com/wp-content/uploads/2013/02/VBScript_Commands.pdf

http://www.machsupport.com/wp-content/uploads/2013/02/Mach3_V3.x_Macro_Prog_Ref.pdf

to use macropumps, you'll need to enable them on the config page, and you'll need to write one (use your favourite text editor, recommend notepad++), and save the file within "C:\Mach3\macros\******************x" (where "*********xx" matches your profilename) , and save the file as "Macropump.m1s"
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”
Re: Possible to deactivate an input?
« Reply #2 on: August 26, 2016, 11:08:03 PM »
Thanks a lot for the reply.

It's a limit switch on a feeder that's use for a CNC cold saw.

When I send the feeder back to +0.125, I have a G28.1 Z0.000 and then a G92 Z0.0.

After that, the pneumatic cylinder close to start feeding the material again.

Sometime, when the cylinder close, this activate the Z home switch (Feeder home) and I get an emergency stop.

I would like to deactivate the Z home switch just before the cylinder close and the feeder move from the Z limit switch, after the feeder has moved from thre switch, I would reactivate the Z limit switch.

Here's a video of my modified manual to CNC cold saw, hope this is enough info.

https://www.youtube.com/watch?v=daaHrAncRZM

Thanks again, Jeff
Re: Possible to deactivate an input?
« Reply #3 on: August 27, 2016, 12:13:25 AM »
The simple answer is because you are using shared home and limit switches on your z axis, the vibration or movement is triggering the limit switch.... easy option would be in install a separate limit switch for the z axis....

The other way to do it would be to have a relay via output break the input before the clamp closes... you would probably set something up like a custom clamp macro....
Within which you would check the z axis DRO, and if it was less than 0.5", deactivatesignal(output1), then apply clamp, activatesignal(output2), where op1 is your new relay, and output2 is your pneumatic clamp.

Which you choose all depends on if you have a spare input or output.

Software wise, you would need to write a macro which same as the above one, would check the z axis dro, and if closer than 1/2" say, would toggle override limits DoOemButton (150).... the problem with this is it would override all limits and is not specific by axis (if you've a limit switch on the other chop saw axis).... then when the clamp releases, toggle the override limits off, if getled(34) is active.

Hence you'd need two macros to activate your clamp and release the clamp (not sure how you are doing them now... m7/m9?)
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”
Re: Possible to deactivate an input?
« Reply #4 on: August 27, 2016, 01:07:44 AM »
Thanks, I wanted to try with the relay but wanted to know if there was other ways to do it,

Thanks again for your time, Jeff

BTW, I have one home switch for homing the saw and another for the saw over travel if it want to go too low when cutting so if they are deactivated, this would not be a problem.
Re: Possible to deactivate an input?
« Reply #5 on: August 27, 2016, 02:40:19 AM »
Jeff, there are three ways in my last post, two hardware, one software.

If you provide more info on what outputs do what I'll write the macro for you or have a go at it, plus what clearance you want etc.

Rob
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”
Re: Possible to deactivate an input?
« Reply #6 on: August 27, 2016, 02:50:44 AM »
Which is the z axis anyway... little confused about if it's the material feed or the chopsaw.

I would have thought that the chopsaw feed would have had to have been a little uncontrolled because you could be cutting many different profiles with many different feedrate for the chopsaw.... hence presumed the only "controlled" precision motion was the material feed...

Thought the chopsaw would have been pneumatic with limit switches and stop blocks.
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”
Re: Possible to deactivate an input?
« Reply #7 on: August 27, 2016, 03:06:03 AM »
The Z axis is the feeder and the A axis is the saw head.

The down and up feed of the saw head is controlled by an electric cylinder controlled by Mach3.

When the feeder go back to Zero(home) the feeder pneumatic cylinder is open and , feeder hit Z home switch, reset Z DRO to zero and then the feeder pneumatic cylinder close to continue feeding material.

That's when the feeder cylinder close that sometime the Z limit switch is triggered and got into Estop.

Jeff

did you take a look at the video when the material feeder goto zero and the cylinder close?

Thanks again, Jeff
Re: Possible to deactivate an input?
« Reply #8 on: August 27, 2016, 03:08:33 AM »
Here's another video that show a bit better the electric cylinder for the saw head.

Jeff

https://www.youtube.com/watch?v=21OxSDLH57o
Re: Possible to deactivate an input?
« Reply #9 on: August 27, 2016, 03:52:48 AM »
,
The Z axis is the feeder ...

When the feeder go back to Zero(home) the feeder pneumatic cylinder is open and , feeder hit Z home switch, reset Z DRO to zero and then the feeder pneumatic cylinder close to continue feeding material.

That's when the feeder cylinder close that sometime the Z limit switch is triggered and got into Estop...

Yup, that's how I thought it worked, but thought I'd check we were calling all the axis the same.

If I were you, I'd add a limit switch, so they are not shared, and then less likely to trigger when the clamp closes and the clamping force is making the home switch close


Another way....
G28.1 z00
G00 z0.1
G92 z00

That way your back off from the home switch should provide clearance...

Also note there are settings for g28.1 and g28 on the homing tab, they can set the g92 and back off directly from memory

Rob
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”