Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: dresda on January 23, 2011, 01:46:47 AM

Title: Another dumb question
Post by: dresda on January 23, 2011, 01:46:47 AM
Ok, if i want to use external switches for cycle start, feed hold, feedrate override, what is the simplest way to do that? I can use up my limited supply of inputs, Do I use the brain thingy, then do I need a modbus doodad.
Go easy on me. Ray.
Title: Re: Another dumb question
Post by: Hood on January 23, 2011, 03:20:27 AM
The simplest way  is set up the switches port and pin numbers as OEM triggers then go to config menu then system Hotkeys and enter the OEM number of the function you want next to the trigger you used.

Brains can also be used, as can a macropump.

Hood
Title: Re: Another dumb question
Post by: dresda on January 23, 2011, 02:05:33 PM
Thanks Hood, but I'm still at a loss. Lets say just one momentary cycle start button, do I have to supply power to it (24v) and use an input? or where do I get my signal from to emulate the keyboard. I here about the poykeys board and stuff like that and I know I can use the xbox buttons with the usb connection but I just can't get my head around the PC, still thinking like Fanuc...
Ray.
Title: Re: Another dumb question
Post by: Hood on January 23, 2011, 02:46:21 PM
If you are using the parallel port and have a spare input then just connect the momentary switch as you would a limit switch or whatever, all depends on what your BOB needs.

Hood
Title: Re: Another dumb question
Post by: dresda on January 23, 2011, 05:14:47 PM
I am using dspmc. What about the poykeys board. What does that do?
ray.
Title: Re: Another dumb question
Post by: Hood on January 23, 2011, 05:21:19 PM
Ok do you have spare inputs on the DSPMC? If so just use them, what voltage you will need I have no idea as I dont know anything about it.

The PoKeys is a USB device that you can use for I/O to Mach, it is 5v, well actually 3.3 I think but just fitting momentary switch between one of its inputs and the Gnd will work. You would just do the same as mention above except the port number would be 10 and pin number whichever you use.
The PoKeys has 55 connections which can be configured as inputs or outputs or a mixture.

Hood
Title: Re: Another dumb question
Post by: dresda on January 23, 2011, 07:31:49 PM
Thanks Hood, With this first project I guess i can use some spare inputs.
I am using 24v from the dspmc to bob, also the hand held pendant should tale care of a few buttons.
Thanks.
Title: Re: Another dumb question
Post by: Hood on January 23, 2011, 07:44:42 PM
personally I  use a PLC for I/O as it allows 24v but PoKeys does work well as long as you take care with shielding for noise.
Hood
Title: Re: Another dumb question
Post by: dresda on January 23, 2011, 09:14:04 PM
With the 32 inputs I have to work with and after I use one limit switch for +&- overtravel for the 3 axis, then zero return switch on 3 axis and e/stop, then  few others, can I use the rest for my own use, and can I modify the screen set to rename the others to suit my needs.
Thanks.
Title: Re: Another dumb question
Post by: Hood on January 24, 2011, 03:06:56 AM
Not sure about the DSPMC as said before but it would be very unusual if you could not configure the inputs to what you wanted.
Screensets can be modified with the screen designer programmes available if needed, I use Screen4 but a lot have a preference for MachScreen.

Hood
Title: Re: Another dumb question
Post by: dresda on January 29, 2011, 06:54:37 PM
If I am running my spindle externally with the VFD using for/rev buttons but then want to control the spindle through Mach, where is the mach3 output for the m03/04.
Do I have to use a separate pot to control the spindle when using it externally or can i use the mach3 spindle override?
Does it operate like other CNC's where it uses the last MDI commanded speed when operating the spindle externally.
Ray.
Title: Re: Another dumb question
Post by: Hood on January 29, 2011, 07:05:11 PM
To actually control the speed from Mach you would need a board such as the DigiSpeed from Peter Homann or PMDX do one and also CNC4PC.

To just switch on/off/reverse you wouldnt need that, you would just use relays connected to the VFD's Fwd/Rev/Stop inputs.
Hood
Title: Re: Another dumb question
Post by: dresda on January 29, 2011, 07:39:08 PM
Sorry, I should have said I am using DSPMC with analog +- 10v.
I have found the the screen now showing the outputs to use for m03/4.
Still need to know if I can control the speed from mach if I turn on the spindle externally.
On Fanuc If you just press spindle start, It will will not run unless a command had been put in through MDI then he start push button will run the spindle from the last commanded speed.
Ray.

Title: Re: Another dumb question
Post by: Hood on January 29, 2011, 07:42:25 PM
If controlling the speed from Mach then M3/M4 would start it and it would start at the speed that is set in the Spindle Speed DRO. You could quite easily edit your M5 macro to set that DRO to zero if that is what you are wanting.
Hood
Title: Re: Another dumb question
Post by: dresda on January 29, 2011, 08:06:01 PM
Now I see I can put the value in the speed DRO. If I use output 5 for m03 and output 6 for m04, what about m05? is that internal and allready to go?
Another topic: whats with the feed hold. Why have feed hold and stop? the stop works like a feed hold should, the feed hold is a bit wishy washy, don't see the point of it.
Title: Re: Another dumb question
Post by: Hood on January 29, 2011, 08:25:31 PM
Yes M5 will deactivate whatever output (M3 or M4) is currently active so no need to do anything.

Stop should only ever be used when all axis are stationary as it will not decelerate your axis and you may well lose position. If an axis is in motion you should feehold then if you require Stop then you can press it. I think pressing Stop clears the buffers.

Hood
Title: Re: Another dumb question
Post by: dresda on January 29, 2011, 08:59:39 PM
On all the CNC's I have worked on, the feed hold is instant, I have never seen a feed hold where the axis just slows down and stops when you press it, you shouldn't loose postion if using Dc servo's with pulse coders right..
Is this that way because of the stepper motors loosing step or something even though mine does it and I'm using DC servo's.
I wonder if there is a parameter to change it.
I must admit, I do like this mach3. I went to Camsoft last year, but $5000...for the CD
Title: Re: Another dumb question
Post by: Hood on January 30, 2011, 11:52:58 AM
These other controllers are closed loop to the control and cost probably 100x more than Mach ;) Having said that Feedhold should stop quickly, if its not it may be due to the DSPMC being in the mix.

Hood
Title: Re: Another dumb question
Post by: dresda on January 30, 2011, 03:53:53 PM
DSPMC is closed loop, I will ask Rufi.
Thanks.
Title: Re: Another dumb question
Post by: Hood on January 30, 2011, 05:17:00 PM
Yes DSPMC is closed loop just like my servo drives close the loop to my AC motors but if the pulse is stopped immediately without the deceleration then the motors may end up out of position from where Mach thinks they are.
Hood
Title: Re: Another dumb question
Post by: dresda on January 30, 2011, 06:25:49 PM
I don't get it. I can rapid the slides at 200inch/min and they will stop dead, isn't that just like putting a feed hold on? Am I missing something?
Anyway, that's a minor problem, I've just spent all day trying to get an analog voltage out to my VFD with no look.
I don't have anything connected yet, just commanded 100rpm m03 spindle light flashes, I think I setup the DSPMC correct.
Ray.
Title: Re: Another dumb question
Post by: Hood on January 30, 2011, 06:39:14 PM
Afraid you will have to talk to Rufi regards the analogue voltage, I know nothing of the DSPMC's workings.
Hood
Title: Re: Another dumb question
Post by: HimyKabibble on January 30, 2011, 11:27:47 PM
Yes DSPMC is closed loop just like my servo drives close the loop to my AC motors but if the pulse is stopped immediately without the deceleration then the motors may end up out of position from where Mach thinks they are.
Hood

With servos, this should not be a problem, unless you're moving fast enough that when the step pulses stop the axis coasts far enough, due to inertia, to trigger a servo fault due to exceeding the maximum allowable following error.  Barring that, it should overshoot, then quickly return to the position Mach3 thinks it's in.  On my servo-driven knee mill, I can usually hit Stop without losing position, even when doing a rapid.  The same is NOT true of steppers, however.

Regards,
Ray L.
Title: Re: Another dumb question
Post by: dresda on January 30, 2011, 11:43:42 PM
Yes, I think I will try the stop function and check postion. I just spoke with rufi and he said the DSPMC is fixed at the moment and they will change it run it in mach3. I am running a knee mill with 30inch/lb SEM motors and at 20inch/min  you can see it winding down to a stop when hitting the feed hold, that's no good when trying to run a first off in close tight corners.
Ray.
Title: Re: Another dumb question
Post by: Hood on January 31, 2011, 03:50:59 AM
Yes, I think I will try the stop function and check postion. I just spoke with rufi and he said the DSPMC is fixed at the moment and they will change it run it in mach3. I am running a knee mill with 30inch/lb SEM motors and at 20inch/min  you can see it winding down to a stop when hitting the feed hold, that's no good when trying to run a first off in close tight corners.
Ray.

That is where a FRO pot is very useful, you slow the axis down as it approaches any danger point on first runs and get ready to fully stop it by turning the pot to zero. The way Mach is at the moment it will never actually go to zero with the FRO, it will still crawl along. I have mine set up in such a way that if the pot  sets the FRO below 1% then a feedhold is automatically called and again if its wound up the Start button will be automatically pressed and it works very well. I am in hopes that in Rev4 Mach will actually do this internally but whether that will be the case I do not know, I have asked Brian for it now just have to see if he does it or can do it.

Regards the following error as Ray mentioned, well I suppose that depends on how tight you have the following error set up. I know on my lathe I have a following error set to 20 counts from 8000 counts per 5mm so that is only a distance of 0.0125mm (0.00049") Added to that my saddle on the lathe is in the region of 1/2 tonne then pressing the stop would I imagine make it travel a bit more than that distance.
 With Rays setup I think he uses Geckos and I believe they have a fixed following error of 128 counts, I assume Ray has 500 line encoders and  0.2 pitch screw, so even assuming he has as much as 4:1 reduction that is still a distance of 0.0032" (0.08128mm) and with a relatively light axis with relatively high friction such as in  is on a mill then it may well be fine to press Stop and not lose position due to following error.

That then throws up another point, I believe the buffers are cleared in Mach with a stop, is it then safe to just press cycle start again or would it be safest to do a RFH?
For me personally I will stick to my FRO pot. :)

Hood
Title: Re: Another dumb question
Post by: dresda on February 01, 2011, 10:49:47 PM
You are right Hood, The FRO should be used at all times and I don't have a problem with that. By the way, my motors are SEM.
My problem is that my next system that I put together will be for a customer and all there machines are Fanuc, Mits, and alike and some guys like to set the parameters up so when using the FRO it only controls the feedrate and not the rapid moves, now they can distinguish between rapids and feedrates in the program.
I did email Rufi at Vital systems re: DSPMC and this could be the problem, This is what he said: "ok.  the slow down time is fixed right now, which may be quite high for your mill.  but we plan to change that to use the actual decel setting in mach3 motor tuning screen." 
 
Ray.
Title: Re: Another dumb question
Post by: Hood on February 02, 2011, 02:31:52 AM
and alike and some guys like to set the parameters up so when using the FRO it only controls the feedrate and not the rapid moves, now they can distinguish between rapids and feedrates in the program.

 Then just unlink the SRO from the FRO ;)

I did email Rufi at Vital systems re: DSPMC and this could be the problem, This is what he said: "ok.  the slow down time is fixed right now, which may be quite high for your mill.  but we plan to change that to use the actual decel setting in mach3 motor tuning screen." 
 
Ray.

I presume you are talking about the feedhold here?
Hood
Title: Re: Another dumb question
Post by: dresda on February 02, 2011, 06:00:12 PM
This is not right, the acc & dec is way off. My motors are only 30in/lb SEM, small knee mill a when I input an MDI move at 40"/min and press the feedhold you can actually see the motor winding down to a stop, then press the cycle start and it starts to ramp up, it looks stupid, The motors respond good and in rapid at 120in/min they stop dead.
If my machine was a router running at 100in/min I bet it would about 3-4inchs, to stop.
I'm not talking high speed machining here. I have a Milltronics mill with a 386SX, and I have no problems with the feedhold.
Hood, what was on about re: debounce?
Ray.
Title: Re: Another dumb question
Post by: Hood on February 02, 2011, 06:10:36 PM
Feedhold is not instant in Mach as its an buffered  system so has to decel and recalculate but it does sound like yours is taking longer than normal which would seem is the DSPMC. How long in time does a Feedhold take to stop from your 40IPM?

Not sure what you are asking with this
Quote
Hood, what was on about re: debounce?
Hood
Title: Re: Another dumb question
Post by: dresda on February 02, 2011, 06:27:34 PM
I thought you had mentioned something about de-bounce? I think I'm loosing my mind right now and It's snowing like a bugger outside...
I am going to take a video of my motor coming to a stop so you can see it.
Ray.
Title: Re: Another dumb question
Post by: Hood on February 02, 2011, 06:30:36 PM
Ok will probably be tomorrow before I look as its 11.30pm here and I want an early night :)
I have often posted about Debounce Interval etc but I post quite a lot so dont remember specifics.
Hood
Title: Re: Another dumb question
Post by: dresda on February 02, 2011, 07:49:00 PM
The first part of the video am am moving in MDI at 40inch/min Y-. Then I am coming back at 40inch/min in jog, you can see the difference.
Ray.

http://www.youtube.com/watch?v=TiuxWUTzrmg
Title: Re: Another dumb question
Post by: Hood on February 03, 2011, 02:23:59 AM
I would say it is slower than you would expect with the parallel port so its likely due to the DSPMC and I think what Rufi said explains that, however it  will never be as instant as the jog is.
Hood
Title: Re: Another dumb question
Post by: dresda on February 03, 2011, 06:25:26 PM
This first unit is for my machine, then I would like to build some for my customers but the first thing they are going to say when the see that is, What the F@4C& is that doing. I have a Milltronics with a 386SX and motion board that stops in feed hold on a dime.
Hurco,Autocon, Cinci, Centurian, all PC based with motion boards, and they stop instantly in feed hold, we are only talking 40inch/min here. If I was going to loose postion, I would loose it in jog at 120inch/min right.
My experience with PC integration sucks, but I have been around CNC machine tools for over 30 years.
Hood you have experience with steppers, I don't. Correct me If I am wrong, the reason people go with servos is because you don't loose a position.
I have enjoyed this build and yaking with you guys, but this is a major setback. It is like I am  setting up 2 systems and they are not talking to each other, I hope it's just a parameter.
Ray
Title: Re: Another dumb question
Post by: Hood on February 03, 2011, 06:49:25 PM
I probably have more experience with servos than steppers. I would say the main reasons I went with servos is Constant Torque, Velocity, Acceleration and Closed Loop to motors.
I am not an expert on exactly how Mach does things but as Mach is a controller working under windows it is a buffered system. Jogging does not have a planned path, Mach just sends out pulses and when the key is released Mach slows the pulses at the acceleration in motor tuning. Mach obviously keeps track of the pulses it sends out so can update the position. With feedhold however the toolpath has already been planned and buffered so when you press feedhold you are interrupting the planned toolpath so I would think Mach has to interrupt whats in the buffer, recalculate and refill the buffer.
As said I am no expert but that is just my interpretation of what is happening.
I still think the DSPMC is slowing things down but as said before Feedhold will not be as fast as stopping a jog, so if the feedhold is too slow then likely you will have to either try EMC or go with Milltronics or similar.

Hood
Title: Re: Another dumb question
Post by: dresda on February 08, 2011, 11:34:13 PM
I tried the stop program function when I was running the program at 40in/min and It stopped great, but wouldn't start again, no errors.
Ray.

Quote from RAY.L

With servos, this should not be a problem, unless you're moving fast enough that when the step pulses stop the axis coasts far enough, due to inertia, to trigger a servo fault due to exceeding the maximum allowable following error.  Barring that, it should overshoot, then quickly return to the position Mach3 thinks it's in.  On my servo-driven knee mill, I can usually hit Stop without losing position, even when doing a rapid.  The same is NOT true of steppers, however.

Regards,
Ray L.