Hello Guest it is September 19, 2019, 06:07:11 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

Thanks for the G9 Terry!  As for G81 and the others, I don't know.  I'll ask Brian.


That LARGE number is what we use for the NIL value.  The var needs to just show NIL instead of that value.  I'll add that in.

There is a pin button to make it always on top. 


Build 1762:


Fix G81 error.
Added G code Vars to the mcRegFile plugin.  You can view the G code variables in the Diagnostic Window.
G code variables are saved when Mach 4 is shutdown.  Except local vars #1-#34 and global #100-#199.  All the rest should be sticky.
File->New for new file creation.  (also "Edit G Code" button will edit a new file if there is no file loaded.)
Operator->Jog Trace toggle so that the user can control if Jogs show a trace in the tool path.
Modbus bit packing mod re-inserted into the mcModbus plugin.  (it was there and then it wasn't.  Not it is back!)
Modbus RS485 check box now does something and it is sticky.
Every GUI control object now has an "Enabled States" property.  It allows for the object to easily be enabled/disabled via the machine state.
The clipboard is not destroyed in gcEdit and mcLuaEditor upon exit any more.

If you have modified your screen sets or profiles, make a backup before installing!


Mach4 General Discussion / Re: Image Buttons and images on screen
« on: May 09, 2014, 04:01:05 PM »
In Mach 4, it is better not to think of buttons that do things.  To implement something that a button AND a key press does, it is better to define the action in the screen script and have both the button and key press call that script function.  That way, you are not duplicating code and when you make changes, you make them in one place.

So in the PLC script:

function mySuperFunc
   -- A script function that does what I want.

Then, in the button Left Up scritp:


Then, using the keyboard plugin, you map a key to an named input.  At this point, you have two options:

1.  Look at that input in the PLC script directly using mcIoGetHandle() and mcIoGetState() directly.  However, it is hard to catch a momentary push this way.

2.  Map the I/O to and input signal and catch the state change in the screen signals script.

I prefer method 2.

So map the keypord input to say Mach Input signal Input#1.  Then in the screen signal script do:

local inst = mc.mcGetInstance();

if (sig == mc.ISIG_INPUT1) then
    if (state == 1) then


Mach4 General Discussion / Re: MACH4 - Modbus
« on: May 09, 2014, 03:44:04 PM »
Wow...  I have Win7-64 and I have no issue.  It must be something on your machine.  Modbus is not doing anything special with TCP.  It is just a connection like any TCP app would make.  Good luck figuring that one out!

For a bit more explanation:

A "connection" in the plugin is a connection to a device.  So you would have a connection to each PLC or VFD.  Each connection can use TCP or serial but not both.

Then, for each connection, you can have up to 100 functions defined.  The functions require a starting register.  The functions that read/rite multiple register all for a count to be added as well.  When these functions are created, they create Mach registers or I/O, depending on the type of the modbus function.  Theses are modbus resources.  You must name these.  The names will show in the Mach input and output signals mapping for I/O or, for registers, be available for the script environment.

The RS485 check box currently does nothing in the plugin that you have.  I have tied it in for the next update.


Russ is correct.  If you have a DRO that has a code assigned, it can only be updated with a mc.mc* API call and not using scr.SetProperty().  This is because that DRO is getting updated every screen refresh from the code assigned to it.  So you have to modify what is driving the DRO instead.  Take the Zero X button.  It is actually calling mcAsixSetPos() behind the scenes to modify the X axis DRO.

Mach4 General Discussion / Re: Disable button unless Idle
« on: May 09, 2014, 12:34:53 AM »
Is 7-32 compatible ? Or is 64 bit req./preferred ?


Both work well.  I use Win7-32 on my Matsuura.  Works fine.  If you want to EVER run the parallel port, you have to choose Win7-32.  Otherwise, I would go Win7-64.  It seems to be bit more stable.  Win7-32 isn't bad, just that Win7-64 NEVER seems to have an issue.  That's just my experience.

The upgrade thing was just a joke.  While I would really just love to be done with XP and never have to see it again, I do understand that people want to get the most out of their investment.  We are trying REALLY hard to support XP.  It was a good OS.  It is just that it is getting a bit long in the tooth as far as programming for it goes. 

But don't go upgrading if your compy only has 2 Gig of mem or less.  Win7 does require more system resources (memory for sure!).  If you put it on a 2 Gig system, you will end up buying memory sticks too.  The price of the memory plus the price of the Win7 OS may get very close to a new system's price!!  Do your homework.


Mach4 General Discussion / Re: Disable button unless Idle
« on: May 09, 2014, 12:20:17 AM »
HIYA guys these are things that should be fixed in the core.

(;-) TP

Just to clarify, the GUI has nothing to do with the core.  It is not like Mach 3.  There is a GUI (could be anything AND written with just about anything), the core, and plugins.  All three are separate.  In fact, we have two GUIs that can be used, Mach4GUI and wxMach.  And I have actually written C# and VB GUIs (for grins) that run the core.  The core is the interpreters, trajectory planners, and signals manager.


Mach4 General Discussion / Re: Image Buttons and images on screen
« on: May 09, 2014, 12:11:14 AM »
I think Brian put up a post on how to configure the keyboard plugin. 

For the screen editor, you cannot align controls that are in separate containers.  A container is a page, group box, or notebook page.  A control on page 0 (Default) will always show up and it may appear that it occupies the same container.  But appearances are just that, appearances.  It is hard to catch things like that (read impossible) in the screen editor because we can't tell that you didn't mean to do that!!!  Because it is perfectly acceptable in some circumstances.  Look at the tree on the left to tell where a control is actually placed.  It will have a parent.  That is a good way to figure out if an accident happened.

Making a copy of the screen set before you edit it is a good idea. 


Mach4 General Discussion / Re: Disable button unless Idle
« on: May 08, 2014, 11:43:28 PM »
Guys...  don't waste too much time on this button enabling and disabling.  I have just added a new property to all of the GUI objects.  "Enabled State"  You can choose which states the button (or other control) is enabled in with a click of a few check boxes!!!  It will be in the next update.

The Lua editor has a problem with Windows XP.  I have yet to fix that.  But it is on my list.  It is just that XP is not what I develop with so it doesn't get as much love.  XP's GUI event timings are different that the newer OSes.  It has been a real pain.  It would be much simpler for me if all of you guys running XP would just upgrade.  So how about it guys?  How about upgrading for a poor beat up programmer?  :)