Hello Guest it is March 28, 2024, 10:31:01 AM

Author Topic: Comments about Mach4 in Demo  (Read 93495 times)

0 Members and 1 Guest are viewing this topic.

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #30 on: April 25, 2014, 04:27:09 PM »
How would you have it recognize your limit and or home switches? How do you set up a key to activate a command? Like the Hotkeys were in M3?
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)
Re: Comments about Mach4 in Demo
« Reply #31 on: April 25, 2014, 04:56:39 PM »
Wonderful Tom, We would would love to get you started and we have examples and so on we can get to you..

Contact us and Todd will get you the paperwork for getting the API and Steve and I will be here to help you .

Thanks
Brian
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #32 on: April 25, 2014, 07:30:25 PM »
When will we get a LPT plugin to use ??

(;-) TP
There might not be one.  Not decided yet.

Steve

RUT ROW , (;-) TP

Offline Dan13

*
  •  1,208 1,208
    • View Profile
    • DY Engineering
Re: Comments about Mach4 in Demo
« Reply #33 on: April 26, 2014, 07:30:43 AM »
Hi Brian,

Are you taking notes of the comments and reports, or are they getting consistently missed...? What's the purpose of this thread then anyway? Would be nice of you (or Steve) could confirm that a comment posted has been noted.

Dan
Re: Comments about Mach4 in Demo
« Reply #34 on: April 26, 2014, 10:12:37 AM »
figured out how to add a MDI group to the Diagnostic tab
I needed to edit the Cycle Start Button Script
added an elseif for the tab 3 (Diagnostic) and direct it to where to get the MDI data from.
Wish the copy and paste worked a little better as you have to use a text editor to hold the copy.
Once you close the scripter the copy is gone. You'll get used to it, I am sure.
I am starting to enjoy this, just wish I could drive some motors.  ;)

Code: [Select]
if (tonumber(tab) == 1) then
    local state = mc.mcCntlGetState(inst);
    if (state == mc.MC_STATE_MRUN_MACROH) then
        mc.mcCntlCycleStart(inst);
    else
        scr.ExecMdi('mdi1');
    end
    --Run MDI
    mc.mcCntlSetLastError(inst, "Do MDI")
    --wx.wxMessageBox("Do MDI")\
elseif (tonumber(tab) == 3) then
    local state = mc.mcCntlGetState(inst);
        scr.ExecMdi('mdi3');
    --Run MDI
    mc.mcCntlSetLastError(inst, "Do MDI")
    --wx.wxMessageBox("Do MDI")\
else
   --Do CycleStart
    mc.mcCntlSetLastError(inst, "Do Cycle Start")
    mc.mcCntlCycleStart(inst)
    --wx.wxMessageBox("Do Cycle Start")
end
Re: Comments about Mach4 in Demo
« Reply #35 on: April 26, 2014, 11:02:39 AM »
Also figured out how to get the m3 m4 to work right with MDI or in the gcode
had to edit the mcs scripts as shown below
notice the direction is -1 for reverse.
I added a new button and led for reverse on the Spindle group
all works well now, come on I'm ready to move something. ;D
just not sure if these need to be local or not.
might change it to forward and reverse as it is just a message that is displayed in history

Code: [Select]
function m3()
mc.mcCntlSetLastError(inst, 'Spindle Clockwise')

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

    mc.mcSpindleSetDirection(inst, 1);
end

Code: [Select]
function m4()
mc.mcCntlSetLastError(inst, 'Spindle Counter Cockwise')

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

    mc.mcSpindleSetDirection(inst, -1);
end
« Last Edit: April 26, 2014, 11:05:14 AM by Ya-Nvr-No »
Re: Comments about Mach4 in Demo
« Reply #36 on: April 26, 2014, 11:43:54 AM »
Bug report:
after leaving screen edit mode
the Enable button is blinking, should either be Disable or Axis Status should have been disabled on return. Little confusing.

question:
tried to turn off the Outputs Enable 0-3 led's but they get reset to default ON every time when Enable button pressed.
where do they get the status set to default ON from? Every output is not setup on the config page.
Tried setting the screen led default to OFF for each but no luck.
Re: Comments about Mach4 in Demo
« Reply #37 on: April 26, 2014, 12:15:28 PM »
BTW: For some reason the m3 m4 does not work again, though the code is still there. Only thing I think I did was save it as a new screen and shut it down and restarted mach4. Temper mental or what? worked fine for quite a few test, now other than the button for reverse and the led the mdi does not work again but just for the spindle.
 :o
Re: Comments about Mach4 in Demo
« Reply #38 on: April 26, 2014, 03:49:02 PM »
Found my BONE HEADED mistake   :D or at least it better be,  ;D

local inst = mc.mcGetInstance();
Has to be declared before you use it, that's why on restart it was no longer declared.

Code: [Select]
function m3()
local inst = mc.mcGetInstance();
local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON);
local sigState = mc.mcSignalGetState(sigh);
mc.mcCntlSetLastError(inst, 'Spindle Forward')
    mc.mcSpindleSetDirection(inst, 1);
end

Code: [Select]
function m4()
local inst = mc.mcGetInstance();
local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON);
local sigState = mc.mcSignalGetState(sigh);
mc.mcCntlSetLastError(inst, 'Spindle Reverse')
    mc.mcSpindleSetDirection(inst, -1);
end
« Last Edit: April 26, 2014, 03:51:09 PM by Ya-Nvr-No »

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #39 on: April 27, 2014, 01:50:50 PM »
Hi Brian,

Are you taking notes of the comments and reports, or are they getting consistently missed...? What's the purpose of this thread then anyway? Would be nice of you (or Steve) could confirm that a comment posted has been noted.

Dan

Sometimes I don't get the reply notifications from the forum.  I'm reading this thread today for the first time since I last posted to it, so I really haven't had time to ACK every post.  Just put the items/comments in here and we will see them.

As to your points about the Soft Limits click issue and the DRO entry, consider them duly noted.

Steve