Hello Guest it is April 21, 2019, 10:54:26 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 - smurph

Post up some code that fails.  I was running some cutter comp stuff the other day and all was fine.  So it may just be the way your post processor is outputting the code. 


Mach4 General Discussion / Re: Modbus and Sim
« on: August 17, 2016, 11:48:11 PM »
Well...  it is funny.  I have never gotten so many complaints about doing something right in my life!!!!  :)  To me, it is the way it is supposed to be, coming from an industrial manufacturing background (we used a lot of modbus devices).  So I had to look a bit cross-eyed to get Mach 3 modbus working.  But Mach 3 people are so used to doing it the wrong way, I guess.  Anyway, funny how we can get used to something.  We could all probably get used to putting our right shoe on our left foot, given enough time!  :)

If you will look at the modbus connection page, you will see a checkbox to use zero based register addressing.  I put that in there because the right way was giving so many so much grief.  But the bits are still numbered backwards.  I don't think I thought about changing that around.  But the correct modbus way should be easier for us to support in the long run.  At least I hope so!

I'm glad you got it all worked out.  I think I did mention that it was base 1 way back when we first did that plugin.  But it is probably buried in annuls of this forum by now.  And for what it is worth, Brian STILL trips up on it!  :)


Mach4 General Discussion / Re: Modbus and Sim
« on: August 17, 2016, 12:41:13 PM »
The modbus spec is leftmost bit is 0.  It is backwards, but that is how it is supposed to be.  The Mach 4 modbus implementations is true to the Modicon spec where it wasn't with Mach 3.  Addresses are base 1 instead of base 0 as well. 

See this:  http://www.modbusdriver.com/doc/libmbusslave/modbus.html

Mach4 General Discussion / Re: LOVING the PMC!! Thanks Steve!!!
« on: August 04, 2016, 04:35:32 PM »
We did start with LDMicro.  However, it was purely for the GUI as a starting point.  To keep from having to re-invent that wheel.  However, the GUI was cleaned up a bit (looks nicer without all of the dashed lines) and I added some nice features to make paralleling circuits easier, among other things.  The back end guts were completely re-written for generating LUA code. 

Some things that were in LDMicro just are not applicable to the Mach/LUA environment.  Persistence can be done with Mach registers in the Regfile plugin.  Then just use the PMC to operate on those registers that you define as persistent. 

Just in case anyone is wondering, we did license the LDMicro code, so the GPL stuff does not apply.  We paid the author handsomely.  :)  We will have to sell a LOT of Mach licenses to get a return on the investment.  However, we consider it a win/win as we got the PMC a lot quicker that we would have otherwise and we like supporting guys that make cool software. 


Mach4 General Discussion / Re: Mach4 Install on XP
« on: August 04, 2016, 04:13:56 PM »
We do not use .net at all.  Mach 4 is all native C++.  Some 3rd party plugins may require .net.  But we don't. 

The 2013 runtime redistribution package may be required to be installed (and you will need to be Administrator to do it).  We supply the runtime files in the Mach 4 directory but some XP systems are incapable of using the runtime in a side by side (SxS) configuration.  I believe some KB update needs to be installed in order for SxS to work in XP, although I do not know which one it is.


Mach4 General Discussion / Re: LOVING the PMC!! Thanks Steve!!!
« on: August 04, 2016, 02:58:44 PM »
Programmable Machine Controller.  It is a Fanuc term.  Basically, it is a ladder logic editor that spits out LUA code behind the scenes.  VERY fast.  It can be used instead of the regular Mach mapping of I/O or in conjunction with it.

The pros of the Mach I/O mapping is that it is event driven.  The PMC runs at a defined timer interval, thus is not event driven.  However, I did try to improve on that a bit at least for the Mach output signals.  When any of them fire, I force a PMC cycle.  So the PMC is basically event driven for the Mach output signals only.  Otherwise, it runs on a cycle just like any other PLC type of thing.  But...  you can have insane timer intervals (depending on the PC hardware).  I run my PMC object at 20ms intervals which is about the finest resolution my Atom board will do with a timer.  They complete their cycles in less that 1ms.  My real PC can handle 10ms intervals.  The OS seems to be a limitation on timers as well because 10 ms is about the finest resolution I can get.  But still!  10ms!!  That is smoking.



Mach4 General Discussion / Re: LOVING the PMC!! Thanks Steve!!!
« on: August 04, 2016, 04:58:02 AM »
I'm glad you guys like it!  :)

Mach4 General Discussion / Re: Mach 4 Feature Request
« on: July 26, 2016, 07:17:12 PM »
What build?  That should all be there.

Mach4 General Discussion / Re: Mach 4 Feature Request
« on: July 26, 2016, 04:33:53 PM »
G65/G66/G66.1 and conditional G code work in lathe and mill but requires the Industrial version.  Meaning they are not in Hobby.


Mach4 General Discussion / Re: M Codes in MDI
« on: May 27, 2016, 11:01:43 PM »
Correct.  There is a LUA instance in the screen and a separate instance for the M code macros.  The only thing available to both is the mc.* API.  scr.* is only available in the screen scripts.