Hello Guest it is May 02, 2024, 12:43:02 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 - simpson36

261
Mach4 General Discussion / Re: Mach 4 Feature Request
« on: May 29, 2014, 06:09:08 AM »
I don't like the "looks" of LUA very much.  It is true that it does have some C constructs.  But it also has some BASIC like elements to it as well.  And then it has some stuff that really can't be labeled as being like anything else on the planet!  It is bizarre in a lot of ways.  But it is fast and powerful.  The next best thing to true compiled code.

Seems the choice of Lua was well studied. My initial comment on MACH4 was that it is fast. Later, I commented that running a Lua script is indistinguishable from native code. Your comments support that contention. Granted, it is subjective, but it is I my impression none the less. In any case, you don't need a test lab or even a stop watch to tell the difference between VB and Lua.

Having a good portion of 'geek' and 'propeller head' in my DNA, what goes on 'under the hood' is interesting to me, but a lot of dialogue dwelling on the differences only feeds the perception that Lua is 'new' and scary.

The typical user who develops or just dabbles with scripting in Mach4 will be blissfully unaware of the tech details of how and where Lua is connected to MACH4 or the OS. I use C# mostly and while the syntax is different here and there, the structure is similar and the code that a USER sees . . . looks like C     at least it doers to me.  i.e. NOT scary.

General support for the base Lua language is excellent with a programmers reference available on-line for less than US$25 and there is an org site specifically for maintaining and distributing the software. For anyone familiar with C, the Lua learning curve is like an hour.  That's my story and I'm stickin' to it.   
 

So, do we get USER FIELDS or not?


262
Mach4 General Discussion / Re: Mach 4 Bug Reports
« on: May 29, 2014, 04:46:36 AM »
   . . . .. . .  from the Giant Grey Space Ants that it causing it to crash...


You know, it would have been nice if you mentioned the GSA (Grey Space Ants) right at the outset. GGSA interference is right there in the Lua docs. You can shield against GSA, but after they move thru the power lines outside town, and quadruple in size becoming GGSA . . . no good . . they gotta go. Call the ARMY. Tell them to send at least two jeeps, one bazooka and a Walkie Talkie. Couple extra grunts for Ant Fodder is helpful. Oh yeah and they should all be in Black and White.  

Moving on to Win8. I tried that guy when the trial version was released. Took it back off pretty quick and purchased another Win7pro. I'd be inclined to blame Win8 for everything and anything including global warming . . . .  except that others are having similar problems with Win7 and earlier.  Actually, Win8 did have one redeeming characteristic; the remote log-in is Uber fast and smooth. WAY better than Win7. You can run AutoCAD on a remote computer with Win8 and the response is equivalent to it being local. Very choppy with Win7.

Anyway, WIn8, couple of things come to mind that you might try;

I don't recall if Win8 has the 'compatibility mode' like Win7 pro. If it does, you might try setting the MACH4 compatibility to Win7 or earlier.  

With Win7 pro, Aero causes trouble with some apps, but it can be turned off. I do not recall of the WIN8 GUI can be turned off also, but if it can, you might try that. I do seem to remember Win8 having some sort of 'classic' look that can be turned on. Lua might like that better.


Of course, you'll need to address that Ant problem first.  

263
Mach4 General Discussion / Re: Mach 4 Feature Request
« on: May 28, 2014, 12:01:39 PM »
You sir, are as slippery as an eel - changing your argument as you go and making out that's what you said in the first place. I quoted the bit that I disagreed with - nothing more - nothing less. I'm not going to follow you around the block as you pretend you said something else and worse, pretend I said things that I didn't.

This nonsense is not as important to me as you may think. I would rather talk about something useful. Can't you do that even if you don't like me?

Quote

As far as a personal attack is concerned - I don't recognise that at all. could it be that that's just the way YOU see it whenever anyone has the bare faced cheek to disagree with you?


"This is not a PERSONAL attack, its just that I don't like the way YOU see things!"

Too funny.

You are mistaken. I like it when people disagree with me because that makes for a good debate. A debate is intellectual. You ignore facts and focus on personalities. That's an argument, not a debate. You'll have to sit in that sandbox by yourself, I'm afraid.

Bye now!  :D

264
Mach4 General Discussion / Re: Mach 4 Feature Request
« on: May 28, 2014, 11:50:58 AM »
Guys, we are simply not going to have API documentation until Mach 4 is done.  We already tried documenting it, spent nearly a whole month doing so, all to have it become totally useless because Mach 4 changed so much.  4 weeks blown to high heaven!  A lot of the changes have been based on your comments, suggestions, and feature requests.

But the docs that we did were really nice for the two weeks they were valid.


It a little difficult to understand how MACH4 could change so drastically this late in the game when MACH3 has existed for so long. It not like the topic was new and unfamiliar. Just sayin'

There are a couple of hundred calls that are just in a list. All of these changed? Can we get a one sentence description at least of the ones that are less-than-self-explanatory?

Specifically can we get USER FIELDS added to the tool table or other data structures for use by Lua scripts to do clever and amazing things?

Quote

So docs will come in time.  And we are WELL aware that everyone wants them.  But we are not a 500 employee company.  We don't have someone to put on the documentation task full time, as bad as I wish it we were able to do so.  That and the fact that whomever it is that does the documentations will also need to be a C++ programmer.  So it will be Brian or myself doing the documentation.

Just as a suggestion, you might consider that the skill set for documentation writing is different from Technical expertise. Being able to put a complex process into layman's terms is what is needed, methinks. At least for the hobby version. This typically involves the skilled use of analogy.

You hired my friend Ray Livingston to write the desperately needed programmer's reference for MACH3. Prior to that document being produced, MACH3 was nearly impossible to comprehend . . at least for me.

Why can't you guys hire Pappabear or other qualified person to get something moving?

This is the fear: the reality is that there will always be bugs. There will always be new features to add. When will this time materialize to concentrate on documentation . . .  I mean realistically?

You guys are programmers. Writing docs is about like being poked in the eye with a sharp stick. I got that clearly from you comments where 'well I REALLY ENJOYED my 4 weeks writing documentation, but it is unusable, so I get to do it AGAIN . .yippee!  . .  was missing from the paragraph.

No need to preach to the choir . . I hate writing docs. I'd rather do dishes than write docs.

Quote

BTW, I was the poor sap that did the month long documentation stint that became relegated to uselessness.  Has anyone else experienced working a solid month on something and having it all be for naught?  It is NOT cool.  Not at all.  :(


You definitely don't want to live in my world. Proof of concept, cost/benefit analysis, failure analysis, etc, can take a long time and often result in the decision to abandon a project. I guess it is debatable if that constitutes 'for naught'. My criteria is 'did I get paid for the work'. If yes, then no harm no foul. If no, then I picked the wrong horse . . or chicken in this case, I suppose.

Quote

Which came first, the chicken or the egg?  All I can say is the guy developing the egg was pissed when the guy developing the chicken changed the chicken.  Or vice verse.  Even if it was the same guy developing both!


Unless the Chicken Change was adding a live birth feature . . . in which case the whole egg issue was for naught . . . typically right after I finally designed a perfect award winning egg.

265
Mach4 General Discussion / Re: Mach 4 Feature Request
« on: May 28, 2014, 11:01:09 AM »
Quote

Simpson:
Lua is C and it is fast and unlike MACH3, MACH4 pre compiles all of the functions so it *should* be indistinguishable if a script or native code is running.
Sterling:
Lua is most definitely NOT C and to confuse or compare the two from this perspective is unlikely to produce anything useful.

What is the source of your information?

You evidently don't understand what makes a SCRIPTING language a SCRIPTING language or you wouldn't need to ask that question. However, from the Lua site - Page 1 para 1.

Quote
Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection,

These are (some) FUNDAMENTAL language defining characteristics. Not ONE of them applies to C.

You evidently think similar syntax is THE defining factor in language comparison. You also evidently misunderstand the term "compile" in that you think "compile" automatically implies the target is machine code. It does not. As a scripting language it would not make sense to compile Lua to machine code.

any C programmer can look at any of the code and clearly recognize it as C code.

What a silly thing to say - I've been programming professionally in C (and many other languages) for over 30 years and I see Lua as Lua. Just as any C programmer looking at Java would see it as Java just as any C programmer looking at C# would see it as C#. Why do you assume that the whole world sees things as you do after your five minutes of exposure?

Who ever heard of Lua?

Literally thousands - if not hundreds of thousands of people who use it all the time. Why oh why do you think nothing exists until YOU'VE heard of it?

Lua looks like C, walks like C and quacks like C

On a dark night, to those who are not that familiar with ducks, it might LOOK like a duck but it most certainly does not WALK or QUACK anything like a duck.


You conveniently side stepped my contention that the author and org site refer to Lua as 'based on C' and instead launch into some esoteric definition of a scripting language. The line you quoted has to to with Lua being embedded . . which I already stated. I also already stated that you are CORRECT in that Lua is not LITERALLY yet another flavor of actual 'C'.  What more do you want? I don't understand what your rant is all about.  

You also have your own definition of 'compiled' which for some reason is only valid if the end result is machine code. Instead of educating me, you should be informing Lua and the MACH4 developers and anyone else who does not have your 30 years of experience and is using the term 'compiled' all over the place. Egad! What is wrong with these people?

On a dark night, for those not familiar with forums, it may seem that the alleged thousands of people who know all about a new scripting language has some relevance to this conversation. Your incorrect assertion that I somehow control what the 'WORLD' thinks is also irrelevant. I never said anything at all about the 'WORLD'. I have two words for you to contemplate: HOBBY FORUM followed by 'where people have posted that they are lamenting having to learn a 'new' language just to use MACH4.

You expanded this from a local forum to the 'WORLD' and from a genealized observation to an Uber Tech Debate that really has no bearing on MACH4  . . at all. Behaving  as if I purchased commercial time on CNN to spread some contrived self serving evil agenda is a bit over the top, don't you think? Geeze, get a grip.

You clearly also turned this into a personal attack. Very naughty, especially for a moderator. No soup for you!  :D

Let me recap what ACTAULLY happened; SOME members of a group that I belong to was lamenting what they perceived as a large learning curve to climb as part of a move to MACH4, namely Lua.

ALL I said was "Hey guys, not so bad, the part you see is like C"   I left out the part where I said "Except those of you 'hobby guys who are worried about learning a new language' and yet are also computer scientists who author entire scripting languages and write compilers. For YOU guys, LUA is very different."

Sorry I missed mentioning that last part and thanks for filling in the blanks. Now everyone has a clear picture of my ignorance and will not be swayed by my heretical ramblings.

If I promise to behave, and then you won't need to spend so much time critically evaluating every word I post, could you then possibly put those 30 years of professional C experience to good use by writing some freaking documentation for MACH4?  Pretty please. I'll be good, I promise.

266
Mach4 General Discussion / Re: Mach 4 Bug Reports
« on: May 28, 2014, 10:09:38 AM »
well let me ask to beat a dead horse one more time...
can you make sure there are NO debug point breaks in the scripter, start the debugger, then F11 until it loops...

If your's still works, then there must be something in W8, 64bit (w8.1 technically).......  I am running the same M4H version as you are, and I am running the Stock OEM MachMilll profile and Screenset without any modules or anything else active...  Just to make sure nothing else is running...

kinda frustrating..
Not really a show stopper, since with breakpoints, F5 and NOT exiting the funciton, but hitting the stop debug before the end (on the dummyvar), I can still debug...  A mystery I guess.

Scott

Scott,

You probably know there is a 'auto' breakpoint, but other than that, there were no break points set. F11 steps thru the entire file as you can see by the snip I posted. I don't know a lot about Lua at this point, but from what I read, it can be a stickler about file locations. I have another 'C' ish Programming environment that's like that. Compiles fail because it can't find Includes and the files are right there. Alas, the compiler is looking for them in some obscure place and I have found no way to change that. It *might* be that Lua is similarly arranged, but the errors are not exactly verbose, so you don't get much of a hint as to what its unhappy about. At least with the other one, I get the full path where the thing is looking for the file. Did you follow (exactly) the sequence I posted including the file location and name?

FWIW I had two issues with 64 bit Win7 pro (be sure to mention pro if it is. they are different).  Both were Modbus related as that's what I was working on at the time. Seems unlikely these would be crashing the editor, but its all I have to offer, so here it is:

Win7 was blocking the Modbus traffic. You mentioned frustrating . .  MACH4 reported 'Modbus0 ok' and displayed a loop rate . . . but it was talking to a black hole . . nothing was getting in or out, and each of the  data types (MACH4 calls them 'functions') was error red. I don't know what Modbus uses to check operation, but it's not closed because Modbus thinks it is talking to someone and there's nobody home. In any case, Run as Admin removed the guard dog and things started working.

It occurs to me that if you were running without being admin, the files you made *might* not have enough permissions, so you should check that also. If you follow my sequence exactly that potential would be eliminated. Long shot, but the problem is in your system and you are down to shots in the dark, so it can't hurt.

My other problem was with the network config. Once I had Modbus TCP running, in order to plug both the Processor and the main network into the machine without having to flip back and forth (reconfiguring TCP4 each time) I set up my single NIC with two hard coded IP. Even tough the Modbus IP is hard coded in the config, MACH4 Modbus *apparently* was trying to get data from the Internet side IP and not the connected processor IP (if that makes any sense).

I stuck a second NIC in the machine and configured it hard coded 2dn network to the external processor and restored the main network (rounter,internet) to auto IP, etc. Modbus stays focused on the 2nd hard coded net and all runs well, and simultaneously. I don't know what the actual problem is, but a $40 NIC card solves it, so I'm not inclined to pursue it beyond that. The MACH4 TCP Modbus will literally run for days on end while I do all of my regular work on the same computer. Impressive.

Again, it seems hard to imagine these issues would be effecting the Lua editor, but the network setup confused the Modbus comms, and as I mentioned earlier, the editors seem to be picky about file locations, so its a long shot, but maybe Lua is checking the network for libraries or something like that. Perhaps it was set to look for libraries on a network by the developers and inadvertently left that way?

That's about all I can think of. Sorry all guesses.

Meet the new Boss . . Same as the Old Boss.

267
Mach4 General Discussion / Re: Mach 4 Bug Reports
« on: May 28, 2014, 12:57:58 AM »
Hey Simpson36, I tried runing m4 as admin, but again, at the VERY end of the F11's (after the last line of the calling function at the bottom). It crashes the McLua interpreter.  The running as Admin, DID help in it did not immediatly crash as you press the first F11....  
Can you run this slightly, busier code, in your McLua and see if you can F11 to the very end, and even start over again...
I am running W8.1, 64bit (and running M4 as admin).

function Testfunc()
local inst = mc.mcGetInstance();local rc = 0;
local Xaxis = 0;local Yaxis = 1;local Zaxis = 2;
local dirP = 1; local dirN = -1;
    mc.mcCntlSetLastError(inst, '***  Testing  ***');

    rc = mc.mcJogSetRate(inst, Xaxis, 0.10);
    rc = mc.mcJogSetRate(inst, Yaxis, 1.00);
    rc = mc.mcJogSetRate(inst, Zaxis, 100.00);
    
    rc = mc.mcJogVelocityStart(inst, Xaxis, dirP);
    rc = mc.mcJogVelocityStart(inst, Yaxis, dirP);
    rc = mc.mcJogVelocityStart(inst, Zaxis, dirP);
    wx.wxSleep(1);
    rc = mc.mcJogVelocityStop(inst, Xaxis);
    rc = mc.mcJogVelocityStop(inst, Yaxis);
    rc = mc.mcJogVelocityStop(inst, Zaxis);
end

if (mc.mcInEditor() == 1) then
    Testfunc();
end
Steps thru fine using F5 to start and F11 to step

No crashes and can start over again with F5.

Running build 1767  - Modbus TCP is active and running exchanging data with external processor

Exact sequence:

Start MACH4
Operator -> Edit/Debug scripts -> open M6
File -> New
Paste in entire content of your script
Save as  C:/Mach4Hobby/Subroutines/Papa.mcs
F5 (or click either works) to start debug
F11 step thru to end
Can repeat no propblemo.

Result window capture attached. The word 'error' in a little box is showing up later during the screen snip . . not sure where that's coming from, but it is not present during the debug cycle . . shows up while saving the snip . .  weird

Edit: the screen has a couple of buttons added that just read and write a few Modbud regs. Otherwise box-stock as delivered. Doubt the buttons would have much effect, but who knows . . . .
 

268
Mach4 General Discussion / Re: Mach 4 Bug Reports
« on: May 27, 2014, 08:36:16 PM »
Quote
       put this below func in your McLua editor, and see if you can step through it? I have tried breaks at each line as well, but the crash happens after you exit the function...

function Testfunc()
    local inst = mc.mcGetInstance();
    mc.mcCntlSetLastError(inst, '***  Testing  ***');   
end

if (mc.mcInEditor() == 1) then
    Testfunc();
end


Works fine here. Step thru no problem. Win7Pro 64 bit  Note: (MACH4 run as administrator)

269
Mach4 General Discussion / Re: Mach 4 Feature Request
« on: May 27, 2014, 03:57:47 PM »
The docs for the core functionality would be curated by the dev team or some other expert, the structure of the add on features could be curated by someone like simpson36, :)
Appreciate the vote of confidence, but I am far too busy to contribute in this way. I am already spending a lot more time on this forum than I should, but in my opinion, there is a 'make or break' topic on the table (as it should be) re: documentation, so I'm trying to get my 2 cents worth in on the assumption that the developers are paying attention to this this thread.

Quote


I would much prefer a solid but limited core with good documentation over having more core features without documentation.


Can't agree more. The demo release is identified by the top developer as have an objective of 'letting people play with the screens'. Well, it take about 2 minutes to make a pretty button . . so if that satisfied the objective, then they have done a great job. Making the button do something useful is an entirely different matter and that feels like a rewind to the guessing game that was MACH3.

In my never-so-humble opinion, the great emphasis on fixing bugs at this point is misplaced. The emphasis should be placed on providing at least rudimentary documentation WHILE there are people available and willing to evaluate how the screens work in a manner that has some bearing on the usefulness of MACH4 as the foundation it has been hyped to be. I got Modbus going under TCP and finally got some data moving between my processor and MACH4. While I very much appreciated the help provided by the developers (and it would NOT have been possible without that help), the effort was just unjustifiably great for such a small fragment of accomplishment, and I have chosen not to continue evaluating MACH4 until there is enough docs that I am not literally wasting my time digging and guessing.

Riddle me this: how much actual impact would the eval process take if a particular bug gets fixed now or in two days. OK, how much actual impact would it have on the eval process if those two days were used to provide at least some crude useable documentation?

I was excited to have the opportunity to evaluate MACH4, but I have stopped. There are some big dogs around here who have contributed massively to MACH and are getting unhappy. The nasty part about that is the negative feelings are primarily due to misconceptions and it seems I am the only one trying to explain why MACH4 extensibility is actually a very good thing . . . but without the ability to provide an example without spending ridiculous amounts of time. It's getting old fast.

Quote


  I also think it needs to be as easy as possible to add the desired community-generated functionality to Mach4 from within Mach4. 


If MACH4 were my product, and was close to release, I would already have somebody assigned to this task full time. However, I don't see this happening and I for one would be happy to have some documentation instead. MACH4 looks really good and I'd be happy to evangelize for it, but not if amounts to selling snake oil. We need to be able to produce examples of what MACH4 extensibility can actually do. THAT is what will excite the skeptics and generate the buzz.

When some docs appear, I'll jump back on board, but for now I'm just collecting info on interesting topics and then adios.


270
Mach4 General Discussion / Re: Mach 4 Feature Request
« on: May 27, 2014, 02:35:04 PM »
Quote

Simpson:
Lua is C and it is fast and unlike MACH3, MACH4 pre compiles all of the functions so it *should* be indistinguishable if a script or native code is running.
Sterling:
Lua is most definitely NOT C and to confuse or compare the two from this perspective is unlikely to produce anything useful.

What is the source of your information?  

I grant that it was technically incorrect for me to state 'Lua is C' because to be literally accurate; it is a scripting language based on C. This is the statement made by the author of Lua and by the org that is maintaining and distributing Lua.

Portuguese and Spanish are not 'the same' language, but the languages of these neighboring countries has the same roots and persons speaking the languages can have a conversation . . . at least as well as an American and a Brit . .  both of whom claim to be speaking 'English' :P. Ever talk to a Bayou Cajun or someone from Rural Arkansas? Is that actually English?  Are you supposed to need subtitles for English speakers?  ???

There are currently 3 flavors of C and they are not compatible with each other, BUT, any C programmer can look at any of the code and clearly recognize it as C code. I was moaning about having to learn vet another new language to develop on top of MACH4 . . until I researched Lua. As soon as I saw the Lua code, I though "Hell, this is not so bad, just another flavor of C, no biggie."

Lua is scripting and it is designed to be embedded in apps, so you are correct in that it is not ACTUALLY 'C' or more accurately one of the official flavors of C, however, I disagree that comparing it to C is unlikely to produce anything useful. Who ever heard of Lua? My initial reaction was not uncommon. Had I known that Lua looks like C, walks like C and quacks like C, I would not have wasted all that good whining on it.  ;)