Hello Guest it is April 29, 2024, 08:56:28 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 - mediumSasuage

Pages: 1 2 »
1
Mach4 General Discussion / Re: Load Gcode File not working in macro
« on: April 12, 2024, 04:36:45 AM »
Right, thanks cncmagic, very useful.

I will add that I am using Mach4 to control an additive manufacturing research platform. I am using in-situ sensing to dynamically adjust print parameters to create smart machinery. The problem here being our initial decision to use Mach4... the most stupid software ever built.

2
Mach4 General Discussion / Re: Load Gcode File not working in macro
« on: April 09, 2024, 03:07:55 AM »
I do not see how that can work, all the internal code pointers will be screwed up.

Hi Graham,
I'm not sure exactly what you mean by this but i will add that the newly loaded gcode file will begin at the current position in the old gcode.
Cheers,
Dan

3
Mach4 General Discussion / Load Gcode File not working in macro
« on: April 08, 2024, 09:11:05 AM »
Hi All,

I am trying to make a macro that allows me to dynamically edit GCODE. To do this, I am going to edit the GCODE in python and save the file to a directory, then reload it into Mach4 using a macro. I have written a test macro for the load GCODE part:

Quote
function m313()   --load gcode file
   
   local inst = mc.mcGetInstance() -- get mach4 instance
   mc.mcCntlCloseGCodeFile(inst)
   wx.wxMessageBox('Closed GCODE')
   
   local NextFileParen = "(C:\\Mach4Industrial\\Profiles\\CHAMP\\GCODE\\GCODEtoLoad.txt)"
   --wx.wxMessageBox(NextFileParen)
   
   local NextFile = string.gsub(NextFileParen, "[()%c%s]", "")
   wx.wxMessageBox('next file\n'..NextFile)
   
   wx.wxSleep(1) --gives Mach a second to do its thing
   
   mc.mcCntlLoadGcodeFile(inst, NextFile)
   
   wx.wxSleep(5) --gives Mach a second to do its thing
   
   mc.mcCntlCycleStart(inst)
         
end


if (mc.mcInEditor() == 1) then
   --dofile ("load_modules.mcs")
   m313()
end

When I run this macro within the ZeroBrane debugging tool, it appears to work fine. However, when I run it by calling the macro in gcode, it runs to end but does not actually load the GCODE. Anyone got any ideas why this may be/ any hints towards a solution?

Many thanks,
Dan

4
Mach4 General Discussion / Re: Pause Lua script mach4
« on: November 01, 2023, 07:12:51 AM »
i use this:
function waiit()
   local inst = mc.mcGetInstance()
   local GCode =""
            GCode = GCode ..string.format("G4 p500")
            mc.mcCntlGcodeExecuteWait (inst, GCode) ---wait 0.5 second
   
end

Hi Chaoticone,
Do you agree that this is a valid solution or is it still dangerous for the reasons mentioned above?
Many thanks, Dan

5
General Mach Discussion / Issue when using G92
« on: October 26, 2023, 06:35:47 AM »
Hey all,

I am running mach4 on a hybrid research platform. We use the A and B axes as extrusion axes. At the start of our GCODE we use G92 A0\nG92 B0 to reset the axis positions to 0 so that the extrusion starts properly. However, sometimes we experience an issue where instead of resetting to 0 it resets the position to some large negative number, causing the extruder to try and force through an excess of material, causing the print to fail.

Does anyone have any ideas why this may be occurring? Or a better/alternative method to reset the axis position to 0 would be appreciated.

Many thanks,
Dan

6
Mach4 General Discussion / Re: Set GCODE Line using Lua scripting
« on: August 23, 2023, 11:12:12 AM »
Hi Bill_O

Thanks for the tip but that did not work. Now it just breaks out of the macro rather than running past the line.

Cheers

7
Mach4 General Discussion / Set GCODE Line using Lua scripting
« on: August 23, 2023, 10:04:47 AM »
Hi All,

I am trying to use a macro to move to a specific line within the GCODE. To do so I am trying to use the command

mc.mcCntlSetGcodeLineNbr(inst, GcodeLineNew)

However, this does not seem to run and I can't figure out why. My wonder is whether it is actually supported in LUA because in the API it has a C/C++ example only whereas most other commands have an example for C/C++ and LUA.

Does anyone know anything about this or even know of a better way to skip through GCODE to a specific line.

Many thanks

8
General Mach Discussion / Closed loop steppers = problem?
« on: August 02, 2023, 06:11:00 AM »
Hello,

I am currently using closed loop oriental motors and drivers on my CNC machine. It has been having troubles with accuracy. Recently I checked the distance travelled vs the distance commanded and it was out by 3.15 mm over 240 mm. I used the wizard and recalibrated the counts/unit. Then, it was still out by 3.15 mm over 240 mm (also out by 1.575 mm over 120 mm so I know that it scales.)

Basically, I heard that using closed loop motors can cause similar problems and wondered if anyone has experienced something similar?

Also if I was to disable the encoders, will that cause further problems? EDIT: is it even possible to disable the encoders?

Many thanks,
Dan

9
Mach4 General Discussion / Re: Noise with OB axis
« on: March 24, 2023, 09:22:52 AM »
how do you comand the OB! motor?
Hi KatzYaakov,

We run a macro that pulls the rotational speed in Rev/s from a screen variable and sets the units, speed, and direction with mcJogSetUnitsMode, mcJogSetFeedRate, mcJogVelocityStart, respectively.

Cheers

10
Mach4 General Discussion / Noise with OB axis
« on: March 23, 2023, 07:15:34 AM »
Hi All,

We are running MACH4 on a custom machine. We have a ceramic extrusion axis with two motors, one for a plunger and one for an auger screw extruder. The plunger is a CNC axis (axis A) and the screw extruder is an out of band axis (OB1). We have been experiencing a fair amount noise/vibration, especially during circular movements.
After much experimentation I have realised that the vibration occurs when the OB1 axis is enabled but does not occur when the OB1 axis is disabled.
Does anyone have any experience with OB axes and have any idea why this might be occurring?

Alternatively, I suppose I could change the screw extruder from a stepper to a DC motor with ESC, since it is effectively running as a spindle and positional accuracy is not important, but I would rather not have to mess around with the hardware.

Thanks for any help  :)

Pages: 1 2 »