Hello Guest it is May 17, 2024, 12:28:04 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 - Brian Barker

381
Mach4 General Discussion / Re: Screen Set Ideas
« on: May 06, 2014, 06:21:21 PM »
Nice work! you are a mad man!

382
Mach4 General Discussion / Re: G28,M47 broke ?
« on: May 06, 2014, 06:18:23 PM »
Hello Terry
The registers for the G30 are as follows:

 G_30_XPOS   5181
 G_30_YPOS   5182
 G_30_ZPOS   5183
 G_30_APOS   5184
 G_30_BPOS   5185
 G_30_CPOS   5186

 G_30_P2_XPOS   5301
 G_30_P2_YPOS   5302
 G_30_P2_ZPOS   5303
 G_30_P2_APOS   5304
 G_30_P2_BPOS   5305
 G_30_P2_CPOS   5306

 G_30_P3_XPOS   5311
 G_30_P3_YPOS   5312
 G_30_P3_ZPOS   5313
 G_30_P3_APOS   5314
 G_30_P3_BPOS   5315
 G_30_P3_CPOS   5316

 G_30_P4_XPOS   5321
 G_30_P4_YPOS   5322
 G_30_P4_ZPOS   5323
 G_30_P4_APOS   5324
 G_30_P4_BPOS   5325
 G_30_P4_CPOS   5326

That should help you

383
Mach4 General Discussion / Re: MACH4 - Modbus
« on: May 06, 2014, 02:14:48 PM »
We are trying to program Mach4 and fix bugs at this time. Doing tech support for modbus is to much of a distraction at this point. Let us get more core issues solved then we can see what we need to do to get your modbus working.

You should start by telling us what you are connecting too for hardware.

Thanks
Brian

384
Mach4 General Discussion / Re: Sub - M30 acts like M47
« on: May 04, 2014, 09:32:26 PM »
That one took me looking at the file.. I didn't even need to load it to see that error :)

That has to be the upside to what we do.. we get good at screwing up so we can spot an error a mile away

385
Mach4 General Discussion / Re: Mach4 Keyboard Emulation
« on: May 04, 2014, 09:30:34 PM »
If you would like to disable the plugin for the keyboard you can also click on the icon in the task bar and it will no longer take the key presses. The keyboard plugin was designed to take all the keys that it was asked to use.. The idea is that your KB would become a Machine Tool input device when it was enabled.. When it is out of that mode you can use it like a normal keyboard without the machine trying to move if you type something.


386
Mach4 General Discussion / Re: Sub - M30 acts like M47
« on: May 04, 2014, 09:20:18 PM »
Sub must be outside of the main body of your program. Your code should look like this:

Code: [Select]
G0 Z1
X1Y1

M98 P1 L4

G0 X0Y0
m30

o1
G91 X2.5
G90
Z-1
G13 I1 F1000 (speed for sim  Smiley )
Z1
M99


387
Mach4 General Discussion / Re: Signal Scripts
« on: May 04, 2014, 09:17:35 PM »
I will try to test the example tomorrow. This is running on a machine at the shop, but I could have missed something... It happens!

388
Mach4 General Discussion / Re: Signal Scripts
« on: May 04, 2014, 08:49:44 AM »
if you rem that out you will not call the signal table I made :)

389
Mach4 General Discussion / Signal Scripts
« on: May 03, 2014, 09:11:43 PM »
Well Now that you guys have been having fun with scripts I wanted to share a fun one with you.

In the PLC script I have this:
Code: [Select]
SigLib = {
    --Enable
    [mc.OSIG_MACHINE_ENABLED] = function (state)
        machEnabled = state;
    end,
    --HeadUp
    [mc.ISIG_INPUT1] = function (on_off)--mc.ISIG_INPUT1
        if( on_off==1 ) then
            -- On
        else
            -- Off
        end
    end,
    --HeadDn
    [mc.ISIG_INPUT2] = function (state)--mc.ISIG_INPUT2
        if( state == 1 ) then
            -- On
        else
            -- Off Call A function here if you wanted
        end
    end,
  [mc.ISIG_INPUT3] = function (state)--mc.ISIG_INPUT3 --Used as an enable button
        if( state == 1 ) then
            local inst= mc.mcGetInstance();
            local reg = mc.mcSignalGetHandle(inst, mc.OSIG_MACHINE_ENABLED)
            state = mc.mcSignalGetState(reg);
            if(state == 1)then
                state = 0
            else
                state = 1
            end
            mc.mcCntlEnable(inst, state);
        end
    end,
    [mc.ISIG_INPUT4] = function (state)--mc.ISIG_INPUT2 button to do feed hold
        if( state == 1 ) then
            local inst= mc.mcGetInstance();
            mc.mcCntlFeedHold(inst)
        end
    end,
    [mc.ISIG_INPUT5] = function (state)--mc.ISIG_INPUT2
        if( state == 1 ) then
            CycleStart() --Run my cycle start function
        end
    end
}

Then in the signal script I do this:
Code: [Select]
if(SigLib[sig] ~= nil)then
SigLib[sig](state);
end

The magic of this is your functions get called when the state changes on the input! So you can make inputs do things on your screen .. for example you could enable the control, Swap pages, do a cycle start, ANYTHING.. I use this in my screen to interface my PLC to the screen so I can have buttons do things on the screen.

Event based programing :) By adding the function calls to a Lua table the speed is very fast to jump into the index in the table.

Hope that helps you all to make your dream screen!

Thanks
Brian

390
Mach4 General Discussion / Re: Mill GCode Manual G12-G13
« on: May 03, 2014, 03:18:52 PM »
That was from an old 3000C, It will do what Mach3 did plus. We where only trying to make it a little better for the users... Industrial will at some point have the full cycle..

Thanks
Brian