Hello Guest it is April 26, 2024, 07:37:31 AM

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.


Topics - TimGS

Pages: 1
1
Mach4 Plugins / Plugin for Mega 2590 Ramp 1.4 running GRBL
« on: November 05, 2020, 11:11:27 AM »
I am looking to develop a Mach 4 Plugin to support an Arduino Mega 2560 with a RAMPs 1.4 driver board for small low budget desktop cnc machines.

How do I get access to the SDK for Mach 4?  Do you require an NDA?

Any other advice would be greatly appreciated. 

Note this would not be a Smooth Stepper replacement.  This would be a low-budget hobbyist CNC primer board set ($25-$50) similar to what is available on the CNC 3018 as a single board only with Mach 4 Control Software vs the Open Source CNC Control Software. 

2
Mach4 General Discussion / Custom Signal Event Handler?
« on: June 04, 2015, 04:40:23 PM »
Just curious ...
Could the Input/output signals been setup with a Custom Signal Event Handler?
...It would dispense with the need for polling input signals.


3
Mach4 General Discussion / No Script Engine Found for ...
« on: June 03, 2015, 07:52:53 PM »
Just tried to edit a script from Mach4 and got an error "No Script Engine Found for "PATH/filename.mcs"

Can someone tell me what I am doing wrong?

4
Mach4 General Discussion / Lua Sizer Confusion tying Sizer to Panel
« on: June 01, 2015, 11:13:43 PM »
I am trying to understand Sizers so I can create my own screens and place things where I want them.  I tried to tie the Sizer to the Panel not the Frame; Can someone please explain what I did wrong???  Sounds like a problem Papa Bear could handle  ;D

Code: [Select]
--Basic Empty Wizard
local frame = nil
local panel = nil
local inst = mc.mcGetInstance(mInst);

--Function sed to create widget ids
function GetNextID()
    m_id = m_id+1;
    return m_id;
end


function main()

    -- create the wxFrame window
    if (mcLuaPanelParent == nil) then
        frame = wx.wxFrame( wx.NULL,              -- no parent for toplevel windows
                            wx.wxID_ANY,          -- wxWindow ID not require
                            "wxLua Basic Window", -- Frame Title
                            wx.wxDefaultPosition, -- let system place the frame
                            wx.wxDefaultSize,     -- default frame size
                            wx.wxDEFAULT_FRAME_STYLE ) -- Use default frame style
       
        -- create a single child window, wxWidgets will set the size to fill frame
        panel = wx.wxPanel(frame, wx.wxID_ANY)

        -- create a simple file menu
        fileMenu = wx.wxMenu()
        fileMenu:Append(wx.wxID_EXIT, "&Exit", "Quit the program")

        -- create a simple help menu
        helpMenu = wx.wxMenu()
        helpMenu:Append(wx.wxID_ABOUT, "&About", "What is the version of wxLua and wx.widgets")

        -- create a menu bar and append the file and help menus
        menuBar = wx.wxMenuBar()
        menuBar:Append(fileMenu, "&File")
        menuBar:Append(helpMenu, "&Help")

        -- attach the menu bar into the frame
        frame:SetMenuBar(menuBar)

        -- create a simple status bar
        frame:CreateStatusBar(1)
        frame:SetStatusText("Hello World")

        -- connect the selection event of the exit menu item to an
        -- event handler that closes the window
        frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED,
                      function (event) frame:Close(true) end )

        -- connect the selection event of the about menu item
        frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED,
            function (event)
                wx.wxMessageBox('Your are currently running '..
                                wxlua.wxLUA_VERSION_STRING..'\n built with '..wx.wxVERSION_STRING,
                                'About wxLua Basic Window',
                                wx.wxOK + wx.wxICON_INFORMATION,
                                frame)
            end )

        -- show the frame window
        frame:Show(true)
    else
        panel = mcLuaPanelParent
local window = panel:GetParent();
local wsize = window:GetSize();
panel:SetSize(wsize);
        panel:Connect( wx.wxEVT_CLOSE_WINDOW,
function (event)                 
event:Skip();
end
);
    end

-----------------------------------------------------------------------
    mainSizer = wx.wxBoxSizer(wx.wxVERTICAL);
    panel:SetBackgroundColour(wx.wxColour(0,255,128));
    local st1 = wx.wxStaticText( panel, wx.wxID_ANY, "Text 1");
    local st2 = wx.wxStaticText( panel, wx.wxID_ANY, "Text 2");
    local st3 = wx.wxStaticText( panel, wx.wxID_ANY, "Text 3");
    local st4 = wx.wxStaticText( panel, wx.wxID_ANY, "Text 4");
    local st5 = wx.wxStaticText( panel, wx.wxID_ANY, "Text 5");
    local st6 = wx.wxStaticText( panel, wx.wxID_ANY, "Text 6");
    Sizer = wx.wxFlexGridSizer( 2, 3, 0, 30 );--1 rows, 3 columns, no x/y spacing between
    Sizer:Add(st1, 1);
    Sizer:Add(st2, 1);
    Sizer:Add(st3, 1);
    Sizer:Add(st4, 1);
    Sizer:Add(st5, 1);
    Sizer:Add(st6, 1);
    -- Set up the frame to use that sizer to move/resize its children controls
    mainSizer:Add(Sizer, 0, wx.wxALIGN_LEFT+wx.wxRIGHT, 20);
    frame:SetSizer(mainSizer);  --This works????
 --   panel:SetSizer(mainSizer); --Does not work, everything is stacked.

-----------------------------------------------------------------------

end
main();


5
Has anyone seen this error....

"Invalid value 4 for a boolean key "MatchCase" in config file"      ??? ???

Created a couple of registers and deleted them and started to see this error every time I open the Mach 4 Screen, PLC and Signal scripts  :-\

Any ideas ???


Thank You

6
What is the best way to interface with the jogging features of Mach4?
What is the plan going forward?
The jogging tab on the Mach4 screen looks like it has all of the features just not the facilities to easily tie in external control.
Options:
Make a Lua Panel (Similar to the Joystick Project)
   Positives:
     User modifiable
     Can use images for switches and controls
   Negatives:
     The current jogging tab will be out of sync with the new display
Make a plugin
     Same as previous
How do I keep the current Jogging Display in Sync?

Just trying to implement this in a way that is usable by anyone...
...also trying understand the programing paradigm

7
Mach4 General Discussion / Input and Output Signal List Location
« on: May 05, 2015, 09:33:44 AM »
Brian,
Is the latest Input and Output Signal List located under "Mach Signals" in the "Mach4 Core API" (Found in the "../documents" folder)?

8
Mach4 General Discussion / Defining Signal Scripts in Mach4
« on: May 04, 2015, 12:25:52 AM »
I am trying to connect a switch to input #1 and have it control the Jog Mode (Incremental or Continuous).  When in "Step" mode the step LED on the screen will light and so will the physical LED on the switch to indicate that the Jog Mode is in Step.

Code: [Select]
--My Signal Code Starts Here
--Code added to the "Screen Load Script"
SigLib = {
    [mc.ISIG_INPUT1] = function(state)--Jog Mode
        local inst = mc.mcGetInstance();
        local hsig = mc.mcSignalGetHandle(inst, mc.OSIG_JOG_INC);--THIS IS WRONG

        if(state == 1)then
            --Jog Mode Increment On
            mc.mcSignalSetState(hsig,1);           
        else
           --Jog Mode Increment Off
            mc.mcSignalSetState(hsig,0);
        end
    end
}
--My Signal Code Ends Here

Anyone have any insight??

Pages: 1