Hello Guest it is October 21, 2020, 09:18:10 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

Mach4 General Discussion / Re: MACH4 - Modbus
« on: May 07, 2014, 01:00:22 AM »
The M4 modbus uses the newer Modicon table/register convention.  Not the hex addressing that Mach3 used.  There tables in the modbus spec that pertain to functions that operate on them.  Modbus devices usually give the addresses in either hex addresses or the table/register format.  And sometimes they will give both.  Also, sometimes they prefix the addresses a bit differently. 

Some do the T:RRRRR format where T is the modbus table and RRRRR is the base 1 register.
Others do a TRRRR format where an address may look like 40001.  This is really table 4, register 1.  

IMPORTANT:  Addresses are base 0 and registers are base 1.  The M4 modbus uses registers.  

If the device documentation gives the old hex addressing format, convert the hex number to decimal and then add 1 (base 1 remember!).  If the address is given in decimal, simply add 1.

Attached is a document that you may find useful.

Also, here is a good page that explains a lot. http://www.csimn.com/CSI_pages/Modbus101.html


Mach4 General Discussion / Re: Mach 4 Bug Reports
« on: May 06, 2014, 07:37:16 PM »
No, it is not protected.  But you sure did sniff out the way to find a lot of thing quickly!  That is the Lua script display that lists all of the scripts that are in the set.

So...  open up Mach 4, and then Operator->Edit Screen

Then click on the Goto Zero button.  You will see it's properties displayed on the left side of the screen.  Over the properties you will see a button with a lightening bolt.  Click on that.  This will change from properties to "events" and choose the "Left Down" script.  click on the ... button and it will open the Lua editor.  


Mach4 General Discussion / Re: Mach 4 Feature Request
« on: May 06, 2014, 07:10:44 PM »
os.execute('start "Docs" "Notepad.exe C:\\Mach4Hobby\\Docs\\M4Manual.txt" ')

Try that.  You may need to provide the fill path to Notepad.  But that should not block the script.


Mach4 General Discussion / Re: Mach 4 Feature Request
« on: May 06, 2014, 06:50:53 PM »
Nice idea!!!  But the os.execute stops the program that runs it (your button script) and waits for the called process to end.  I bet there is another way of doing that which won't "block".  I'll dig around.


Mach4 General Discussion / Re: G28,M47 broke ?
« on: May 06, 2014, 03:32:41 PM »
Sim does not do G28 at this time.

M47 is replaced by M99.  Forget everything you knew of M47.  :)


Mach4 General Discussion / Re: Mach 4 Bug Reports
« on: May 06, 2014, 03:23:13 PM »
Yes that is what it is.  G81 is not working right.  We added code in so as to be able to drill on a rotation and it doesn't work in all cases.  If there is no A offset, then all is fine.  Otherwise, A will creep A by the offset amount every cycle.  We will have that fixed in the next update.


Mach4 General Discussion / Re: Mach 4 Feature Request
« on: May 06, 2014, 02:32:30 PM »
Well...  if you loaded the G code from that directory last, that shouldn't be an issue, right?  I JUST added that in at the request of many others.  It is what it is now.


Mach4 General Discussion / Re: Mach 4 Bug Reports
« on: May 06, 2014, 02:13:06 PM »

HIYA Steve NO offsets in A here that I can find.

(;-) TP

There has to be.  Do a G53 G00 A0 in MDI and then zero your A axis.  Then try it.  Works for me. 


Mach4 General Discussion / Re: Mach 4 Bug Reports
« on: May 06, 2014, 02:10:59 PM »
File Ops. buttons are "hot" while G-code file is running. Should they be disabled and maybe warn "Stop file before ......" like Mach3  ?
Go to Zero sends all axis' except Z. Is there a Safe Z setting ?


This is all done in the screen set.  Obviously, the existing screen set has not covered every angle.  And that screen set might not be the "stock" screen either.  We were thinking of having a contest or something for the development of the stock screen set.  The one you are using basically is a clone of the static wxMach.exe GUI interface.  And it has a back story associated with it.  It came from my efforts to produce a G code interpreter front end for the Galil motion controllers over 10 years ago.  Before I even knew of Mach!  It is pretty functional, but it is not frill free at the moment.

Feel free to do up your own screen sets.  I know that is not a simple matter at the moment without documentation.  But that will get there.  As soon as we get out of this stage, I think it will be full on doc time!

I may add a property to all of the controls like "Valid States" where all one needs to do is select the machine states in which the control will be enabled.  But right now, you can handle this type of thing in the PLC script.


Mach4 General Discussion / Re: Mach 4 Feature Request
« on: May 06, 2014, 01:51:15 PM »
Oh, and the keypads are resizable.  Make them as big as you want.  Easy touch screen access!!!  The size is remembered so you don't have to do it every time.  They are also intelligent as to their position.  They try to sit below the DRO so that the changes can be seen.  If the DRO is not in a position on the screen for this to be possible, the keypad will move to another location (above or beside) the DRO.  If all that fails, the keypad will pop up in the upper left corner of the main window.


Very NICE job !
As you enlarge the pad, the font stays small. Is it easy enough to increase the font size ? maybe BOLD also ?
When stretched to "Fat fingered touch screen" size, the labels are disproportionately small.


I'll work on the fonts.  But that is not an easy task.  GUI programming is a royal pain!