CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Electronics > Computers and Networking


Computers and Networking Discuss computer and Networking related questions here!


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 09-23-2005, 04:43 AM
itsme's Avatar  
Join Date: Jun 2004
Location: United Kingdom
Posts: 445
itsme is on a distinguished road
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...
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 09-23-2005, 05:23 AM
Evodyne's Avatar  
Join Date: Dec 2004
Location: USA
Posts: 518
Evodyne is on a distinguished road

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
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 09-23-2005, 05:53 AM
itsme's Avatar  
Join Date: Jun 2004
Location: United Kingdom
Posts: 445
itsme is on a distinguished road

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...
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 09-23-2005, 06:07 AM
Evodyne's Avatar  
Join Date: Dec 2004
Location: USA
Posts: 518
Evodyne is on a distinguished road

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
Tweet this Post!Share on Facebook
Reply With Quote

  #5   Ban this user!
Old 09-23-2005, 06:48 AM
itsme's Avatar  
Join Date: Jun 2004
Location: United Kingdom
Posts: 445
itsme is on a distinguished road

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...
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 09-29-2005, 08:37 PM
 
Join Date: Aug 2005
Location: U.S.A
Posts: 52
Megahertz is on a distinguished road

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.
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 09-29-2005, 09:44 PM
 
Join Date: May 2003
Location: USA
Posts: 550
fyffe555 is on a distinguished road

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.
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 09-30-2005, 08:24 PM
 
Join Date: Aug 2005
Location: U.S.A
Posts: 52
Megahertz is on a distinguished road

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.
Tweet this Post!Share on Facebook
Reply With Quote

  #9  
Old 09-30-2005, 09:20 PM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 19,559
ger21 is on a distinguished road
Buy me a Beer?

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

Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Tweet this Post!Share on Facebook
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -5. The time now is 05:10 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353