Hello Guest it is April 30, 2024, 08:16:58 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 - Brian Barker

241
Mach4 General Discussion / Re: add condition on Gcode
« on: January 05, 2021, 08:30:39 PM »
You can do it with an Mcode in hobby or use macro B in industrial .

242
Mach4 General Discussion / Re: Modbus Programming guidance needed
« on: January 05, 2021, 08:44:08 AM »
Mike, We are trying to make a system that will need no real settings. It is a really cleaver setup and I think you will like it better. This will make for a much shorter development cycle.

Chris,
I have sent you a message off list and we can make a time for me to poke around your machine. I hope we can get this rolling and others will be able to get something from this.

243
Mach4 General Discussion / Re: M6 Script Problem
« on: January 04, 2021, 05:10:21 PM »
Hello,
Is this with the ESS ? if so you need to change a setting in the config.. Don't know what it is off the top of my head :(

244
Go to help -> Support -> Package current Profile

When you want to load it use the profile loader and the import profile button.

Hope that helps
Brian

245
Mach4 General Discussion / Re: Modbus Programming guidance needed
« on: January 04, 2021, 10:16:24 AM »
I can't tell you that I will not miss some but I am going to try to hit this one message board on a regular basis. So if you have something you would like to see I will be around.  I forgot how much fun I had solving problems ;) .

246
Mach4 General Discussion / Re: Modbus Programming guidance needed
« on: January 04, 2021, 09:30:07 AM »
Here you are Chad... it is not code that will change the world or anything but it should give you what you need as a base to start from. The cool part is that it shows you how you can read data from the line of the Mcode! The only thing I could not do for you is set the max Hz or set the register that would set the value.

Please tell me if this works for you ..

Code: [Select]
function m8(hParam) --The param is a P value called from Gcode. M8P50 for example would be 50%, No value will be 100%.
local inst = mc.mcGetInstance()
local varP = 100.00 -- default is 100%
if (hParam ~= nil) then
local flagP, rc = mc.mcCntlGetLocalVarFlag(inst, hParam, mc.SV_P)
if (flagP == 1) then --Check that the flag has been set so we do not get an unexpected value for mc.SV_P
varP = mc.mcCntlGetLocalVar(inst, hParam, mc.SV_P)
end
end
mc.mcCntlSetLastError(inst, string.format("P val == %.0f",varP))
local handle = 0;
handle = mc.mcRegGetHandle(inst,"0Regs0/test")-- TODO  !!!!!!!!!!!!!!! Set Modbus register value here
if (handle ~= 0)then
local MaxVFDSpeed = 7000
local val =  MaxVFDSpeed*varP/100
val = string.format("%.0f",tonumber(val))-- Get Val as an int
mc.mcRegSetValue(regH ,tonumber(val))-- Set the speed of the pump
end
handle = 0;
handle = mc.mcSignalGetHandle(inst, mc.OSIG_COOLANTON)
if (handle ~= 0)then
mc.mcSignalSetState(handle, 1)
end
end

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

247
You can unplug the ess and run the other machine. We do it all the time here :) we have computers that have run multiple machines per day here :). The thing we don’t do is have the computer connected to both machines at the same time. That has not been tested but would be easy enough.

248
Mach4 General Discussion / Re: Modbus Programming guidance needed
« on: January 03, 2021, 08:02:09 PM »
Are you guys tapping the lines here? I have been taking with someone about a project for a simple serial communication. We are looking at a simple command set so you can easily send control panel commands. I won’t mention any names in the event we don’t follow through. This seems like it could be a bunch of fun for people.

Mike wound that work for you? You can do it now but you would need to use the serial plugin.

249
Mach4 General Discussion / Re: Modbus Programming guidance needed
« on: January 03, 2021, 12:47:42 PM »
I was going to use a click PLC to get my screen shots. I have one on the bench all setup. If you guys have some drives you would like examples of I could make an appendix in the manual to show people what the settings are for a few devices. I am thinking click PLC , automation direct drives and then a few of the Chinese ones that people seem to use. I know this sounds dumb but I did a VFD on a coolant pump before. It was really cool! I set it so you could do m8 p50 and get 50% flow :)

250
Mach4 General Discussion / Re: Mach4 Update?
« on: January 03, 2021, 12:42:53 PM »
That is a cool machine!