Hello Guest it is March 18, 2024, 10:06:08 PM

Author Topic: Mach4 Printer Port Discussions  (Read 1243620 times)

0 Members and 3 Guests are viewing this topic.

Re: Mach4 Printer Port Discussions
« Reply #250 on: August 09, 2014, 06:41:10 PM »
Art, when I set Darwin back down closer to my minimum calculated speed for my desired acceleration in motor tuning, my axis start running much smoother.  With my motors, ballscrews, and desired top acceleration that minimum is *just* under 17000.  I have Darwin set to 18kHz and I have been as high as 22kHz before noticing problems.  I'm running at 18kHz at the moment to allow my Z axis to run without seizing and squealing.  This driver (v1.10) seems to be much better at handling frequencies above the minimum of 17kHz I needed in the past.  It use to be that any thing above 17kHz would cause problems.

I'm wondering if there is some relationship between the usable frequency range that you tune your motors for and how fast you can marshal requests to the driver.  Not knowing the internals of Darwin or Mach 4, and only going on the hints you have giving on the forum, in emails, and in videos - it got me thinking if Mach is having a problem feeding Darwin fast enough to to keep it from starving, or if you have a classic bug with the queue boundary tracking being overwritten.

Just some random thoughts from someone who doesn't know better.


-Freeman
« Last Edit: August 09, 2014, 06:45:19 PM by Analias »
I'm not a complete idiot...
    there are some parts missing.

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #251 on: August 09, 2014, 07:32:54 PM »
Freeman:

>> is having a problem feeding Darwin fast enough to to keep it from starving, or

  The problem IS that M4 isnt calling Darwin to fill it up often enough if the CPU load is too high. Its identical to problems seen in early Mach2.
Now normally Mach4 shouldnt take any more than a few % of a CPU usage, so it has no trouble calling the Plugin often enough to keep
the waypoint buffer full. But your right, in your case there isnt enough time, which is why you run into trouble. If you step at 18khz, that means m4 must fill 18000 positions per second or it starts to strutter. That shouldnt be a challenge right up to 75000 or so per second on a system that isnt bogged down.

   So if your CPU is above 20% or so I can see where your frequency would cause a limitation. Yours seems pretty accute. I dont know whats slowing it so much.. maybe your cpu runs hot and is throttled or something in the video chain is very slow.. just about impossible to tell at this point.

Your right on the symptom, but the cause is as yet unknown..

Art

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #252 on: August 09, 2014, 09:19:55 PM »
art i have found out what is causing the spindle to not run properly its not getting a variable pwm signal what ever I set the pwm to that's all it gets. I tested it with M3 there is nothing wrong with the superpid or G540 it all works with M3.
so what's causing this problem god only knows.
also when running the roadrunner g code file the machine is run at 90 - 100% when not doing anything its between 0- 15%.
post version 1900 this does not happen

Offline Tweakie.CNC

*
  • *
  •  9,194 9,194
  • Super Kitty
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #253 on: August 10, 2014, 05:36:59 AM »
Hi Art,

I don’t know if you get the time to follow all the topics but thought you may be interested in my findings here:- http://www.machsupport.com/forum/index.php/topic,27782.msg195672.html#msg195672
Now that I have started looking in more detail at the samples I have made I also notice that a following S**** command also takes effect a few milliseconds before the preceding line of Gcode has completed.

Tweakie.
PEACE

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #254 on: August 10, 2014, 06:38:23 AM »
Tweaky:

   Thank you for pointing me to that, I wasnt aware. ( Ill be honest, I dont follow all
the m4 threads, Im a busy enough person I follow only what I need to.. I appreciate it
when Im pointed to a pertinant thread.. thx)

   I tend to agree with you, I dont think scripted codes will ever be enough for lasers,
Im convinced there is only one way a laser should be operated and thats with commands tied to
a step pulse. Darwin is prepared to trip commands via waypoint, which is a guarenteed trip
within 16 steps of any specified point. the command can include modifiers to move that to a
particular step..).  Im facinated that you get 10ms early on an MCode.. thats pretty early..

Daniel:

    The pwn should vary.. but its output must be mapped to the "Spindle On" signal
in M4, and your spindle range must be set properly. At that point it should follow the
S word commands. ... For next iteration Ill add a message output to show what Darwin is
thinking on an Sword interpretation. It may help in tracking down such things.

Art


  Hopefully we can find why the intermittant errors we're getting now occur, get it all working
and do some focus on things like laser triggering.. I cant speak for other hardware..but Im pretty sure
I can make Darwin trigger such things with absolute timing..

Art

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #255 on: August 10, 2014, 07:22:44 AM »
its all set and connected properly same as in m3 I have tried a lot of different settings it just wont change speed I can make it change speed by changing the pwm value I set, everything is set according to the g540 / superpid manual. if its set wrong it comes up with pot instead of pwm so you know straight away if its set wrong

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #256 on: August 10, 2014, 08:34:06 AM »
Daniell:

   If the PWM changes when you set a new value, then its probably the setup. I screwed up in the video. You need to set the
frequency in the box to the PWM base frequency you want. So set that number to whatever the base frequency in M3 was set to.
You get only the number of steps equal to the kernal freq / base. SO , if you set 5000 in that box, and your kernal is set to 40000, youll
get 8 steps of PWM. Here an example setup and result.

 In M4, you have spindle min set to 0rpm and Spindle max set to 25000rpm in the spindle setup.
 In Darwins Spindle output you have entered 4000 as the base pwm. The kernal freq is set to 40,000hz
 You command an S5000.

   The system will put out a base pwm of 4Khz since thats what youve entered in Darwins Spindle signals frequency.
   The system will ratio 5000 into 0-25000 and come up with a power of 20%.
   It will then see you have a base of 4Khz, and set its duty cycle to 20%.
   Since your kernal is 40000, abnd the base is 4000, you have 10 levels of pwm.
   the 10 levels availble are then S4000 , S8000, S12000,S16000 etc..

   So in this example, you would need to use those S words for those power levels.
   Any S word in between would give you the same pwm as the closest lower multiple of 4000.

  So make sure the base frequency is what youve entered in the box.. not
some arbitrary output frequency.

Art
« Last Edit: August 10, 2014, 08:37:01 AM by ART »

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #257 on: August 10, 2014, 08:55:02 AM »
Hi All:

  I "think" I found the problem with the settings being forgotten. It seems an MPG call when made can, but not always, cause
the ini file to get corrupted. Please let me know if you have the same forgetting of settings in this version. You need only
update the m4pw file, only the plugin changes in this one...

Thx
Art

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #258 on: August 10, 2014, 09:26:33 AM »
Sorry guys..

 It fooled me again. It just erased my motor settings again after 10 runs..

 I guess theres no way I can track this down myself. We'll just have to wait
for Brian or Steve to take a look at it.

Art
Re: Mach4 Printer Port Discussions
« Reply #259 on: August 10, 2014, 10:44:56 AM »
Art, some observations that I hope are useful to you:

When clearing the E stop, it is necessary to clear, set, then clear again before motion will be available.  This is true in both Darwin and M4.
Pin mapping in the port setup appears to have some errors.  On my system, port 2 input pins 5, 6, and 7 are also tied to pins 15, 13, and 12 respectively.  When ever input pin 5 goes low, so does the indicator for pin 15, and so on.  In addition, my input pin 11 does not toggle with the actual input (probe).  All of these problems do not occur when running M3 on the same system.

Question.  I read recently that homing does not move off the home switch like My M3 does.  Will this option be coming in the future or is there a work around?

Thanks