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 > General Electronics Discussion


General Electronics Discussion Discuss basic electronics, power supplies and anything else electronic related here.


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 10-19-2007, 09:47 AM
 
Join Date: Aug 2007
Location: England
Posts: 204
stirling is on a distinguished road
parallel port input problem

Hi - I have a NC switch connecting input pin 13 to sig gnd. i.e. an open switch gives me an active high input. Trouble is I get occasional very short duration "phantom" highs on the pin even though the switch is closed.

Other inputs are configured active low with NO switches and they work fine.

Any ideas how I can get rid of these glitches very gratefully received.

Thanks
Tweet this Post!Share on Facebook
Reply With Quote

  #2  
Old 10-19-2007, 10:31 AM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 15,714
Al_The_Man is on a distinguished road
Buy me a Beer?

Probabally the whole PC is 'floating' above ground, try taking a ground wire connection from the port common to your machine system ground.
Al.
__________________
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
(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

  #3   Ban this user!
Old 10-19-2007, 10:50 AM
 
Join Date: Aug 2007
Location: England
Posts: 204
stirling is on a distinguished road

Hi AL - thanks for your reply - much appreciated.

I'd tried your suggestion just before I posted and it actually makes it worse! You're clearly correct (in my opinion anyway) in thinking sig gnd must be floating near logic 1 - but why would that be?
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 10-19-2007, 11:20 AM
neilw20's Avatar  
Join Date: Jun 2007
Location: Australia
Age: 62
Posts: 2,189
neilw20 is on a distinguished road
Cool Debounce.

What software are you using to read the pin?
Try a 100n (0.1uF) small capacitor to ground near the PC socket.
This can catch some gliches.
Caveat: If you need fast response to short pulses, this can kill - delete - erase the required signal.
__________________
Super X3. 3600rpm. Two possible way to fix things: The right way or the other way.
Tweet this Post!Share on Facebook
Reply With Quote

  #5   Ban this user!
Old 10-19-2007, 11:31 AM
 
Join Date: Aug 2007
Location: England
Posts: 204
stirling is on a distinguished road

Hi Neil - Thanks for your reply

I'm using Mach.
Your caveat may be pertinent. This is a touch probe input.

I'm still trying to fathom why sig gnd would be floating so near to logic 1

Ian
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 10-19-2007, 11:42 AM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road

071019-1034 EST USA


Pins 18 thru 25 are signal ground. Normally these should all be connected together and to the common of the PC power supply and also to the PC chassis.

If at the PC 25 pin connector nothing is plugged into it and you short a signal ground to your input with a very short wire, then you have a very rock solid logic zero into the gate. Very little possible external linkage by electric, magnetic, or radiated fields.

Therefore under these test conditions if you get a change of state it is almost certainly internal to the PC.

You can check for near 0 resistance between the various signal ground lines and also the chassis. Determine the shorted resistance of your meter leads first.

.
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 10-19-2007, 12:48 PM
 
Join Date: Aug 2007
Location: England
Posts: 204
stirling is on a distinguished road

Hi Gar - thanks for your reply

Originally Posted by gar View Post
071019-1034 EST USA
If at the PC 25 pin connector nothing is plugged into it and you short a signal ground to your input with a very short wire, then you have a very rock solid logic zero into the gate. Very little possible external linkage by electric, magnetic, or radiated fields.
Therefore under these test conditions if you get a change of state it is almost certainly internal to the PC.
Did this and left it for a while - no glitches reported. so far so good.

Originally Posted by gar View Post
You can check for near 0 resistance between the various signal ground lines and also the chassis. Determine the shorted resistance of your meter leads first.
Tried this but with varied results. When determining the shorted resistance of the meter leads sometimes it was stable around 2 ohms but then it would go all over the place between 5 and anything up to 150 ohms.

occasionally the inter sig gnd resistance would be a steady 2 to 5 ohms or so but then again could go all over the place.
The sig gnd/chassis resistance was the same. Maybe my meter is not so good...

Bit more info - it seems I get the glitches mainly or maybe always when the axis are moving.

edit: just been told the bar's open (nearly 6pm here) - will check back later
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 10-21-2007, 06:40 AM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road

071021-0525 EST USA

stirling:

Typical meter leads may read about 0.2 ohms with moderate pressure between probe tips. If I apply high pressure and wiggle the contact area I can get a reading of 0.0. My particular meter quantizes to 0.1 ohm.

Try the shorted lead test. If you get the large variations, or moderately high readings, not below 0.2 ohms, then you have lead or meter problems.

If the meter and leads are OK, then you have problems making contact with the connector or internal problems.

Good on the no glitch with shorted input. Is this true when the axes are moving?

.
Tweet this Post!Share on Facebook
Reply With Quote

  #9   Ban this user!
Old 10-21-2007, 12:10 PM
neilw20's Avatar  
Join Date: Jun 2007
Location: Australia
Age: 62
Posts: 2,189
neilw20 is on a distinguished road
Check the lead.

As noted by Gar, pins 18-25 are (or should be) all connected to ground.
I have seen el-cheapo leads assume this and only connect 1 or 2 pins on any of pns 18-25.
If all the pins are not connected together, (and maybe you have 2 leads connected in series) it becomes possible that the 0v line is open circuit.
I have seen PC Card connections that have not all been connected.
I have seen cables with the desease.
I have had various combinations of this and been bitten before.
Most problems of this nature are caused by cables, when connected to hardware that the designer decided (for various reasons) not to use all the pins.
Examples:
1: Cable not standard. 20 way cable is cheaper than 25.

2: The hardware can detect that a cable is not plugged in. The designer assumed all cables have 18-25 connected, so used this feature to detect a cable.

3: The cable has all 25 wires connected individually, but one has broken at a db25 connector.

4: Two 'printer' cables are connected in series, but one or both are el-cheapo.

In each of the above examples, a printer will still work. It has all of it's pins connected as the printer manufacturer knows of (or supplies) el-cheapo cables. Even might have got it's 0v connection through the mains cable. Still works, but prints garbage occasionally.

Bottom line. Check continuity of all 18-25 of each cable, at each end, and at every peripheral connector. You would be surprised how many you find that have at least one pin not connected as expected.
__________________
Super X3. 3600rpm. Two possible way to fix things: The right way or the other way.
Tweet this Post!Share on Facebook
Reply With Quote

  #10   Ban this user!
Old 10-22-2007, 08:16 AM
 
Join Date: Aug 2007
Location: England
Posts: 204
stirling is on a distinguished road

gar, neil

Thanks very much indeed - problem solved. I connected all sig/gnd (18-25) together and glitches have gone and I'm getting good stable meter readings at last- but more importantly the probe system is all working nicely (well apart from one small software problem). Clearly some of the sig/gnd pins I was using were floating as you suspected.

I really appreciate your help on this. Many thanks again.

ian
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 10-22-2007, 10:06 AM
neilw20's Avatar  
Join Date: Jun 2007
Location: Australia
Age: 62
Posts: 2,189
neilw20 is on a distinguished road
You are welcome.

Originally Posted by stirling View Post
gar, neil

Thanks very much indeed - problem solved. I connected all sig/gnd (18-25) together and glitches have gone and I'm getting good stable meter readings at last- but more importantly the probe system is all working nicely (well apart from one small software problem). Clearly some of the sig/gnd pins I was using were floating as you suspected.

I really appreciate your help on this. Many thanks again.

ian
Ian.
You are welcome.
By the way, what's the software problem?
__________________
Super X3. 3600rpm. Two possible way to fix things: The right way or the other way.
Tweet this Post!Share on Facebook
Reply With Quote

  #12   Ban this user!
Old 10-22-2007, 02:10 PM
 
Join Date: Aug 2007
Location: England
Posts: 204
stirling is on a distinguished road

Hi Neil - I'm working on a 2.5D edge finding/contouring probing wizard for Mach3. Please see http://www.machsupport.com/forum/ind...ic,4456.0.html

It seems that there may be a bug in the G31 code. Currently Art is taking a look and hopefully there'll be a fix soon.

Basically after a G31 I back off with a G01 (all in incremental mode). Sometimes Mach doesn't execute the G01 so the probe tries the next G31 but of course it's already touching so etc. etc.

Ian
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where's the parallel port? cdlenterprises Mastercam 23 01-20-2007 06:23 PM
2nd PCI Parallel Port sunmix Mach Software (ArtSoft software) 8 11-22-2006 03:17 PM
Second parallel port? essa LinuxCNC (formerly EMC2) 11 04-12-2006 03:18 AM
Parallel port Aldoseri BobCad-Cam 11 03-13-2006 11:10 AM
Parallel Port Shanghyd Computers and Networking 1 11-22-2004 12:56 PM




All times are GMT -5. The time now is 06:44 AM.





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