Hello Guest it is April 19, 2024, 09:12:32 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.


Messages - Ya-Nvr-No

421
Mach4 General Discussion / Re: MACH4 - Modbus
« on: May 09, 2014, 09:41:50 AM »
I did get the Modbus simulator to communicate and show life.



422
General Mach Discussion / Re: Disable spindle button
« on: May 09, 2014, 07:13:58 AM »
You could edit the Gcode file and remove the spindle start commands (M3)
or put a M5 after ever occurrence of M3
or use block delete "/" feature
Push the screen button to turn it on looking for
/ m3   (it just skips this line of code)
again you just have to edit your gcode file
But the Best way is edit the post processor text file in VCarve and just remove the M3 spindle start routine. (or just Edit it to M5 instead)
or Last resort you could unplug the spindle motor

Forgot one: you could edit the spindle setup option configuration

423
Mach4 General Discussion / Re: Disable button unless Idle
« on: May 08, 2014, 08:51:10 PM »
I'll clarify...
 (mc.mcCntlIsInCycle(inst) == 1)   a file is running, ==0 would be not running   right ?

if so, what is the call for the following ?
 (mc.mc__________(inst) == 1)   control is enabled, ==0 control is disabled
or is there one?
Russ

(mc.mcCntlIsInCycle(inst) == 1)   a file is running, ==0 would be not running   right ?      -- Correct


Try this;
To use a button to toggle Enable and Disable

--put this in the Screen Load Script
a = 0 -- set a variable

--Place under a button
local inst = mc.mcGetInstance();
if (a == 0) then   --look for the value of a
    a = 1;             --set the value of a
    mc.mcCntlEnable(inst, 1);  -- Enable
elseif (a == 1) then
    a = 0;
    mc.mcCntlEnable(inst, 0);  --Disable
end

Nothings really broke, just needs to be understood, and new code written to do what you want.
Don't expect this to be something your going to learn overnight, Long learning curve
I think I saw the light bulb from here when you seen how to use the Enable property.
I struggle everyday with one thing or another. But I Ain't dead yet.
don't give up

Learn to use the History / Error display to view code when your debugging an issue
This is over kill but it gives you an idea of how to look before and after something you expect to happen or do
the history button shows you the output and you can see what works and whats not. Clear, Close and try it again

local inst = mc.mcGetInstance();
    mc.mcCntlSetLastError(inst, 'mc.mcCntlEnable 1? = ' .. tostring(mc.mcCntlEnable));
    mc.mcCntlSetLastError(inst, 'a1? = ' .. tostring(a));
if (mc.mcCntlEnable ~= 0 and a == 0) then
    mc.mcCntlSetLastError(inst, 'mc.mcCntlEnable 2? = ' .. tostring(mc.mcCntlEnable));
    mc.mcCntlSetLastError(inst, 'a2? = ' .. tostring(a));
     a=1;
    mc.mcCntlEnable(inst, 0);
    mc.mcCntlSetLastError(inst, 'mc.mcCntlEnable 3? = ' .. tostring(mc.mcCntlEnable));
    mc.mcCntlSetLastError(inst, 'a3? = ' .. tostring(a));
elseif (mc.mcCntlEnable ~= 0 and a == 1) then
    mc.mcCntlSetLastError(inst, 'mc.mcCntlEnable 4? = ' .. tostring(mc.mcCntlEnable));
    mc.mcCntlSetLastError(inst, 'a4? = ' .. tostring(a));
     a=0;
    mc.mcCntlEnable(inst, 1);
    mc.mcCntlSetLastError(inst, 'mc.mcCntlEnable 5? = ' .. tostring(mc.mcCntlEnable));
    mc.mcCntlSetLastError(inst, 'a5? = ' .. tostring(a));
end

424
Mach4 General Discussion / Re: Disable button unless Idle
« on: May 08, 2014, 01:46:39 PM »
Notice in the included photo that what your addressing is a field in the button options your just changing the state of it.
the checked box = 0 when not checked, and 1 when checked.
you could use the Hidden option

So Good job Russ that's kind of what I'd had planned too about the buttons

425
Mach4 General Discussion / Re: Mach4 Printer Port Discussions
« on: May 08, 2014, 01:02:10 PM »
Great job as ever Art, thank you
Master programmer And Master video trainer, CNC Mach controls and Gearotic
Looks like a pretty simple implementation of Darwin PP driver
ought to make a lot of people feel a sigh of relief to see the PP still alive
"You are the Man"

426
Mach4 General Discussion / Re: Disable button unless Idle
« on: May 08, 2014, 10:42:12 AM »
I did put that above code in the (if statement below) and it worked fine for that button
you might start with that first to prove that one works
what is your button Name? make sure you typed it the same, it is case sensitive.
 
other than that, not quite following you on the custom button and assigned function reference.

There are lots of tidbits to glean from by looking at the PLC script and the Cycle start Button Script

The only other thing is to post the whole "Lua Script" and we can look at it.
You can to use the right mouse button to select all and copy or Ctrl-A Ctrl-C
paste and save as a text file.

if ((machState ~= machStateOld) or (machEnable ~= machWasEnabled)) then


427
Mach4 General Discussion / Re: Purchase timing?
« on: May 08, 2014, 10:20:08 AM »
Other than the guy creating all the Hobby licenses  :(

I thought that Hobby was all that was available at this time.

Does that mean we can get a Hobby license for each computer we have? We just provide a list of the PC ID's?    Gotta love that.  :)

Can/Will the Hobby version and the Pro version occupy two separate folders, and have their own individual license?

Or can a laptop/portable device have multiple controllers and be moved from one CNC machine to another just rename machine.ini file for each?

428
Mach4 General Discussion / Re: Purchase timing?
« on: May 08, 2014, 09:45:49 AM »
I think what he is letting you/us know is that unless you/we have a device that works with Mach4, buying it would be a premature purchase. Because if you buy the software (it gets locked to a computer) and if that computer is driving a controller not supported, you have a working copy that wont move your machine.

429
Thanks Russ, though not sure the rhoids can take much more  :o
I got to get outside and enjoy the weather too.
Damn long winter.

430
Mach4 General Discussion / Re: Disable button unless Idle
« on: May 08, 2014, 09:06:52 AM »
might try something like this in the PLC script, just change the button name to what yours  is named

if (mc.mcCntlIsInCycle(inst) == 1) then
      scr.SetProperty('btnGotoZero', 'Enabled', '0');
else
      scr.SetProperty('btnGotoZero', 'Enabled', '1');
end