Hello Guest it is April 18, 2024, 04:46:26 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mark4

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 »
81
Mach4 General Discussion / Re: z axis and soft limits
« on: August 13, 2017, 12:13:25 AM »
hi thanks for the reply. i am close to the machine limit on z but i want to get as much travel as i can and its a servo machine so i expect it to have less trouble being closer to the limit i could be all wet.

i have also had times when the axis think they are referenced and they are not but as yet have not been able to conclusively prove as to weather its a mach/controller/computer problem or me.

also as i understand and have seen soft limits affect running code also if you tell mach to cycle start and you have a soft limit violation the program wont run and you get a notification on the status bar

mark

82
hi what controller are you running. mach has had the capability of having the same home and limit switches for ever as it only homes one axis at a time. so how do you have the limits/home configured. the easiest way to tell is to go into the diagnostics screen watch inputs and home trip a switch and see what leds light up

83
hi you can see the switches in the hicon that means electrically they are working and a plus. now you need to get mach to see them. if they are not lighting up on the diag screen in mach where are they mapped to in mach (you also need to map inputs/outputs in mach) i dont know if the controller you are using transfers settings to mach. also the diagnostics screen gives you leds but not for all inputs and outputs you can add leds to the screens to see what a particular output is doing i use them to show what my jogging switches are actually doing and am going to add on my new screen build two for the mpg a and b because i dont know what mach sees. good luck
mark

84
hi there are a few ways to do this. the best and most accurate is the way in the manual complete calculation ie ball screw pulleys motor ect then check with a Gage block or dial indicator. you could just plug in a different number up or down until 1" on dro = 1" traveled this isnt the most accurate but depending upon what machine you are running i am sure it has been done that way before.
mark

85
hi i believe you could write a mcode to do what you want in so much as i understand it from your description. why do you want to make the switch the limit you could have the switch as just the switch when activated do this. that is the approach i would take. also there are other scripts that can do routines in mach but i am not that programmer. good luck
mark

86
Mach4 General Discussion / z axis and soft limits
« on: July 25, 2017, 09:46:02 PM »
hi all just upgrading as usual. i have been upgrading bridgeport mills for awhile servo and steppers just coming out with a stepper upgraded to ac servo its running sweet. the problem i have and this applies to all mills i have done mach 3 and 4 is what to set for z axis i have set -.125 for home offset soft min -5.00 soft max -.125 this works but i dont know if it works right. i have set max to zero and home to zero and other things experimenting but have never found the right answer that i am sure of. so i thought i would ask anybody who has set z soft limits on a mill what they came up with or can you tell me what is wrong with my approach thank you
mark

87
hi first let me say i could be all wet this is out of my comfort zone but you are starting mid program or mid g code where is your m3 or m4 command if it is at the beginning and you are starting in the middle mach never gets the command. as a work around you can manually start the spindle the cycle start your program. hope this helps
m

88
Mach4 General Discussion / Re: index homing mach 4
« on: May 29, 2017, 09:42:33 PM »
hello well i have solved my problems and successfully homed all three axises to the index pulse my code is
-- Ref All Home() function.
---------------------------------------------------------------
function RefAllHome()
mc.mcAxisDerefAll(inst);  --Just to turn off all ref leds
--mc.mcAxisHomeAll(inst);
local out2 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT2)  -- OUTPUT FOR MULTIPLEXER
local out3 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT3)  -- OUTPUT FOR MULTIPLEXER
mc.mcSignalSetState(out2,1)--output off --set outputs for Z multiplex
mc.mcSignalSetState(out3,1)--output on --set outputs for Z multiplex
mc.mcAxisHome(inst,2);     --  assuming axis 2 is Z, commonly the case
coroutine.yield() --yield coroutine so we can do the following after motion stops
mc.mcSignalSetState(out2,0)--output on --set outputs for x multiplex
mc.mcSignalSetState(out3,0)--output off --set outputs for x multiplex
mc.mcAxisHome(inst,0);    --  assuming axis 0 is x, commonly the case
coroutine.yield() --yield coroutine so we can do the following after motion stops
mc.mcSignalSetState(out2,0)--output off -- set outputs for y multiplex
mc.mcSignalSetState(out3,1)--output off -- set outputs for y multiplex
mc.mcAxisHome(inst,1);    --   assuming axis 1 is y, commonly the case
coroutine.yield() --yield coroutine so we can do the following after motion stops
--mc.mcSignalSetState(out2,1)--output on -- set outputs for y multiplex
--mc.mcSignalSetState(out3,0)--output off -- set outputs for y multiplex
--mc.mcAxisHome(inst,3);    --   assuming axis 3 is a, commonly the case
--coroutine.yield() --yield coroutine so we can do the following after motion stops
----see ref all home button and plc script for coroutine.creat and coroutine.resume
wx.wxMessageBox('Referencing is complete')
wx.wxMessageBox('Dont forget turn on soft limits')
end
one thing i figured out you need to finish each axis with coroutine.yield or it homes the first axis and stops.
also when i was doing the initial setup i was doing one axis at a time and until i finished the z would bump when
finished homing another axis. once the x and y started moving after home all by themselves that turned out to be a
typo. with the script complete ref all button works perfect no bump. also the diagnostics screen with the individual axis
homing buttons take the orriginal home axis out and put the script into left down for each axis. that will do it
thanks for all your help
m  

89
Mach4 General Discussion / Re: index homing mach 4
« on: May 28, 2017, 09:49:52 PM »
i believe this will change the existing reff all button to do my bidding and i will change the single reference when this works also not listed is one more block for a axis i dont have a fourth axis but my upgraded mills are planned for them if possible.

90
Mach4 General Discussion / Re: index homing mach 4
« on: May 28, 2017, 09:25:48 PM »
hello thank you for your reply i put this together and pray it will work. i will be testing it tomorrow
---------------------------------------------------------------
-- Ref All Home() function.
---------------------------------------------------------------
function RefAllHome()
mc.mcAxisDerefAll(inst);  --Just to turn off all ref leds
--mc.mcAxisHomeAll(inst);
--set outputs for Z multiplex
local out2 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT2)  -- OUTPUT FOR MULTIPLEXER
local out3 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT3)  -- OUTPUT FOR MULTIPLEXER
local out2 = mc.mcSignalSetState(inst,0)--output off
local out3 = mc.mcSignalSetState(inst,0)--output off
mc.mcAxisHome(inst,2);     --  assuming axis 2 is Z, commonly the case
--set outputs for Y multiplex
local out2 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT2)  -- OUTPUT FOR MULTIPLEXER
local out3 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT3)  -- OUTPUT FOR MULTIPLEXER
local out2 = mc.mcSignalSetState(inst,0)--output off
local out3 = mc.mcSignalSetState(inst,1)--output on
mc.mc.AxisHome(inst,1);     -- assuming axis 1 is Y, commonly the case
-- set outputs for X multiplex
local out2 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT2)  -- OUTPUT FOR MULTIPLEXER
local out3 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT3)  -- OUTPUT FOR MULTIPLEXER
local out2 = mc.mcSignalSetState(inst,0)--output off
local out3 = mc.mcSignalSetState(inst,1)--output on
mc.mcAxisHome(inst,0);     --  assuming axis 0 is X, commonly the case
coroutine.yield() --yield coroutine so we can do the following after motion stops
----see ref all home button and plc script for coroutine.creat and coroutine.resume
wx.wxMessageBox('Referencing is complete')
wx.wxMessageBox('Dont forget turn on soft limits')
end

one of the biggest problems i have with lua is turning on outputs i find it confusing and it shouldnt be i have read different accounts of how to do this but i dont know get handle, set state. i could always in vb just say output on/output off and be done. if anybody can point me to the proper text. big sign this will work to turn on an output. i understand inputs all right and have been able to get them to do what i want but outputs confuse me. thank you for reading and if you have any advise on structure please let me know
m

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 »