Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: jaja on June 22, 2009, 05:19:57 PM
-
Dear reader,
I want to put an optical device and some reflecting tape on the spindle axis, to generate a pulse for mach to control the spindle speed.
A friend told me there could be some sort of "bouncing", a very fast on and off switching, when the border of the tape passes the optical device.
Is there a way mach could deal with this situation, or do I have to filter out this noise, before sending it to mach?
I thought it could be controlled with the "inputs signal debouncing/noise rejection" on the general logic configuration screen.
Luckely this friend is very good in electronics, and capable of building some sort of filter to give a nice straight signal to mach,,,,, but is this necessary????
gr jaja
-
There is a seperate debounce setting for the index pulse, also you can have averaging set. Not sure if thats what you are after?
Hood
-
jaja,
No electronics guy so my explanation will get stupid real quick. ;D
Ask your electronics friend to explain hysteresis. My take is that you can get a ramping and overshoot on the square wave so that the triggering may sometimes vary from the low / high / low of a square wave and thus you don't end up with consistant timing or nice clean pulse at two distinct voltages over a time period.
So they clean the signal up with additional electronics.
If that's what you were meaning. ;)
RICH
-
Hood,
This is exactly my problem: I'm not sure if that's what I'm after.
It is my question in other words.
I don't know if I need a special electronic device to make a nice straight signal,,, or is mach capable of dealing with a "noisy" one.
Rich gives a very accurate description of my problem, but the question still remains: do I need special electronics, or can mach handle it?
Hood and Rich, thanks for your reactions
gr jaja
-
Mach certainly has no problems with the slotted disc and opto I use on the mill, I know quite a few others use reflective type optos and they dont have problems so you should probably be fine.
Hood
-
Oke Hood,
Thanks, I'm going to try.
The closer one get to finish the work on the lathe, the more questions appear.
Here is another one:
The plus or minus from the jog cycle buttons are not working as a + or a -, the number goes from high to low, no matter if you hit the + or -,, strange.
gr jaja
-
A axis on a lathe? or is this on a different machine?
Which buttons are you meaning, is it on the flyot screen when you press tab?
If you attach your xml I will test it here and see if I can find an issue.
Hood
-
Hood,
Just the plus and minus button on the manual screen, under "jog cycle".
Hit the plus and the value gets lower instead of higher.
gr jaja
-
Ah ok sorry thought you were meaning A Axis jog when you said A+ and A-.
I dont use the standard lathe screenset but have just looked and both buttons are the same OEM code which is a cycle button to run through the increment, if you continue pressing either one it will go down to 0.0001 then back to 1.000 then 0.1000 etc etc. There is only a cycle button for this as far as I know so I have no idea why the screen has + and - buttons.
Hood
-
Hood,
Thanks again,
It is clear now.
It is not a fault om my computer.
Is it possible to get more then 10 steps (increments) in this jog cycle?
And what sort of screenset do you use with your lathe? I'm curious.
-
10 is the maximum as far as I am aware but you can change them to what you want, for example if you wanted 10 then 1 then 0.1 you could do that on general config page. Alternatively you could make up VB buttons for different amounts and they would enter the chosen increment direct into the DRO.
I just deleted things from my mill screenset and use that on the lathe, it needs a bit of work and I will do that at some point but for the moment its fine and I much prefer it to the standard lathe screenset.
Hood
-
Looks very professional to me Hood.
Your explanation about the VB script and the direct input in the DRO's shows that there are lots of possibility's in mach, and also that there is a long way to go for me.
Have been reading a lot, and I have seen a lot on you tube, but the process of building these extras on my own lathe is very time consuming.
But your help is great!
gr jaja
-
an alternative is just to type direct into the DRO and press the enter key.
If you wanted to make a VB button you would use Screen4 to add it to the screenset and then once back in Mach you would go to the operator menu then Edit Button Scripts. The VB Buttons would flash and if you click on the one you just made you can enter the VB. For example if you wanted a button to enter 10 into the DRO it would be
Call SetOemDRO (828,10)
-
jaja,
You can change the jog increment values in your configuration. See attachment.
RICH
-
Hood,
That is precisely the information I'm interested in.
As soon as there is time, I'm going to try out (still have to work for my living) :(
thanks
gr jaja
-
Rich,
Thanks for your answer.
All the help on this forum is great.
Changing the values is also explained in the manual of mach3 (which i read over and over again)
But I was wondering if there is a possibility to connect these values to a "trim-pot", and then pick a value by turning the trim-pot.
The answers from Hood already explained that it is not possible to go higher or lower,,, you just cycle through all the values. It is not possible to go one step higher, and then one step lower again. You have to go all the way up or down.
Or is there another way of doing so??
gr jaja
-
Put the values in a different order.
RICH
-
If you have analogue inputs then you could use a Pot to give variable increments, a better way however would probably be to have a rotary switch. You could then have a brain or macro pump to enter a number into the DRO depending on the position of the switch. You would however need inputs for each increment you wanted so if you wanted 10 different then you would need 10 inputs.
If you dont have that many spare inputs on your parallel ports you could get a PoKeys, it would give you both analogue inputs and also up to 55 digital I/O.
Hood
-
Hood,
The Pokeys is a good idea. Have read about it on the forum.
Instead of a rotary switch I have got a few optical encoders with 25 clicks per revolution. Perhaps they can be used for these applications.
Your keyboard on the picture is real nice. Is metal?
gr jaja
-
An encoder could probably be used , you would need a counter in a Brain I think but not done much with counters.
Yes keyboard is 316 stainless with a trackball as well.
Hood
-
Thanks Hood,
Never worked with brains, nor with VB.
There is a long way to go but,,,, I like it.
Could you advise a trackball?
-
Could you advise a trackball?
Trackball is instead of a mouse (I hate them on a machine) its basically a ball like old fashioned mice had and two buttons like a mouse has, see pic.
Hood