Hello Guest it is April 25, 2024, 11:09:59 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 - stirling

261
General Mach Discussion / Re: Odd setup issue, new machine...
« on: September 11, 2015, 07:09:07 AM »
Hmmmm OK, but a drive that claims a max pulse rate of 200Kpps can not require a pulse width as long as 5us so one of the two is suspect. (You can't have 200Kpps each 5us long).

262
General Mach Discussion / Re: Odd setup issue, new machine...
« on: September 11, 2015, 05:19:52 AM »
From a quick scan of the data sheets I don't see that they actually say whether the drives step on the rising or falling edge so there's no immediate telling which is correct. The fact that your Y/A axis run better when you flip the setting would suggest that they are now set correctly and you're just "lucky" that X/Z work with the incorrect setting. What happens to X/Z if you change the settings to match?

Re: your 45KHz kernel. You should set the kernel to the MINIMUM required for your steps/per & max-velocity regardless of the "power" of the PC. There is zero advantage and potential disadvantage to using a higher kernel speed than needed.

263
General Mach Discussion / Re: Arrow keys don't work
« on: July 17, 2015, 12:10:31 PM »
Of course the choice is yours


264
General Mach Discussion / Re: Arrow keys don't work
« on: July 17, 2015, 05:49:25 AM »
Sorry!

I understood why you suspected me in pirate behavior. Let  me explain how it may happen.

I tried to solve this problem more when 2 weeks. There were dozens atempts of instalation and so on. During this two weeks I asked my freend to help me, also I hired a guy to  help me. They tried to install Mach versions that they use. So when I installed Mach downloded from this web there might be some files from other versions in the Mach directory.
When I understood pirate suspection, I deleted Mach directory and reinstall March. There is no Papa Fabio now, but nothing works.


The problem is that knowingly or not you have shown you have access to a pirated license. In this circumstance we have to insist that you now buy a genuine license if you want to use this forum again.

I/we know exactly why you're having the problems you're having and will be happy to tell you how to fix things when you do buy a license.

265
General Mach Discussion / Re: Changes In Macro Execution?
« on: July 17, 2015, 04:56:40 AM »
HIYA Stirling, DON"T get started , there may not be enough bandwidth.  :o

LOL - well if that ain't the pot calling the kettle.  :P

Yes CB is pretty crap and its interface to Mach leaves something to be desired but as you know I was having a little pop at your reply #8 by trying to give LOGICAL explanations.

So, I've explained why assuming TRUE evaluates to 1 was causing perfectly logical (pun intended) issues and I'm happy to take a shot at explaining every other issue here without resorting to "it's the grinch what done it".  >:D

266
General Mach Discussion / Re: Arrow keys don't work
« on: July 16, 2015, 07:53:05 AM »
When you say "Arrow keys don't work". Do you mean when you jog (press the arrow keys) the DRO values don't change or just that the axes don't move?

When you say "G-code doesn't execute" do you mean the gcode doesn't "run" in the gcode window and the DROs don't change values or do you mean the axes don't move?

267
General Mach Discussion / Re: Changes In Macro Execution?
« on: July 16, 2015, 04:06:44 AM »
It does appear Sleep(1) is, very nearly, equivalent Sleep(10).  I divided all my timeouts by 10, and they're not at least in the ballpark.

Sleeps longer than 10 should be reasonably accurate so there should be no need to modify or scale them. Generally just don't expect sleeps < 10 to be accurate and therefore don't use them. If your sleeps that are > 10 are wildly inaccurate then there's likely another issue somewhere.

as to isactive() sometimes

true / false works sometimes NOT

is /not may or may not work

-1/1 may or may not work

0/1 may or may not work

sometime the signal inverts sometimes not

LOL - well if you say so Terry, but I have NEVER seen isactive() fail to return true (-1) or false (0).

What I HAVE seen is functions that are documented as being boolean actually returning 0 and 1 instead of 0 and -1. Clearly there was some inconsistency in the interface implementation between the C++ "source" and the CB API. In those cases, using NOT will provide endless hours of debugging fun if you're not onto it.

Try this for your entertainment:

msgbox not 1

Perfectly logical, but a gotcha if you don't see why.

One example of a gotcha is getOEMLED. It returns 1 and 0 but how often do we see if getOEMLED(...) in code i.e. treating it as if it were a boolean function? Sure it'll work fine but then someone takes the logical next step and does a if NOT getOEMLED(...). That'll end in tears because NOT 0 implicitly casts to true BUT so does NOT 1.

isMoving() is perhaps the worst example for a few reasons. First, although it implies a boolean result it isn't (unlike most other is.... functions) so really, all the while isMoving() loops we see should really be while isMoving() = 1. Because again if you ever do a "if NOT isMoving()" it will not do what you might think. Of course isMoving()s worst "feature" is that contrary to its name it doesn't actually (exclusively) have anything to do with anything moving! Don't even get me started on isStopped().

268
General Mach Discussion / Re: Changes In Macro Execution?
« on: July 15, 2015, 01:18:53 PM »
One mystery solved:  IsActive(signal) = 0 and IsActive(signal) = 1 do not work as expected.

That's because in most (if not all) dialects of BASIC, true evaluates to -1 not 1. (if you must do an explicit compare) but the not op is preferable (in any language).

The other mystery remains:  I can still single-step the lines in the G-code window, BEFORE the previous line(s) have completed executing!  How do I fix that??

AFAIK this has always been the case with single block. Just tested it here on my trusty old 3.042.020 and that's how it is. A normal cycle runs macros "serially" though.

In addition, the timeouts in my loops are taking about 10X longer to time out than they should.  The Sleep(1) seems to be acting more like a Sleep(10).....

IIRC very low sleep values (<10) ARE inaccurate.

269
General Mach Discussion / Re: Mach3 Major Bug?
« on: June 25, 2015, 09:25:46 AM »
Hi Wes

I ran your code and macro and recorded the actual step pulse output. the first .pdf shows the numbers:

The largest positional error as defined by your machine setup for A is 0.001998759mm.

I then ran it again with your round() modification and the second .pdf shows the numbers:

The motion was virtually identical except for a couple of cases where the step numbers 4923 and 4922 were reversed. The maximum error was 0.001776495mm so about 1/20,000ths of a mm difference over the first run.

Your machine's (theoretical/mathematical) precision according to your motor tuning is 0.0028126... mm/step so in both cases Mach has done its job and kept the error inside your machine's resolution.

Note that this is what your machine is ACTUALLY doing. It matters not how many decimal places the DROs show, changing the DRO "precision" does not cause Mach to alter its step pulse output.

Anyway - hope this is useful or at least interesting.

270
General Mach Discussion / Re: Mach3 Major Bug?
« on: June 24, 2015, 08:35:08 AM »
Hi Wes

I appreciate you've sorted it but I'm just interested in why you had to do what you had to do. Any chance you could post your xml so I can set my system exactly as yours. Also the values you're inputting to your macro prompts?