Hello Guest it is March 28, 2024, 05:28:48 PM

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

Pages: 1
1
Mach4 General Discussion / Probing Tab Inputs
« on: March 03, 2024, 02:03:10 PM »
I am befuddled with a simple problem using Mach4.  I am unable to change the values of any of the DROs in the Probing Tab. For instance, I cannot modify any of the values in the Probing Settings tab.  Offset Number, G code: G, Slow measure feedrate,...  Am I missing something operationally and I am not supposed to be able to change them?   

2
Mach4 General Discussion / Re: Trouble using scr Library
« on: March 19, 2021, 01:08:58 PM »
Thank you for your response. In my initial message I was trying to be a brief as possible, because nobody wants to read long drawn out messages. I am using registers to reflect the state of screen buttons. I have up/down scripts to toggle the the value in the register to reflect the state of the button.  Again, maybe I am missing something fundamental, but when the register value gets changed from within an M code script the state of the button tied to that register no longer in sync.  What is the best or proper method to ensure the state of the button reflects the value in the register? 

I did get the scr calls to work, but having seen your response that the IP stack is used for this communication, I understand why this would not be desirable.  Again thanks for the response. 

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

4
Thanks for the quick reply.  I appreciate it.  I do compile my scripts in the editor and delete the .mcc files to force a recompile in Mach4 before I retry executing.  There are no syntax errors.  As far as the debugger goes, I have used it and it is not indicating any issues.  In addition, there are no errors being thrown at run time.  By printing debug statements to the error log you can get narrow down to the line that is causing the issue at run time.  It is the line that contains  scr.GetProperty("torchHeightInput", "Value").  The debugger indicates that zero length string is getting returned, which would cause no problem in the macro as it isn't getting used anywhere anyway.  As I stated, I have used this exact line in button scripts and have had no issues. I am at a loss where to go from here. I guess I was hoping that someone would point out that you can't use a scr.GetProperty() in a customs M3 macro (or something to that effect).  If I copy the code to a button script and comment out the G-code call, everything works okay including getting the correct value from the "torchHeightInput" text box on the screen.  There seems to be something that is an idiosyncrasy to call a custom M3.     

As far as M62 goes, that is how Warp9 Tech wants you to turn a torch on and off (M64) if you want to use some of the nice features in their Smoothstepper hardware such as torch collision detection that has resume capabilities.  The reason I am writing an M3 macro to kick off the M62 is that the post processor from Fusion360 outputs M3/M5 and I am trying to avoid further post processing of the G-Code files.

5
I added an extremely simple line that still cause the M3 line in G-Code to be skipped
----------------------------------------------------------
function m3()   
local inst = mc.mcGetInstance()
local torchHeightInput=0.06
mc.mcCntlSetLastError(inst, "rc code="..rc)
mc.mcCntlSetLastError(inst, "This is the new turning on torch!!!")
mc.mcCntlGcodeExecuteWait(inst,"m62p1")
end
------------------------------------------------------------
if the line "local torchHeightInput=0.06" is removed, everything executes as expected.  What the...?

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

7
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