Hello Guest it is April 23, 2024, 12:09:28 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 - smurph

241
Mach4 General Discussion / Re: X Box here we come!
« on: February 06, 2021, 03:36:56 AM »
I think he meant to say 4609.

Steve

242
Mach4 General Discussion / Re: Status Messages, History
« on: February 06, 2021, 03:22:38 AM »
I know about Lawrence Welk.  :)  "There are good days and there are bad days, and this is one of them."

You could also disable the home signal for the spindle after the spindle has been homed. 

Steve

243
Galil / Re: Anyone have older revision firmware for DMC40x0 controllers?
« on: February 05, 2021, 01:41:14 AM »
Galil has 1.2f firmware on their site.  I just used it. 

Steve

244
Mach4 General Discussion / Re: M4 crash on launch
« on: February 03, 2021, 06:58:17 PM »
I would look first to the video driver.  If I were a betting man, I would wager that you have an Intel GPU on the CPU or "integrated graphics" that are notorious for shipping with a crap OpenGL implementation.  Updating the driver usually solves the issue.

Steve

245
mc.SV_PROBE_POS_X to mc.SV_PROBE_POS_C for user coordinates

and

mc.SV_PROBE_MACH_POS_X  to mc.SV_PROBE_MACH_POS_C for machine coordinates.

If the probe does not strike, the end points of the G31 move is stored.  This gives you the ability to determine if the probe struck or not with a little bit of math. 

All positions are captured, no matter which axis was moving during the G31. 

Steve

246
Mach4 General Discussion / Re: Analog control
« on: February 03, 2021, 01:26:41 PM »
The Galil controllers offer analog control.  And we have a plugin for the DMC-41x3 and DMC-40x0 controllers.  The 41x3 controllers are not too bad expensive.  But it is going to be like $1500.00 for the controller.  And then you would still have old drives and motors. 

Personally, if it might cost me twice as much to put new digital servo drives and motors on there, I would consider doing it.  I use a Galil on my old Matsuura mill with the factory drives and motors.  Yeah, I got the machine running cheaper than buying new drives and motors.  But there will come a day (and I'm always thinking it might be today!) that those drives/motors will give up.  And then I will have to fix it with new stuff anyway. 

Steve

247
Mach4 General Discussion / Re: FTP Server Access
« on: February 02, 2021, 06:40:32 PM »
I made this soooooooo easy twenty five years ago (an exaggeration in jest).

Just use HTTP>

http://www.machsupport.com/ftp/

Steve

248
Mach4 General Discussion / Re: Mach 4 back up / Modus operandi
« on: December 03, 2020, 02:54:05 AM »
Adam,

They are in the stored in the Machine.ini that will be in your packaged profile.  So for all thing stock Mach, a profile package is a GREAT backup.  Now I can't say for certain where all data is stored for plugins that we didn't write.  But I would think most will use the Machine.ini file as well. 

Steve

249
Mach4 General Discussion / Re: LUA Problem with Jog Mode
« on: November 30, 2020, 02:13:54 PM »
mcJogSetType() works with mcJogGetType() so that scripts can use the API to coordinate jogging.  This is helpful for building control panels and such where a hardware jog button is connected to a physical input and a hardware switch is connected to multiple inputs.  Assume the following code is put in the screen load script:
Code: [Select]
function JogStart(mInst, axis, dir)
    local type = 0
    type, rc = mc.mcJogGetType(mInst, axis)
    if (rc == mc.MERROR_NOERROR) then
        if (type == mc.MC_JOG_TYPE_VEL) then -- velocity
            mc.mcJogVelocityStart(mInst, axis, dir)
        else                -- incremental
            local inc = 0
            inc, rc = mc.mcJogGetInc(mInst, axis)
            if (rc == mc.MERROR_NOERROR) then
                inc = inc * dir
                mc.mcJogIncStart(mInst, axis, inc)
            end
        end
    end
end

function JogStop(mInst, axis)
    local type = 0
    type, rc = mc.mcJogGetType(mInst, axis)
    if (rc == mc.MERROR_NOERROR) then
        if (type == mc.MC_JOG_TYPE_VEL) then -- velocity
            mc.mcJogVelocityStop(mInst, axis)
        end
    end
end

A call to mcJogSetType() will change the way the above functions work.  Also, a call to mcJogSetIncr() will change the increment used if the jog is an incremental jog. 

mcJogSetType() will also modify the following Mach registers, depending on the axis parameter:
core/inst/JogTypeX
core/inst/JogTypeY
core/inst/JogTypeZ
core/inst/JogTypeA
core/inst/JogTypeB
core/inst/JogTypeC

mcJogSetIncr() will also modify the following Mach registers, depending on the axis parameter:
core/inst/JogIncX
core/inst/JogIncY
core/inst/JogIncZ
core/inst/JogIncA
core/inst/JogIncB
core/inst/JogIncC

What these functions do not do is modify the jog types or increments that are used by the screen.  The screen maintains its' own jogging parameters.  These APIs were developed primarily for the PMC functionality or plugin development.  But they can be used by scripts in the manner shown above. 

Steve

250
Mach4 General Discussion / Re: Modbus Programming guidance needed
« on: November 30, 2020, 12:10:36 AM »
The Mach 4 MODBUS plugin just maps I/O or registers to the device.  That is basically ALL it does.  There really isn't any MODBUS "programming" as in some special MODBUS script.  The MODBUS plugin just maps Mach resources (registers and I/O) to the device.  Then you can use any LUA scripting as you would with any other Mach resources from any other plugin. 

I have no idea who wrote that scripting manual and why a MODBUS header was even included.  Maybe the author thought there was some MODBUS specific scripting, included the header, and then forgot to remove it after they found out there wasn't any MODBUS specific scripting?  I didn't write the scripting manual.  But I did write the MODBUS plugin so believe me when I tell you that there is no MODBUS specific scripting.  :)

In fact, you can do what you want with no scripting at all.

1. Setup the MODBUS plugin to have a function that writes to a holding (most likely) register.  (Function 6, write single register).  You will need to know the address of this register on your MODBUS device.  You will also have to give a name for the Mach register that will be mapped to this MODBUS function.  Writing a value of 123456 to this Mach register will use the Function 6 to write 123456 to the holding register you specified. 

2. Drop a DRO on the screen.  Then scroll to the "Register" property and find your MODBUS plugin register that you created. 

3. When you type a value in the DRO, your holding register will be updated. 

ALL Mach registers can be used in this manner.  The only thing different here is that there is a MODBUS device baking the register.

Now, if you want something more fancy that this, like preloading the register with a value, you will have to do some non MODBUS specific scripting that the scripting manual most likely covers (sections 3.2.1 and 4.3 look pertinent).

I believe the rest of the manual documents things VERY well.  I think that section 5.7 was left in there by mistake.  We all make mistakes. 

Steve