CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] Re: tool changer logic- mathematical challenge

on 2004-08-13 15:03:38 UTC
Lance Hopper wrote:

>Hey,
> Thanks for the reply.
>I have a pretty good idea of the overall logic required. My biggest
>hang up now is the tiny detail of how to read the inputs. Whether
>it's in a VBscript macro with Mach2 on a PC or a PLC or PIC. How do
>I KNOW what the bit pattern is going to be for each distinct state
>transition, on>off and off>on on each of the 4 sensors?
>
> I'm guessing you are talking binary, IE 1000, 1100, 0100 etc...
>How do you get from on>off to a distinct bit pattern?
>
>What is a 'nibble'? :) Thanks for your help, I didn't do well in
>comp sci class, but I still have my book!
>
>
No problem.

The magic happens in the parallel port or microcontroller I/O pin
(connect a switch between ground and any data pin on the parallel port,
and see what happens in IO monitor when you switch it).

If the output from the sensors is logic level, you can connect it
directly to a parallel port pin on the PC (I use the term "directly"
kind of loosely here - you would need to be aware of proper
ground/ground loop issues, and noise), and this is where the conversion
from "sensors" to "bits" occurs. It would probably be negative logic,
so a sensor that's off reads as a 1, and a sensor that's on reads as a
0. If you connect the 4 sensors to 4 adjacent data pins on the parallel
port (or I/O port on a microcontroller), then when you read the port,
you get a bit pattern. Reading the port (on an AVR microcontroller or a
PC) is done with an IN instruction - INput data from an I/O port.

; PC code
mov dx, 0x378 ; likely parallel port address
in al, dx ; read the state of the parallel port pins

; AVR code
in r27, PINA ; read port A input pins

If the sensor is neither TTL/CMOS compatible and doesn't output a
contact closure, then you'll need some analog interface glue (which is
where my expertise ends :).

- Steve

Discussion Thread

Lance Hopper 2004-08-12 07:21:27 UTC tool changer logic- mathematical challenge cnc002@a... 2004-08-12 07:37:12 UTC Re: [CAD_CAM_EDM_DRO] tool changer logic- mathematical challenge Bob McKnight 2004-08-12 07:38:43 UTC Re: [CAD_CAM_EDM_DRO] tool changer logic- mathematical challenge Lance Hopper 2004-08-12 08:07:33 UTC Re: tool changer logic- mathematical challenge Lance Hopper 2004-08-12 08:09:32 UTC Re: tool changer logic- mathematical challenge cnc002@a... 2004-08-12 08:27:21 UTC Re: [CAD_CAM_EDM_DRO] Re: tool changer logic- mathematical challenge Lance Hopper 2004-08-12 08:49:32 UTC Re: tool changer logic- mathematical challenge industrialhobbies 2004-08-13 01:04:24 UTC Re: tool changer logic- mathematical challenge Lance Hopper 2004-08-13 05:23:55 UTC Re: tool changer logic- mathematical challenge industrialhobbies 2004-08-13 08:52:39 UTC Re: tool changer logic- mathematical challenge Lance Hopper 2004-08-13 12:16:35 UTC Re: tool changer logic- mathematical challenge andyolney 2004-08-13 12:23:30 UTC Re: tool changer logic- mathematical challenge Stephen Wille Padnos 2004-08-13 12:43:22 UTC Re: [CAD_CAM_EDM_DRO] Re: tool changer logic- mathematical challenge Jeff Jones 2004-08-13 12:59:54 UTC Re: [CAD_CAM_EDM_DRO] Re: tool changer logic- mathematical challenge Stephen Wille Padnos 2004-08-13 13:14:26 UTC Re: [CAD_CAM_EDM_DRO] Re: tool changer logic- mathematical challenge Jeff Jones 2004-08-13 14:05:10 UTC Re: [CAD_CAM_EDM_DRO] Re: tool changer logic- mathematical challenge Jeff Jones 2004-08-13 14:20:07 UTC Re: [CAD_CAM_EDM_DRO] Re: tool changer logic- mathematical challenge Lance Hopper 2004-08-13 14:21:09 UTC Re: tool changer logic- mathematical challenge Lance Hopper 2004-08-13 14:36:19 UTC Re: tool changer logic- mathematical challenge Stephen Wille Padnos 2004-08-13 15:03:38 UTC Re: [CAD_CAM_EDM_DRO] Re: tool changer logic- mathematical challenge Jeff Jones 2004-08-13 15:23:28 UTC Re: [CAD_CAM_EDM_DRO] Re: tool changer logic- mathematical challenge Graham Stabler 2004-08-13 16:22:26 UTC Re: tool changer logic- mathematical challenge Larry Wright 2004-08-13 17:42:57 UTC Re: [CAD_CAM_EDM_DRO] Re: tool changer logic- mathematical challenge Lance Hopper 2004-08-14 08:27:37 UTC Re: tool changer logic- mathematical challenge Graham Stabler 2004-08-14 15:52:27 UTC Re: tool changer logic- mathematical challenge Tom Hubin 2004-08-15 16:13:08 UTC Re: [CAD_CAM_EDM_DRO] Re: tool changer logic- mathematical challenge Stan Aarhus 2004-08-15 16:28:26 UTC Re: [CAD_CAM_EDM_DRO] Re: tool changer logic- mathematical challenge