Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: RChadwick on July 29, 2008, 01:39:35 AM

Title: Problems with Parallel Port inputs on Motherboard
Post by: RChadwick on July 29, 2008, 01:39:35 AM
I set up Mach3 the way I liked it, and moved the CFG to the computer I decided to use (All-in-one touch screen computer). It's got a Jetway 625EMP with a VIA C3 CPU. The stepper motors and spindle relay control work fine, but all inputs (Limit switches, emergency stop) don't work at all. I came across a parallel port test program, and it detects all the inputs fine. I've tried changing the port from 378 to 278, tried SPP, EPP ECP, and EPP+ECP, and nothing works. I don't know if it is important, as I've never programmed a parallel port before, but the test program shows 3 addresses. It shows 378, 379, and 37A. Next to each number it shows a byte, and when I trip the switches, bits in the 379 byte toggle. I'm guessing this is normal, but not sure. I thought it might be something left over from the config file, which I just copied over from the other computer, but I renamed it and used the old file, then set it up, and it still doesn't work. I suppose It might be some unfixable strange incompatibility, but hoping someone has some ideas :)

BTW, Both computers have Windows 2K

Also, no need to tell me to update the BIOS. I tried, and then realized it was actually a downgrade, and I already had the latest. It required an EPROM programmer to fix....
Title: Re: Problems with Parallel Port inputs on Motherboard
Post by: jimpinder on July 29, 2008, 04:13:50 AM
The LPT port addresses, LPT1 and LPT2 are, in actual fact, three addresses each in the PC.

LPT1 is &H378, &H379 and &H37A, LPT2 is &H2278,279 and 27A

378 and 278 are the OUTPUTS for lines 2 - 9 on the 25 pin port (the old printer data pins). 379 and 279 bits  3 - 7 are the 5 input lines( pins 15,13,12,10 and 11 - note the order)(see later) and 37A and 27A, bits 0 - 3 are the other output pins, 1,14,16 and 17. Pins 18 to 25 on the port are signal return (0v) connections to the computer.

The LPT1 port was normally in built in the motherboard of the computer and therefore the input/output capabilities are fixed, whereas a second port if added as a plug in COULD have bi-directional capabilities, depending on the board.

If your LPT1 port is buit in, there is no point testing it - you cannot change it - but you seem to be saying that you can changes the input/output capabilities - so are you using two plug in ports, or is your first one fixed and the second one a plug in.

I have never seen the need to muck about with my computers BIOS. If your computer is working properly (and I like the touch screen, I have one on my organ simulator) then the basic operating system - to be compatible with the IBM PC format - should already have at least the LPT1 port properly addressed and formatted.

If the port is an add on, and you have the axis and spindle working, then it would seem to me that your port card is switchable, and you have the input pins designated as outputs, so although the card is seeing the inputs, in is not passing them to the computer.

I think that is all I can say at the moment till you have another "fiddle" with it.

In Mach 3 set your port one address at 378. If your switches are live, then go to the Mach 3 diagnostics screen and see what the led.s show for activity on the port. They light up if an active signal is detected so toggle the switches and see what happens.

If you use your port test program and that is telling you that the inputs are being detected when you switch them manually, and the led,s on Mach are not showing then your configuration file on Config/Ports and Pins/ Input Signals needs  attention. The favorite thing  on that page that I kept missing was the port number !!!

Title: Re: Problems with Parallel Port inputs on Motherboard
Post by: RChadwick on July 29, 2008, 04:26:23 AM
Unfortunately, I only have one parallel port, and it's on the motherboard. I simply told the BIOS to put it at a different location. If there was room in the case, I'd try a PCI Parallel port, but there isn't room.

I made the same mistake with the port number on the config page too :)

I didn't start out messing with the BIOS, it worked nicely on the other computer. I only resorted to that after I couldn't get the inputs working. I played for hours, and just used up all my ideas. What confuses me is that the hardware is good. I can run that program, and it shows all my inputs perfectly. No matter how I configure Mach3, including using a configuration that already worked, the inputs still don't work.

Title: Re: Problems with Parallel Port inputs on Motherboard
Post by: jimpinder on July 29, 2008, 05:07:07 AM
If you only have one port on the system, then we must assume that the operating system has it correctly set up - and if your axies and spindle relays are working, then the output side is functioning.

Lets get extremely simple - If you take the lathe/mill whatever off the computer and put on an old type printer on the the LPT1 port, does it work. This is the important bit, since this will simply test all the inputs, outputs and handshaking at one go.

The problem might be (of course) no **** has an old type printer any more.

If the printer does work, then the port is correctly set up and running, and your problems can only be with Mach 3 configuration. Mach 3 is extremely good, it works with just about any system running Windows on a PC and does not need any alterations. I would still have a good look at you configuration.

Config/Ports and Pins - page 1 Port address 378
Config/Ports and Pins/Input Signals - Enable Green, Port 1, Pin - whatever pin you are using, Active Low ??? (Do your switches send at 0v signal to the computer or a +5 - this is normally 0v, since the input pins are normally held high by internal resistors)

Which brings me to another point - in testing your port, is the testing program detecting the inputs of the switches, or merely the fact that they are held high - are you sure that your switches are properly wired to give a signal to the computer. You do not mention if you are using a break-out board. If you are not, or it is a non-powered breakout board, as mine is, then you require your switches to be closed to 0v to send a signal to the computer. If you are using a break-out board, then you will need to read the instructions, since some boards have peculiar biasing arrangements for the common wire to input switches.

Keep going the answer is there SOMEWHERE !!! :-\ :-\

Title: Re: Problems with Parallel Port inputs on Motherboard
Post by: RChadwick on July 29, 2008, 10:21:25 PM
I figured out. I guess a night of sleep helped. I re-used the profile from another computer, but it was set as 'Emulated' for some reason. Unchecking that fixed things. The auto setup still doesn't work, but I'm not concerned at the moment. Thanks again!