Hello Guest it is April 26, 2024, 07:37:56 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 - rhtuttle

41
Mach4 General Discussion / Re: Clearpath Servo Feedback Displays
« on: November 29, 2021, 11:26:10 AM »
There is an 'angular meter' widget that will probably do what you want. In the 'Docs' folder there is a file:
Mach4 Screen Editor V1.0.pdf
This is a must read for anyone wishing to customize their screen set.  Unfortunately it has not been updated with all of the latest changes.

HTH

RT

42
Mach4 General Discussion / Re: Sreen editor wont keep dro font
« on: November 23, 2021, 10:57:01 AM »
What works for me is to reduce the height of the DRO itself.  It appears they have written the widget so that it always fills the height regardless of the commanded font size.

TIA

RT

43
Mach4 General Discussion / Re: Socket support
« on: November 09, 2021, 05:09:31 PM »
It has been in the build for at least 2 years.  Automatically installed.  I remember that they have changed which lua version they are using sometime this year or last so you have to be careful not to mix old and new.   I would open a ticket with NFS.

44
Mach4 General Discussion / Re: Socket support
« on: November 09, 2021, 11:25:09 AM »
socket support is included with mach4:
C:\Mach4Hobby\Modules\socket.lua
C:\Mach4Hobby\Modules\socket\

so an advanced search of search the mach4 general discussion for socket.  There are several posts, specifically this one:
https://www.machsupport.com/forum/index.php?topic=32001.msg222766#msg222766

45
Mach4 General Discussion / Re: M3 macro does not start spindle
« on: October 24, 2021, 01:07:09 PM »
Well...S would be the 19th letter in the alphabet,  SV_S is an enumerator.
The example shows that you need to test for parameters (hParam~= nil) then
get the local param:  local pVal = mc.mcCntlGetLocalVar(inst, hParam, mc.SV_P)
test to see if value was passed:   local pFlag = mc.mcCntlGetLocalVarFlag(inst, hParam, mc.SV_P)
if so then convert to number and use it.
Study the examples

46
Mach4 General Discussion / Re: M3 macro does not start spindle
« on: October 24, 2021, 10:49:38 AM »
take a look at the examples in C:\Mach4Hobby\LuaExamples\UseVarsFromMcodeLine folder.

Assuming your gcode is 'm3 s5000'
You would read the 's' parameter mc.SV_S

THT
RT

47
Mach4 General Discussion / Re: M3 macro does not start spindle
« on: October 23, 2021, 01:22:29 PM »
Thought I posted this yesterday,

Haven't tested this but add these from the m4 API manual to your m3 macro:

rc = mc.mcSpindleSetCommandRPM(number mInst, number RPM)

rc = mc.mcSpindleSetDirection(number mInst, number dir)
or
rc = mc.mcSpindleSetDirectionWait(number mInst, number dir)

to find out what the true spindle speed is (assuming you have feedback setup):
RPM, rc = mc.mcSpindleGetTrueRPM(number mInst)

Also, from the screen load script you could add the applicable lines to your macro:

---------------------------------------------------------------
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
---------------------------------------------------------------

this is called from the 'Spindle CW' button

HTH

RT

48
Mach4 General Discussion / Re: G4 P10 not work always
« on: October 07, 2021, 12:45:38 PM »
Decimal points

From the manual:

G04 – Dwell
A dwell is simply a pause in the program. The duration of the dwell is specified by P or X in milliseconds with no decimal point. If a decimal point is used, then P or X specifies seconds. The dwell may also be specified with U without a decimal point for milliseconds. No machine movement will take place during a dwell. No auxiliary codes will be turned off, i.e. if the spindle is on it will stay on, coolant will stay on, etc.
The dwell must be the only G code in the block.
Format 1: G04 P__ Format 2: G04 X__ Format 3: G04 U__
Example: Program a 5 second dwell after positioning to X1.0, Z1.0 (using no decimal point to specify milliseconds).

G0 G54 G18 G40 G80 Safe start line
T0101
Tool change S2500 M3 Start spindle
G0 X1.0 Z1.0
Rapid to XZ position G4 P5000 Dwell for 5 seconds
M30
Program end and rewind
Example: Program a 5 second dwell after positioning to X1.0, Z1.0 (using decimal point to specify seconds). G0 G54 G18 G40 G80 Safe start line
T0101
Tool change S2500 M3 Start spindle
G0 X1.0 Z1.0
Rapid to XZ position G4 P5. Dwell for 5 seconds
M30
Program end and rewind

49
Mach4 General Discussion / Re: Start Mach4 in Screen Editor
« on: August 13, 2021, 11:05:47 AM »
After creating a new shortcut(named whatever you want,(eg.'Open M4 in editor') right click and select properties.  It is in the 'Target' property that you put the aforementioned string.

50
Mach4 General Discussion / Re: Start Mach4 in Screen Editor
« on: August 13, 2021, 10:59:02 AM »
create a shortcut