Single axis stepper controller w/single programmable relay output?

"Bob La Londe" fired this volley in news:j04cu3$6n6$ snipped-for-privacy@dont-email.me:

It has to do with the fact that USB resources are controlled from the Windows kernel drivers. The windows kernel is not a real-time system. It "queues" operations for completion, then goes off and does other things while those queued tasks get done on a "when I can, IF I can" basis.

When a machine-lanquage component of software talks directly to a hardware device (barring getting pre-empted by interrupt service routines) the physical task occurs immediately. When a program talks to the kernal routines instead of directly to the hardware, queued tasks can take microseconds to _minutes_ to get executed on the hardware. This is worsened by the fact that many USB peripherals themselves queue operations, separate and apart from the kernel queuing.

That's why the EMC guys talk about using a "non-preemtive, real-time kernel" in Linux to run machine control routines.

With the right kernel AND the right USB hardware, USB peripherals _can_ be used in real-time. You just have to pick devices that don't have their own non-real-time queuing on-board. And if you have to use a Microsoft product, don't use Windows -- use DOS. But, then, that's not a very pretty scenario, either.

LLoyd

LLoyd

Reply to
Lloyd E. Sponenburgh
Loading thread data ...

"Bob La Londe" fired this volley in news:j04cu3$6n6$ snipped-for-privacy@dont-email.me:

I should have added this -- the way more sophisticated CNC machines that run off windows work is that they have an external "controller". Windows sends the commands it needs done as it can get around to it. The controller 'assembles' the required data and control information, and only sends it to the hardware when it has everything necessary to do the commanded motions.

IE... the MachMotion guys, who sell very nice 'kit' solutions for CNC conversion, won't guarantee that their lathe package can do threading unless you use their external controller. Some folks get away with it - at very slow speeds - some don't at any speed.

LLoyd

Reply to
Lloyd E. Sponenburgh

Thanks Llyod, I have gotten pretty good results out of my CNC mills for making molds. The very last thing I do is spot the plates for the alignment pins and clamping screws. Mostly they line up. (GRIN) I use hardware LPT ports on Windows machines, and I like I said I have run over a million lines of code now in one code file. I've figured out what speeds work. I only run one primary application at a time. I disable everything in Windows its possible to disable. I start Mach with a batch file that assigns a higher than normal priority to Mach, and I turn off the tool path display to reduce graphic adaptor load when cutting larger files. It works. I don't see why it would not work for cutting threads with some care. I've got a single point milling adaptor for thread cutting (basically a boring bar style). If I can cut loose threads by single point milling I don't see why I couldn't cut tighter fit threads using a lathe style operation. If absolute repeatability was required than add a zero switch to the 4th axis (on a mill) or the head stock (on a lathe) and write a macro to re-zero before each pass.

Not arguing at all. Just saying what has worked for me.

AND I ABSOLUTELY DO NOT SWAP ANY USB DEVICES WHILE MACH IS CUTTING A FILE. The only reason I leave USB enabled at all is that thumb drives are the best way to sneaker net files from my design computer.

Reply to
Bob La Londe

=============== From other posts I thought you were running Linux on some of your computers. Why not download EMC and see if that will work? Price is right...

formatting link
formatting link
formatting link
I don't know it this is the same EMC, but this site claims it runs under windows.
formatting link

Reply to
F. George McDuffee

You can download and install Ubuntu Linux and EMC 2 and burn an installable CD that will install both on a computer. I used it for a little while. If its already got Windows on it you can even tell it to set it up for dual boot at install time. I keep meaning to get back to EMC2, but Mach was a lot easier (for me) to setup.

Reply to
Bob La Londe

That may be, but more importantly, USB -- being a serial protocol -- packetizes its messages at the hardware level, and software can do little or nothing about it. USB hardware supports four kinds of messages or transfers, none of which are entirely proper for emulating a real-time LPT port.

(1) For example, although the shortest Control Messages may take as few as 16 bytes to complete (two 8-byte packets for Setup Stage and Status Stage), most USB control messages entail a handshake and a Data Stage, so several times that many bytes get sent back and forth. (See )

(2) So-called "Interrupt Transfers" from device are "queued by the device until the host polls the USB device asking for data." To-device Interrupt Transfers can happen without buffering and queueing, but still entail three packets (Token, Data, and Handshake packets) and still can be delayed by buffering at device and by device's packet validation step.

(3) After being set up, Isochronous Transfers are fast one-way transfers with bounded latency and no guarantee of delivery, ie fast enough for real-time control but not ok for reliable interactive control.

(4) Bulk Transfers likewise are unidirectional and fast but have no guarantee of bandwidth or minimum latency.

The page comments: "Ever get an urge to control a robot using real time Linux and a serial port, but find that your computer only has USB ports? [...] Sure, you?ve been told that USB is broken for real time at the specification level, but that won?t stop you from trying!" :)

See re driver problems with DOS.

Reply to
James Waldby

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.