Hello Guest it is April 12, 2026, 08:03:54 AM

Recent Posts

Pages: « 1 2 3 4 5 6 7 8 9 10 »
81
Mach4 General Discussion / Re: Mach4 - C82 - PlasmaSensOut - Z axis
« Last post by grivalsky on March 12, 2026, 01:20:40 PM »
Hello
I tried to install Mach4 vs. 5920 and the ESS - 320.
I use the M4_CNC4PC_Plasma_V2 screen
I configured only motor 1 for the Y axis and motor 2 for the Z axis. Signals only step and dir for the motors and limit switch P+ and P- for the end position sensors. Here is the FIRST problem I have.
In manual mode in jogging mode the y axis moves. On the screen I see the change of coordinates and the axis physically moves. On the Z axis I see the change of coordinates on the screen but the z axis does not physically move. If I replace the ESS 320 plugin with the ESS 298 plugin it is the same, the y axis moves and the z axis does not work for me. As for the configuration, I still do not change anything. I upload the ESS 278.1 plugin there in this case the y axis moves as before and physically but at the same time the z axis works and moves physically. If I suddenly put another plugin there, the z axis stops. I don't understand this at all and when I have plugin 278.1 there, the z axis works for me but the THC doesn't work at all, so I wanted to test another plugin.
82
M31 Motion Controller / Re: VFD
« Last post by paul.stephens on March 12, 2026, 09:33:47 AM »
Speed values are more of a persistent value for Speed commands. If your S value is 0 and your spindle still spins a little, then the VFD further setup.

You can increase the value of P4-13 for the minimum voltage input for a speed command. This will make a bit of a deadband in the case of residual electrical noise. I would set my spindle speed to 0 and then check voltage at AI1 this value should theoretically be zero. If you have voltage there, set P4-13 to the number you see on your multimeter, this will create a deadband from zero to whatever number you insert causing your spindle to stop moving.
83
Probes and Tool Setters / Re: Rapidchange ATC
« Last post by edcross on March 12, 2026, 04:22:45 AM »
I now have a $1000 dollar anchor.

   Ed
84
M31 Motion Controller / Re: VFD
« Last post by edcross on March 12, 2026, 04:15:51 AM »
When i load Machpro and turn on VFD , my spindle turns very slowly ( 2.37 hz ) , can stop it with vfd stop button


    Ed
85
MachPro General Discussion / Re: PLC Scripts
« Last post by paul.stephens on March 11, 2026, 12:44:58 PM »
Currently, I do wish to add other logic gates like NAND, NOR, XOR, XNOR.

When it comes to an elseif statement, you're right. You would have to make multiple GMS processes Each one setting a register or #var and base the other processes to read said register or #var making your conditions work. It is a lot of extra clutter and steps. I'll try to think of a process that can cover these things and go to make a proposal.
86
MachPro General Discussion / Re: PLC Scripts
« Last post by cd_edwards on March 11, 2026, 11:03:21 AM »
There is also no method of sorting the items. What I'm looking for is a big if then elseif  end or switch solution. Some things take priority over others. ESTOP for example should be an absolute. Nothing else matters. it looks like this will go through ALL of the options and without sorting it, well it's not correct interpreting what the state of the machine is.
87
Here is a example Mcode I would reccomend starting with that has error checking. Make sure that your file name is also the name of your mcode.

Example with parameters:

File name: m100.mcs
Code: [Select]
function m100()-- It uses pcall to call the _m100 function in protected mode, which means that any errors that occur during the execution of _m100 will be caught, preventing the script from crashing.
local is_ok, msg = pcall(_m100)
if is_ok ~= true then
wx.wxMessageBox(tostring(msg))
end
end

function _m100()
--Your Code contents here
end

if (mc.mcInEditor() == 1) then
m100()
end

Here is a real example I have used in the past:

This code Swapped motors and ran and then ran a M3 code

Code: [Select]
function m23(hParam)-- It uses pcall to call the _m23 function in protected mode, which means that any errors that occur during the execution of _m23 will be caught, preventing the script from crashing.
local is_ok, msg = pcall(_m23, hParam)
if is_ok ~= true then
wx.wxMessageBox(tostring(msg))
end
end

function _m23(hParam)
local inst = mc.mcGetInstance()
local motor_5 = 5 --Setting your motor_5 to index 5 for readability
local axis_A = 3 --Setting your axis_A to index 3 for readability
local axis_OB1 = 6 --Setting your axis_OB1 to index 6 for readability
local getAxis = mc.mcMotorGetAxis(inst, motor_5)
local varS = 0 -- Setting S as your Spindle speed

if (getAxis == 3) then
mc.mcAxisUnmapMotor(inst, axis_A, motor_5) -- Changing these will not change the default settings.. this will just change for the duration of the session.
mc.mcAxisMapMotor(inst, axis_OB1, motor_5) -- Changing these will not change the default settings.. this will just change for the duration of the session.
mc.mcMotionSync(inst) --It's a good idea to sync when you change this information.
end

if (hParam ~= nil) then
varS = mc.mcCntlGetLocalVar(inst, hParam, mc.SV_S) -- This passes S into your varS value
end
gCode= ''
gCode= gCode..string.format("M3 S%0.f\n", varS)--This runs the gcode M3 S####
mc.mcCntlGcodeExecuteWait(inst, gCode)
end
if (mc.mcInEditor() == 1) then
m23()
end

I recommend looking at this documentation as this has the basic M Codes that are typically used.

https://support.machmotion.com/books/software/page/mach4-g-code-and-m-code-reference
88
MachPro General Discussion / Re: PLC Scripts
« Last post by cd_edwards on March 11, 2026, 10:41:34 AM »
maybe make it so it works as well. I've found a couple of errors which make it unusable. For instance it does not save the custom IO. When you restart the program, they disappear completely. Then there's the unhandled exception that pops up and causes Machpro to be unusable. I've already posted about this to Carl.
89
MachPro General Discussion / Re: PLC Scripts
« Last post by paul.stephens on March 11, 2026, 10:37:57 AM »
Technically the GMS flow is a standard of flow but it's not very intuitive for users who are not used to it. We are trying to determine what kind of flow we want in the future. Personally I'm for a drag and drop method, but we could technically also do ladder logic or refine the text based version we currently have It's more about deciding how we want the product to look and feel at the end of the day. We have been moving towards the AI route to do prototyping. For example, we are trying to do a web based interface and using AI to help test for what is possible and not possible to determine what and how we want to implement said technology.
90
Share Your GCode / The best Gcode I have come up with
« Last post by smav on March 10, 2026, 10:52:12 PM »
Well it has be quite a long time since I have stopped by here to see what is going on in the Mach3/4 and cnc world but came across an idea today that I tried out that I would be surprised if a bunch of others haven't already come across this little gcoding tidbit. But just in case no one else has I figured I would share it.
I was going to turn down a pin on my little cnc and was about to start writing a little gcode program for it when I thought, I wonder if ole AI Joe (the little AI guy that showed up on my cnc computer one day and I figured he was just another regular Joe app, hence the name) could write it up for me instead. Well I gave him some information about the machine, tooling, material and dimensions and he went right to work and spit out a program, lickity split. After proofing it I had to ask him to change some of the formatting that wouldn't be compatible with my machine and a little bit more guidance on want I was looking for in a tool path geometry he got me something that worked quite well and spit it out faster than I could have typed it out.
Anyway as I stated earlier I would guess that this is old news by now but just in case I have learned that you never assume everyone or anyone knows something just because it was obvious to you.
Pages: « 1 2 3 4 5 6 7 8 9 10 »