Hello Guest it is May 25, 2019, 05:30:06 AM

Author Topic: CPU processing speed ???  (Read 4211 times)

0 Members and 1 Guest are viewing this topic.

Offline BR549

*
  •  6,865 6,865
    • View Profile
CPU processing speed ???
« on: September 19, 2011, 01:11:48 PM »
Now bear with me on this one(;-)  . IS there a way to lock a computer into a SET processing speed( for the lack of a better term). It seems problems arise between computers of different processing speeds with the MachCB macro code.

I know on commercial controllers that are  ALL of the same make use the same boards, it is not a problem as the processing speeds are all the same.

IF mach could LOCK IN a certain speed perhaps that would help with creating UNIVERSAL CB code???

I also may not be making any sense trying to describe it(;-)

Just a thought,(;-)

Offline Hood

*
  •  25,817 25,817
  • Carnoustie, Scotland
    • View Profile
Re: CPU processing speed ???
« Reply #1 on: September 19, 2011, 02:25:03 PM »
Terry I think its more than just processing speed, I have run Mach on 400Meg CPUs to 1Gig that I use on my machines now to 7750 Dual Cores and even quad cores and not seen a problem with macros. That would lead me to think there is something else that is at play here and as I have never seen it I am afraid I wouldnt know where to start looking.
Hood

Offline BR549

*
  •  6,865 6,865
    • View Profile
Re: CPU processing speed ???
« Reply #2 on: September 19, 2011, 04:58:09 PM »
HOOD surely you have seen it or you would not have to load up the CB code with While Ismoving() Wend statements after almost everyline of code(;-).

I have on old MB 1.2ghz that will run CB in  native format without problems AND rarely does it require a While Ismoving() to slow it down. Another MB 3.0 ghz will choke mach and skip all over the code without a ton of wait states added in.

Just looking for a common denominator, (;-) TP

Offline Hood

*
  •  25,817 25,817
  • Carnoustie, Scotland
    • View Profile
Re: CPU processing speed ???
« Reply #3 on: September 19, 2011, 05:22:37 PM »
I see what you are talking about now but with me not being a programmer I just thought it would be good practice to write code to wait if you were wanting it to, looks like its not?
Hood

Offline DaOne

*
  •  236 236
    • View Profile
Re: CPU processing speed ???
« Reply #4 on: September 19, 2011, 06:10:53 PM »
I have also had problems what seam to be related to CPU speed in VB code. ( works on one machine and screws up on another) Have to tried adding a sleep command in your while loop?
Re: CPU processing speed ???
« Reply #5 on: September 22, 2011, 10:28:22 PM »
I have an 800mhz that will skip without isMoving() statements.  Also have a 2.8ghz that does the same thing.  The problem is that CB code executes faster than G-Code.  I don't think slowing down the processor so CB executes at the same speed, even if it were possible, is a good solution.  Never had a problem with isMoving statements, other than it makes the code look a bit messy.  I've done tests where I executed a specific G-Code routine using just CB with isMoving Statements and just straight G-Code.  Execution time was the same...Or so close it wasn't perceptible.

Offline BR549

*
  •  6,865 6,865
    • View Profile
Re: CPU processing speed ???
« Reply #6 on: September 22, 2011, 11:37:26 PM »
A test we did long while back took a 100 line section of Gcode  and ran it 2 ways.

1 as straight Gcode.

2 as Macro code with all the While Ismoving() to maintain control.

There was a NOTICABLE difference in the 2 programs . The Gcode only program ran a smooth as silk as Mach loaded the buffer full . The Macro ?? NOT so smooth as if Mach was running it ONE line at a time and then wait and run another line of code.

I have a POLAR probing array that will gather  9,801 points per session as a Gcode program it runs smooth as silk running as fast as you dare to try. As a macro it is PAINFULL to watch it run.

May be time to try it again(;-), (;-) TP
Re: CPU processing speed ???
« Reply #7 on: September 23, 2011, 10:53:26 AM »
I try it every day.  I've been running code in macros for years.

"NOT so smooth as if Mach was running it ONE line at a time and then wait and run another line of code."

I get this issue when running straight G-Code on small segmented arcs such as a lead in or a slot with a long long straight segment then a small arc.  Mach will hesitate at the start and end points of the small arc as if it's in exact stop mode.  If I make the arcs larger, it's smooth as silk.