Re: [CAD_CAM_EDM_DRO] Mach3 & laptops
Posted by
David Speck
on 2008-10-23 17:24:08 UTC
Dan,
There is a big difference between sending data to a printer and what
Mach3 does with a parallel port.
A printer doesn't have any time-critical features to its data stream.
It just accumulates the received character data in its internal buffer
memory until it has a full page's worth and then begins the print
cycle. Small pauses and hiccups in the data stream have no effect on it.
OTOH, Mach3 is actually putting out step and direction pulses that
directly drive stepper motors. The uniformity of the pulse rate and
synchronization between all 4 output axes is critical. If you have a
disruption of the pulse stream, you will get a defect in the finished
part, or worse, break your cutting tool.
When a program prints to a printer under Windows, it sends a character
to the printer driver, which in turn passes it on to the Windows kernel
which sends it to the spooler which keeps it around till the printer is
ready to accept it. This is a low priority process that happens
eventually when Windows "gets around to it". Mach3, OTOH, writes
directly and immediately to the chip register that controls the
parallel output port wires, totally bypassing all of Windows' internal
processing. This direct bit banging access is critical to keeping the
timing of all the step and direction signals coordinated. On some
machines, Mach3 can calculate and output 100K to 400K pulses per second
with reliability. With its massive processing overhead burden, there's
practically nothing that Windows can to reliably at 400K times per
second, or even 40k times per second for that matter, even on the
fastest machines available. Windows just plain wasn't designed to do
that.
USB stands for Universal SERIAL Bus. Even though it may look like a
parallel output to the Windows driver, a data byte is received in a
shift register at the computer end, and, when the USB bus is not busy,
it is sent out in bit serial format onto a single wire in the USB cable,
along with a bunch of addressing and checksum information to a receiving
register at the end of the converter cable, where it is reassembled into
a parallel format. This transmission also takes place on a "whenever we
get around to it" schedule, that would be wholly unacceptable for the
high speed timing that Mach3 requires. Thus, you cannot use a USB
parallel port emulator.
The fact that your laptop onboard serial interface was unreliable is a
good indicator that the CPU was so busy doing "other things" that it
didn't have time to properly read the input registers of the serial port
chip on the motherboard before data was lost. Installing the USB SIO
added additional layers of buffering that made the system more reliable.
The need for precise timing also explains why you have to use a system
with a separate video card, rather than an integrated video system on
the motherboard. With motherboard video, the display generator and the
CPU split access to the main system RAM. When the Video generator needs
to display a line of video, it freezes the CPU, takes what it needs from
memory, and then releases the CPU again. The sharing arrangement makes
the CPU seem a bit slower than it could be to the user, but it is not
critical to typical Windows program operation. However, Mach3 is
definitely not a typical Windows program, and this operating mode would
be entirely incompatible with the operation of Mach3. With a separate
video card, the video card has its own private memory, so generating the
display data doesn't require suspending the CPU operation.
I'm not sure if Mach3 will run under Win NT or 2K, but you might want to
check. These predecessors to XP don't require registration, and are
fast and have very small footprints, and are available for next to
nothing now. Better check with the Mach3 website for compatibility.
Dave
Danny Miller wrote:
There is a big difference between sending data to a printer and what
Mach3 does with a parallel port.
A printer doesn't have any time-critical features to its data stream.
It just accumulates the received character data in its internal buffer
memory until it has a full page's worth and then begins the print
cycle. Small pauses and hiccups in the data stream have no effect on it.
OTOH, Mach3 is actually putting out step and direction pulses that
directly drive stepper motors. The uniformity of the pulse rate and
synchronization between all 4 output axes is critical. If you have a
disruption of the pulse stream, you will get a defect in the finished
part, or worse, break your cutting tool.
When a program prints to a printer under Windows, it sends a character
to the printer driver, which in turn passes it on to the Windows kernel
which sends it to the spooler which keeps it around till the printer is
ready to accept it. This is a low priority process that happens
eventually when Windows "gets around to it". Mach3, OTOH, writes
directly and immediately to the chip register that controls the
parallel output port wires, totally bypassing all of Windows' internal
processing. This direct bit banging access is critical to keeping the
timing of all the step and direction signals coordinated. On some
machines, Mach3 can calculate and output 100K to 400K pulses per second
with reliability. With its massive processing overhead burden, there's
practically nothing that Windows can to reliably at 400K times per
second, or even 40k times per second for that matter, even on the
fastest machines available. Windows just plain wasn't designed to do
that.
USB stands for Universal SERIAL Bus. Even though it may look like a
parallel output to the Windows driver, a data byte is received in a
shift register at the computer end, and, when the USB bus is not busy,
it is sent out in bit serial format onto a single wire in the USB cable,
along with a bunch of addressing and checksum information to a receiving
register at the end of the converter cable, where it is reassembled into
a parallel format. This transmission also takes place on a "whenever we
get around to it" schedule, that would be wholly unacceptable for the
high speed timing that Mach3 requires. Thus, you cannot use a USB
parallel port emulator.
The fact that your laptop onboard serial interface was unreliable is a
good indicator that the CPU was so busy doing "other things" that it
didn't have time to properly read the input registers of the serial port
chip on the motherboard before data was lost. Installing the USB SIO
added additional layers of buffering that made the system more reliable.
The need for precise timing also explains why you have to use a system
with a separate video card, rather than an integrated video system on
the motherboard. With motherboard video, the display generator and the
CPU split access to the main system RAM. When the Video generator needs
to display a line of video, it freezes the CPU, takes what it needs from
memory, and then releases the CPU again. The sharing arrangement makes
the CPU seem a bit slower than it could be to the user, but it is not
critical to typical Windows program operation. However, Mach3 is
definitely not a typical Windows program, and this operating mode would
be entirely incompatible with the operation of Mach3. With a separate
video card, the video card has its own private memory, so generating the
display data doesn't require suspending the CPU operation.
I'm not sure if Mach3 will run under Win NT or 2K, but you might want to
check. These predecessors to XP don't require registration, and are
fast and have very small footprints, and are available for next to
nothing now. Better check with the Mach3 website for compatibility.
Dave
Danny Miller wrote:
> Ha actually I do have a old machine... which I snagged off the curb at[Non-text portions of this message have been removed]
> heavy trash day. For this reason. BIOS shows a 4GB hard drive and
> pretty old AMD processor. I would have liked to avoid trying to get it
> working and all but it is an option. Might be a good idea to keep the
> laptop out of the garage anyways. Does it run ok on old-ass systems?
> I'd probably put a fresh install of XP on it, a wireless networking
> card, and nothing else to clutter it.
>
> Well on the USB-to-serial cables, those use a virtual port driver that
> makes a new COM port show up. Any program can use it just like any
> other COM port they don't know the difference. I assume a
> USB-to-parallel cable would work the same way but I certainly wouldn't
> be surprised if Mach3 had a problem working through the virtual port
> driver and physically being bridged through different hardware.
>
> On the other hand, I can say this- my laptop had mega problems running
> through the built-in serial port at high speeds. Started dropping
> characters, probably just overran some lousy slow part of the
> southbridge design. Well, when I switched to the USB-to-serial and ran
> the serial data through that, all those problems went away. So, it's
> sort of "plausible" that a USB-to-"X" cable could perform better if the
> motherboard had problems. I'm skeptical though. Andy Wander says "no
> way" so it may be a waste of time to try.
>
> Danny
>
> David Speck wrote:
>
>> Danny,
>>
>> The problem is not with accessing the parallel port, but with the
>> internal timing of the Mach3 program.
>>
>> Mach3 uses a special kernel mode software driver which is necessary to
>> provide high precision timing required to get all the various step
>> pulses out the door at the precise instant needed for a proper cut.
>> Laptops have all sorts of integral proprietary hardware with special
>> drivers that confuse the dickens out of Mach3.
>>
>> When you get down to it, it's pretty amazing that Mach3 works as well as
>> it does, considering that even on a desktop, Windows is a highly
>> non-deterministic operating system. It takes a lot of high power
>> programming on Mach3's behalf to make sure Windows does not decide that
>> NOW is the time it has to do a defrag, just as you are half way through
>> the 4167th line of your G-code program. Laptops just add a whole
>> 'nother layer of complexity to the issue.
>>
>> Since Mach3 will run just fine on an old Pentium 3 that you can snag for
>> free at curbside on trash day, it's just not worth the developers'
>> effort that would be required to make it compatible with laptops,
>> particularly when nearly every laptop is a collection of custom parts.
>> (Have you ever tried to buy a replacement keyboard or LCD for a laptop?
>> -- essentially every model is unique, and the corresponding internal
>> software drivers are similarly unique).
>>
>> I'm pretty sure that Mach3 directly writes to the parallel port I/O
>> pins, and will not work on a USB to Parallel adapter, at least not in
>> the versions that I was familiar with.
>>
>> HTH,
>>
>> Dave
>
Discussion Thread
afogassa
2008-07-20 21:31:49 UTC
3d printer video
andrey@e...
2008-07-20 21:51:41 UTC
RE: [CAD_CAM_EDM_DRO] 3d printer video
Michael Fagan
2008-07-20 22:01:10 UTC
Re: [CAD_CAM_EDM_DRO] 3d printer video
afogassa
2008-07-20 22:34:24 UTC
Re: 3d printer video
Maxi Bertotto
2008-07-21 15:47:59 UTC
Re: [CAD_CAM_EDM_DRO] Re: 3d printer video
afogassa
2008-07-21 18:23:59 UTC
Re: 3d printer video
Jon Elson
2008-07-21 22:08:07 UTC
Re: [CAD_CAM_EDM_DRO] Re: 3d printer video
afogassa
2008-07-21 22:46:22 UTC
Re: 3d printer video
Yahoo
2008-07-22 07:31:35 UTC
Re: [CAD_CAM_EDM_DRO] Re: 3d printer video
Jon Elson
2008-07-22 09:49:39 UTC
Re: [CAD_CAM_EDM_DRO] Re: 3d printer video
Kim Mortensen
2008-07-22 10:30:03 UTC
Re: [CAD_CAM_EDM_DRO] Re: 3d printer video
Ralph Reese
2008-07-22 10:44:16 UTC
RE: [CAD_CAM_EDM_DRO] Re: 3d printer video
David G. LeVine
2008-07-22 11:53:13 UTC
Re: [CAD_CAM_EDM_DRO] [OT] 3d printer video
afogassa
2008-07-22 15:21:52 UTC
Re: 3d printer video
afogassa
2008-07-22 15:31:37 UTC
Re: 3d printer video
Wreno Wynne
2008-07-23 06:11:26 UTC
Re: [CAD_CAM_EDM_DRO] [OT] 3d printer video
NEVILLE WEBSTER
2008-07-23 07:34:53 UTC
Re: [CAD_CAM_EDM_DRO] [OT] 3d printer video
Danny Miller
2008-10-23 14:12:38 UTC
Mach3 & laptops
Andy Wander
2008-10-23 15:01:57 UTC
RE: [CAD_CAM_EDM_DRO] Mach3 & laptops
David Speck
2008-10-23 15:12:08 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & laptops
Danny Miller
2008-10-23 16:02:01 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & laptops
David Speck
2008-10-23 17:24:08 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & laptops
Jon Elson
2008-10-23 18:42:43 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & laptops
Andy Wander
2008-10-23 18:46:38 UTC
RE: [CAD_CAM_EDM_DRO] Mach3 & laptops
Andy Wander
2008-10-23 18:49:41 UTC
RE: [CAD_CAM_EDM_DRO] Mach3 & laptops
gcode fi (hanermo)
2008-10-23 19:31:54 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & laptops
Danny Miller
2008-10-23 20:51:19 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & laptops
Danny Miller
2008-10-23 20:57:01 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & laptops
wanliker@a...
2008-10-23 21:56:48 UTC
Mach3 & laptops
Dave Halliday
2008-10-23 22:18:32 UTC
RE: [CAD_CAM_EDM_DRO] Mach3 & laptops
gcode fi (hanermo)
2008-10-23 22:54:32 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & laptops
shawn c
2008-10-23 23:24:01 UTC
RE: [CAD_CAM_EDM_DRO] Mach3 & laptops
Chris Horne
2008-10-24 04:08:17 UTC
Re: Mach3 & laptops
Chuck Merja
2008-10-24 04:18:24 UTC
RE: [CAD_CAM_EDM_DRO] Mach3 & laptops
Chuck Merja
2008-10-24 04:32:09 UTC
RE: [CAD_CAM_EDM_DRO] Mach3 & laptops
shawn c
2008-10-24 07:30:38 UTC
RE: [CAD_CAM_EDM_DRO] Mach3 & laptops
Danny Miller
2008-10-24 12:10:24 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & laptops
Danny Miller
2008-10-24 12:32:28 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & laptops
Keith Bucklitch
2008-10-24 13:55:25 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & laptops
Danny Miller
2008-10-25 11:46:46 UTC
[CAD_CAM_EDM_DRO] Machining width
R Rogers
2008-10-25 13:44:23 UTC
Re: [CAD_CAM_EDM_DRO] Machining width
Danny Miller
2008-10-25 16:42:40 UTC
Re: [CAD_CAM_EDM_DRO] Machining curved strip for a thickness
gcode fi (hanermo)
2008-10-26 00:28:05 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & laptops
Lester Caine
2008-10-26 01:28:41 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & laptops
Yahoo
2008-10-26 11:09:03 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & laptops
Danny Miller
2008-10-26 11:10:46 UTC
[CAD_CAM_EDM_DRO] Hotwire CNC on mill
Michael Fagan
2008-10-26 11:29:36 UTC
Re: [CAD_CAM_EDM_DRO] Hotwire CNC on mill
luv2bsailin
2008-10-26 13:19:15 UTC
Re: Mach3 & laptops
Graham Stabler
2008-10-26 16:02:37 UTC
Re: Hotwire CNC on mill
George Williamson
2008-10-26 19:19:01 UTC
Re: Hotwire CNC on mill
Michael Fagan
2008-10-26 22:36:41 UTC
Re: [CAD_CAM_EDM_DRO] Hotwire CNC on mill
dandumit
2008-10-27 02:34:37 UTC
Re: Mach3 & laptops
gcode fi (hanermo)
2008-10-27 05:41:35 UTC
Re: [CAD_CAM_EDM_DRO] Re: Mach3 & laptops
Danny Miller
2008-10-28 18:08:29 UTC
[CAD_CAM_EDM_DRO] Mach3 & "integrated video"
Michael Fagan
2008-10-28 18:12:05 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & "integrated video"
Danny Miller
2008-10-28 20:09:04 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & "integrated video"
Stephen Wille Padnos
2008-10-28 20:25:56 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & "integrated video"
Danny Miller
2008-10-29 02:39:47 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & "integrated video"
Jon Elson
2008-10-29 10:05:19 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & "integrated video"
Lester Caine
2008-10-29 11:46:28 UTC
Re: [CAD_CAM_EDM_DRO] Mach3 & "integrated video"