Hello Guest it is April 26, 2024, 12:18:27 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 - DazTheGas

491
Mach4 General Discussion / Re: tool path is not displaying
« on: May 25, 2016, 07:28:12 PM »
look at the history after loading, pic2 is showing bad character loaded that mach4 prob doesnt understand on line 19, perhaps this is stopping the toolpath from being created.

DazTheGas

492
Mach4 General Discussion / Re: Map Lua Code to ShuttlePro button
« on: May 25, 2016, 07:14:56 PM »
Bob was right with the naming so I put this together so you can see the effects of upper and lower case problems.

http://www.machsupport.com/forum/index.php/topic,32620.0.html

DazTheGas

493
Mach4 Videos / Mach4 Quicky #5 - Naming Macros (M Codes)
« on: May 25, 2016, 07:12:00 PM »
Just a quicky on naming macro files and there functions.

https://youtu.be/r9ytVMECgPo

DazTheGas

494
Mach4 General Discussion / Re: Testing scripts
« on: May 25, 2016, 04:24:09 PM »
Well this is what I have done using the out of box mach4mill profile.

1. Removed  local rc = 0; --return code.  on line 7, as your not using a return code anywhere within the function
2. Replaced local state, rc = mc.mcSignalGetState (mc.mcSignalGetHandle (0, mc.ISIG_INPUT5)) with local state = mc.mcSignalGetState (mc.mcSignalGetHandle (0, mc.ISIG_INPUT5)) on line 19
3. Removed duplicate local inst = mc.mcGetInstance() on line 21
4. copied to my profile/macros folder
5. from mdi - m1002

All worked as expected, so thought I would try in demo mode again all worked, finally I decided to try without any motion device selected and it didnt run.

Check that you have the sim plugin activated and selected as motion device then try the mdi again.

DazTheGas

495
Mach4 General Discussion / Re: Random Fixture Offsets
« on: May 25, 2016, 03:46:08 PM »
Oops - sorry about that.  I just looked at our plug-in code and didn't check to see if the function was available in Lua.

Easy done, ive spent 3 days trying to get toolpathcreate to work in wxlua to find theres no bindings  ::)

DazTheGas

496
Mach4 General Discussion / Re: Random Fixture Offsets
« on: May 25, 2016, 02:59:58 PM »
The mc.mcAxisSetMachinePos function has`nt worked for a very long time, I tried to use it for the ESS homeing offset bug, unfortunately the mcMotionSetPos function is a core function with no bindings to wxlua.

Another way of doing it would be to use mc.mcMotorSetHomePos(inst, 0, 0) - BEWARE this command works by MOTOR number not by AXIS number, it will do the work of both mcAxisSetMachinePos and mcAxisSetPos all at same time.

If you have a slaved motor on an axis then you must use the function on this too.

DazTheGas

497
Mach4 General Discussion / Re: Testing scripts
« on: May 25, 2016, 11:24:05 AM »
can you post the code instead of a picture....

a lot easier to debug.

DazTheGas

498
Mach4 General Discussion / Re: Map Lua Code to ShuttlePro button
« on: May 25, 2016, 11:15:08 AM »

Create an m3 macro in your profile`s/macro  directory to add your code from above.

load up your machine.ini in an editor and find the section ShuttlePro0, at the bottom of the section add  "Gcode1=m3" (without the quotes) and this should then runthe m3 macro for you.

DazTheGas

499
Mach4 General Discussion / Re: Map Lua Code to ShuttlePro button
« on: May 24, 2016, 09:28:55 AM »
You could do this by selecting User Gcode from the Shuttle config and then use a custom M code in that GCode.

DazTheGas

500
Mach4 General Discussion / Re: Map Lua Code to ShuttlePro button
« on: May 23, 2016, 05:03:18 PM »
Not sure I understand? but if you are referring to the 2 buttons on the right of the screen then you need to edit the functions for them in the screen load script as these turn the spindle on and off.


Code: [Select]
---------------------------------------------------------------
-- Spin CW function.
---------------------------------------------------------------
function SpinCW()
    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);
    end
end

---------------------------------------------------------------
-- Spin CCW function.
---------------------------------------------------------------
function SpinCCW()
    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);
    end
end

DazTheGas