Hello Guest it is November 27, 2022, 07:41:17 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 - chainds

Pages: 1
1
Mach4 General Discussion / Trouble using scr Library
« on: March 15, 2021, 05:37:49 PM »
I am trying to use the scr library in an M macro and I am not having success.  There is a toggle button defined on the screen that is working all respects.  When I try to query the state of the button from the macro the returned value is Nil and the rc is -99.  I haven't been able to determine what that code means. The line of code is:

local OhmicButtonState, rc= scr.GetProperty("OhmicEnable", "Button State")

I have copy and pasted the name of the button, so I am sure that is correct  I have spent so much time investigating this and I am having no success. I feel like it is something simple I am missing.  Does anyone have advice or guidance?  Thank you in advance!

2
This M3 macro will not execute from G-code or MDI.  The M3 line in G-Code is just skipped.
-----------------------
function m3()   
local inst = mc.mcGetInstance()
local torchHeightInput, rc= scr.GetProperty("torchHeightInput", "Value")
mc.mcCntlSetLastError(inst, "rc code="..rc)
mc.mcCntlSetLastError(inst, "This is the new turning on torch!")
mc.mcCntlGcodeExecuteWait(inst,"m62p1")
end
----------------------

However, this one will:
----------------------
function m3()   
local inst = mc.mcGetInstance()
mc.mcCntlSetLastError(inst, "rc code="..rc)
mc.mcCntlSetLastError(inst, "This is the new turning on torch!")
mc.mcCntlGcodeExecuteWait(inst,"m62p1")
end
---------------------
This line is the difference: local torchHeightInput, rc= scr.GetProperty("torchHeightInput", "Value").
I have used this line many time in stand alone macros.  I am at a loss.

3
General Mach Discussion / Z axis control in G code and THC
« on: October 22, 2018, 02:53:29 PM »
I am using the Fusion 360 post processor and enabled Z control in the post options.  I am trying to get THC to work properly.  It seems that the Z axis doesn't want to go below the Z height set in the G code. Does anyone know if this behavior is what is expected or am I looking at a different problem?  The Z seems to hang around 0.6, but not exactly (within a few hundredths).  Thanks for any insight.

Example:
N10 G90
N15 G70

(2D Profile1 2)
N20 G0 X-0.0468 Y4.5332
N25 G0 Z0.67
N30 G0 Z0.07
N35 M3
N40 G4 P1.
N45 G1 Z0.06 F20.
N50 G1 X-0.0427 Y4.6031
N55 G1 X-0.0476 Y4.6033
N60 G1 X-0.0528 Y4.6035
N65 G1 X-0.0582 Y4.6037
...

Pages: 1