587,137 active members*
3,526 visitors online*
Register for free
Login
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2004
    Posts
    445

    Parallel ports

    Hi there,

    I've been wondering if it is possible to have more than one parallel port running a CNC machine from one PC.

    If the machine had, say, 4 or 5 axes many limit/home switches, spindle control, a tool changer, coolant, emergency stop, automatic chucks and any other 'accessories' you can think of, then a single parallel port probably won't have enough pins for all of this. Is it then possible to add another parallel port to the PC and have full control over both ports from the software (I'm thinking of a package like TurboCNC).

    I'm not really sure how a second parallel port would/could be set up. I'm sure this has been done before. Any ideas?

    Thanks
    Warren
    Have a nice day...

  2. #2
    Join Date
    Dec 2004
    Posts
    518
    Warren,

    Yes it can be done. I haven't done it myself, so I won't elaborate (it would be kinda pointless, right?) But yes, it is doable. I'm 100% positive you'll get more informative asnwers, so stay tuned.

    Lance

  3. #3
    Join Date
    Jun 2004
    Posts
    445
    Hello again,

    I've been looking around on the internet and in TurboCNC. What I have come across is ISA and PCI parallel cards. From what I understand these cards just plug into the correct slot and all of a sudden you have got another parallel port (WOW!).

    When I was looking in TurboCNC, I noticed that for each input or output, you can select which port it is for. The choices are 0x378, 0x278 and 0x3BC. On my current CNC mill, I use the 0x378 port for everything and it didn't require any setting up or playing around - it just worked the first time. If I now add one of these PCI/ISA cards to the computer, is there something I would have to do in the BIOS or something to make the second port become the 0x278 option? How would I go about setting the second port up?

    Thanks
    Warren
    Have a nice day...

  4. #4
    Join Date
    Dec 2004
    Posts
    518
    Warren,

    You're in for a pleasant suprise-this is about as simple as it gets. First off 0x378 is the default LPT1 address, and 0x278 the default LPT2 address. The other 0x3BC is for odd video card based ports. Anyhow, assuming your running a plug-and-play version of Windows, it's no more difficult than powering down, taking off the cover, installing the card, putting the cover on, and rebooting. Windows will "see" the card and presto! it's read to go. Since it will be your second port, it should install it at the 0x278 address too. You do need to know if you computer has ISA or PCI slots. ISA is getting fairly old-most 'puter vendors have used PCI now for several years. Gotta get it right: an ISA card wont plug into a PCI slot (and vice-versa).

    Lance

  5. #5
    Join Date
    Jun 2004
    Posts
    445
    Hi Lance,

    Thanks for your responses. It all sounds fairly simple - how odd! Would Windows 95/98 be classified as a plug-and-play version? I use Windows 95 at the moment for my mill, as I need the DOS prompt for TurboCNC.

    I have no idea what benefits the PCI cards have over ISA cards, but I do know that ISA cards are much cheaper than PCI cards - oh well...

    I probably won't be doing this for a while, as I have no need for it yet, but I'm thinking about my next machine which is probably going to be a big step up in complexity compared to my mill (first machine). I'm also using a laptop at the moment, so I'll probably have to get a normal PC for the next machine (which is fine). At least I now know that what I had in mind is possible.

    Thanks again
    Warren
    Have a nice day...

  6. #6
    Join Date
    Aug 2005
    Posts
    52
    I have never used TURBOCNC; But, here are some other thoughts.

    I think you might have syncronization problems between the two ports.

    I am assuming the parallel port only sends out step pulses and direction signals (Bits) out the parallel port to your stepper motor controller for movement. I am also assuming that TurboCNC sends information to the electronics (motherboard par. port controller and add-on PCI or ISA par. port card) The information that gets sent to the motherboard par. port from TurboCNC will probably get processed faster and sent to you stepper drivers quicker than the info. that gets sent to the expansion card. I would recommend connecting all your axis drives to the same parallel port and all the extra stuff (spindle control, a tool changer, coolant) to the other port.

    You could also add two identical cards (PCI or ISA) to your computer add achieve better syncronization. Remember to set one address at 378hex and the other at 278hex. You will also need to disable the built in parallel port on your mother board in the BIOS settings.

  7. #7
    Join Date
    May 2003
    Posts
    550
    Megahertz,

    good thoughts but under DOS there's no speed difference between on MB and card peripherals, assuming they're on the same bus type. DOS works on an interupt basis and addresses devices by the drivers and the port address (378 etc.)

    Windows is another matter and usually windows 'virtualises' the driver and so disconnects the physical device from the OS, so causing timing issues and possible speed differences between similar devices. Mach 2 cleverly gets around this by loading a driver for the PPort that provides direct hardware access by interupt much as DOS does above. More than one PPort, either MB integrated or PCI will be covered by the direct access driver installed as part of the MAch installation and you should expect similar response times from either.

  8. #8
    Join Date
    Aug 2005
    Posts
    52
    Fyffe555,

    Thanks, I didn't know about the extra PPort driver that gets loaded. I have never used any CNC software yet. I only know a little about electronics and computers and sometimes have an opinion.

    I believe the motherboard PPort hardware is part of the chipset of the mother board and has a high speed clock reference (maybe the speed of your RAM at ~133 megahertz). I thought the PCI bus clock reference was 33 megahertz and the ISA(16 bit) bus clock reference was 16 megahertz. All of these PPorts also have FIFO buffers (possibly with different storage capacity). When the processor sends info. to the PPort using the interrupt it gets sent to the FIFO buffer first. Doesn't it? And with the actual PPort electronics running at different speeds wouldn't you get very small time delays? The very small time delays may have no visible effect.

    Another issue might be the windows "multitasking/multi thread environment". I would think the CNC program would send one byte of info. to port 378hex and right away sends one byte of info. to 278hex. You only delay is a few processor clock cycles (a very very small delay). But, What if the CNC program sends info. to port 378hex and then the Windows enviroment stop the "CNC program" thread to take care of one of the many other processes that would be operating. The OS will eventually return to the "CNC program" a send info to port 278hex. However, many processer clock cycles have now occured between the port378 write and the port278 write. Perhaps the CNC software can be written to prevent this break in thread execution from ever happening or you can reduce the quantity of background programs or services (virus scanners, screen savers) sucking up processor resources. My programming knowledge doesn't extend this deep into the OS.

    Here is a test that may work to verify the effect of the time delays. Configure your machine with X and Y axis on the same PPort. Write G-code to draw/cut/route a 45degree line with respect to the x and y axis. I believe this should send an equal amount of step pulses out the PPort at the same rate. Now, switch one of the axis to another PPort and run the program again. You should still arrive at the same end point. However, you might get a slight arc instead of a straight 45 degree line. If you draw on paper you could place one drawing on top of another and hold them both to light to see any variation.

    I have to verified any of this so don't take it for gospel.

  9. #9
    Join Date
    Mar 2003
    Posts
    35538
    Quote Originally Posted by Megahertz
    Another issue might be the windows "multitasking/multi thread environment". I would think the CNC program would send one byte of info. to port 378hex and right away sends one byte of info. to 278hex. You only delay is a few processor clock cycles (a very very small delay). But, What if the CNC program sends info. to port 378hex and then the Windows enviroment stop the "CNC program" thread to take care of one of the many other processes that would be operating. The OS will eventually return to the "CNC program" a send info to port 278hex. However, many processer clock cycles have now occured between the port378 write and the port278 write. Perhaps the CNC software can be written to prevent this break in thread execution from ever happening or you can reduce the quantity of background programs or services (virus scanners, screen savers) sucking up processor resources. My programming knowledge doesn't extend this deep into the OS.
    Mach2 and Mach3 use a special driver that takes complete control of Windows. It can function in 3 different modes. 25Khz, 35Khz, and 45Khz. 25Khz mode will reliably output 25,000 steps per second, on as little as a 500Mhz PC. Although you need a fast (2Ghz+) PC, 45Khz mode will output up to 45,000 steps per second. But, as you mentioned, other software can interfere with this. So ideally, for a PC running Mach3 to control a machine, Mach3 should be the only software installed. Definately the only software running. Anything that automatically starts with Windows is a very bad thing.

    While there are other windows based CNC controllers that output step and direction signals, Mach2 and Mach3 are the only ones that can give anywhere near that performance, both consistently and reliably. Not to mention the fact that is has literally hundreds more features than probably any CNC software under $1000 http://www.artofcnc.ca
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •