Hello Guest it is April 25, 2024, 10:30:44 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 - Pedio

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 »
51
Mach4 General Discussion / Re: Egg shaped holes
« on: June 05, 2016, 02:02:22 PM »
It sounds like your units are out of wack. Try making a box as large as possible and cut it out with a straight bit that you know the exact size. Cut on the inside of the line. Measure the sides of the box to see if it is correct. You can then calculate how far off your units are. Of course it is better to calculate what your units should be from gear teeth, steps, etc. instead of calculating from how far out the actual cut is. At least you will know which is axis is off and approximately what the steps per unit should be.

You can use (Steps programmed into M4)*(programmed move distance)/(actual move distance)=(Estimated steps to try in M4)

Repeat to confirm.

52
Mach4 General Discussion / Re: Egg shaped holes
« on: June 05, 2016, 12:52:02 PM »
The first thing to do is grab the head (spindle) of the machine while the machine is on and not moving. Move it back and forth and see if there is any play. If the spindle moves a little before you can feel resistance. Be careful and don't break anything (in case you have a very small mill) If there is you need to tighten up the motor placement, chains, etc. This is pretty easy to do on most machines. Then do a real measurement of backlash and see what you have left. This is where the fun begins!

53
Mach4 General Discussion / Re: Map Lua Code to ShuttlePro button
« on: May 29, 2016, 03:02:46 PM »
This is driving me crazy - the good news is it is a very short trip!

I found the correct (I think) command for setting the laser power. I tried this:

function M3()
     inst=mc.mcGetInstance()
     mc.mcCntlSetLastError(inst, 'Spindle Clockwise')
     mc.mcSpindleSetDirection (inst, 1)
     mc.mcSpindleSetCommandRPM(inst, 1 )
end
if (mc.mcInEditor()==1) then
   m3()
end

Did not work. Then I thought it may need the RPM before the command to turn on so I moved it - still does not work. Dang

I know I should be testing these before I use them, but not sure how? For example, I have this code on a button and it works well, but I don't seem to be able to get it to work elsewhere.

local inst = mc.mcGetInstance();
local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON);
local sigState = mc.mcSignalGetState(sigh);

if (sigState == 1) then
    mc.mcSpindleSetDirection(inst, 0);
else
    mc.mcSpindleSetDirection(inst, 1);
    local rpm = 1;    -- Set this to the actual RPM you want as your starting point
    mc.mcSpindleSetCommandRPM( inst, rpm );
end

I would like to achieve the same function with a ShuttlePro button. I don't mind reading about how to do this, but I don't know where. Also, I would rather not learn LUA to set a ShuttlePro button.

Alms for the confused???

54
Mach4 General Discussion / Re: Map Lua Code to ShuttlePro button
« on: May 29, 2016, 12:15:13 PM »
I hate being ignorant but that rarely stops me...

I got the script to work with the button on the ShuttlePro; however, it comes on with the last set spindle speed. I looked for LUA codes in the scripting manual but did not find them. Is it as easy as adding a line to my script that states:

mc.mcSpindleSetSpeed (1)

???? I would like to set the power level at 1 for the spindle speed.

55
Mach4 General Discussion / Re: Map Lua Code to ShuttlePro button
« on: May 27, 2016, 04:31:33 PM »
The program tells me that it can not find the m3.mcc file even when restart M4. I am removing the .mcc file and M4 seems to remake mcLUA but not the m3. Suggestions?

56
Mach4 General Discussion / Re: Map Lua Code to ShuttlePro button
« on: May 27, 2016, 02:07:51 PM »
It seems the m3 code does not compile every time. I even shut down M4 and restart it and it does not work. Do I need to reboot the computer?

57
Mach4 General Discussion / Re: Map Lua Code to ShuttlePro button
« on: May 27, 2016, 01:59:50 PM »
Is there a way to get M4 to recompile the macros?

58
Mach4 General Discussion / Re: Map Lua Code to ShuttlePro button
« on: May 27, 2016, 08:11:05 AM »
Daz,

I believe I have used the lower case for M3 in all instances. If I have done it wrong I am being remedial and can not see it.

I have tested the M3 macro with the MDI box as you show in the video and it works like it should. I suspect I am doing something wrong when assigning the Gcode1 name in the LUA screen load script. Any thoughts?

Thanks,
Peter

59
Mach4 General Discussion / Re: Map Lua Code to ShuttlePro button
« on: May 25, 2016, 04:52:10 PM »
Still not doing something right?  ???

I placed the attached macro in the macro directory under my machine's profile.

I then went to the .ini file and edited it to include the Gcode1=m3 (see attached)

It did not work. I notice the ShuttlePro plugin called it "User Gcode1" so I changed the "Gcode1" to "UserGcode1", "User Gcode 1", and "User Gcode1". None of them seemed to work.

Attached are screen shots.

Thoughts or suggestions?
Peter

60
Mach4 General Discussion / Re: Map Lua Code to ShuttlePro button
« on: May 24, 2016, 03:32:41 PM »
I found how to assign the User gcode to a button but don't know how to generate the file for the ShuttlePro to use or where to place the file. I looked at the scripting manual but did not get a lot of help. Is there any manual that talks about this?

I think I can use this code

function M3()
     inst=mc.mcGetInstance()
     mc.mcCntlSetLastError(inst, 'Spindle Clockwise')
     mc.mcSpindleSetDirection (inst, 1)
end
if (mc.mcInEditor()==1) then
   m3()
end

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