Hello Guest it is March 28, 2024, 02:16:25 PM

Author Topic: mach don't control the spindle switch  (Read 11880 times)

0 Members and 1 Guest are viewing this topic.

Re: mach don't control the spindle switch
« Reply #20 on: March 27, 2008, 03:35:04 PM »
Hi Guys,

We manufactures the stepper controller board, which "superbec" using.
The board uses step and direction signals as inputs and drives 3 steppermotors and there's a single closing contact relay on it.

The relay is connected to pin8 of the LPT port. There's a direct centronix connector on the board, so the LPT port can be wired directly to the board with a standard LPT printer cable.

This board is not a new design, especially I have designed it around 6 years ago and it is working well in many machines till we released it.
It does not include any special element, all motor step/dir inputs and relay input are simply opto-isolated and the step dir signals connected to microcontrollers, they drives the motors through power Mosfets.

I have contacted with Bec, and found out, that the relay and it's opto-coupler and it's driver transistor is not faulty, because with an LPT tester program, the relay can be switched on/off with simply changing the output-pin8.

So, the problem is located into Mach. It does not change pin8 output with M3 and M5 codes, I asked Bec to measure pin8's Voltage and MACH doesn't change Voltage level...
I'm also wondering about the problem why axis stops moving when MAXNC mode is disabled. (Our board does not have any MAXNC hardware, so it should be disabled)

With the same settings as Bec is now using the axis and relay works well at me and at some*100 users, so I wondering what can be the problem?!

I can only advice to reinstall MACH and/or try it out on another computer.

I appritiate if somebody have any idea about this problem, because at the moment I'm out of ideas about it.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: mach don't control the spindle switch
« Reply #21 on: March 27, 2008, 03:59:07 PM »
I would think the reason the relay is not working is because Bec's Mach is set to MaxCL mode. I do not know a lot about this mode as I have never used it but from what I understand it is used to interface Mach to MaxNC hardware. When any of the MaxNC modes are chosen the pins are asigned by Mach to conform to MaxNC hardware and can not be changed by the user.
  If you could supply a pinout for your board then we should be able to advise how to get thisi machine up and running correctly and not using MaxCL mode. I do not know what pin 8 in MaxCL mode is asigned to but it certainly seems that it is not a user configurable option.
Hood
Re: mach don't control the spindle switch
« Reply #22 on: March 27, 2008, 04:07:14 PM »
Thanks for the fast answer.

I also never used MAXNC mode and also only knows about it that it needs some special hardware which we do not have in our board.

The pinout of our board:

          pins
stepX - 2
dirX    - 3
stepY - 4
dirY   -  5
stepZ - 6
dirZ   -  7
relay  -  8

All step and directions and the relay is active high, I also recommend to use Sherline 1/2 mode, because it gives much smoother running for the steppers.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: mach don't control the spindle switch
« Reply #23 on: March 27, 2008, 04:20:42 PM »
OK that seems to be what Bec has set in Mach. I can think of only two or three reasons there are problems.
1. Bec has not got the motors wired to the correct pins as stated above.
2. The port cable that is being used is a crossover cable and as such is putting the signals from Mach to the wrong pins on your board.
3. Your board is not functioning correctly.

What I would suggest is that the wiring is gone over again to make sure it is correct, we all know how easy it is to get things mixed up especially when things are new to us.
 If the wiring is correct then I would use an ohm meter to check that pin 1 at one end of the cable goes to pin 1 t the other, same for pin 2, 3 etc etc.
If that is correct then hopefully Bec can get a scope and see where the signal is failing, a voltmeter could also be used if a scope is not available. First thing to do is unplug the cable from the board and connect the scope or meter to Pin3 and ground and jog the axis one way then the other and check that the pin goes from 5V to 0v depending on direction. Next do the same with pins 5 and 7. The step pins are next, with a scope its easy enough but if using a voltmeter set it to mV range and connect between pin 2 and ground and again jog the axis. What voltage you will see will depend on the pulserate set but all that is really needed is for a voltage to show, repeat for the other Step pins (4 and 6)
 If that all works fine then I can only suspect that there is some problem with the board itself altough this seems unlikely as it seems to work in MaxCL mode.

Hood
Re: mach don't control the spindle switch
« Reply #24 on: March 27, 2008, 05:24:29 PM »
Hi,

On the board, there's centronix-36 pin connector, therefor the cable cannot be cross-link, so that cannot be the problem.

The phisical wirings are only made with pluging the cable in... so he cannot make a mistake, only if cable is broken/damaged, but with another CNC controller program it runs well and relay is also working.

With an LPT tester program relay is also working and we can see that it is wired correctly to pin8.
So, the board is OK, because it's running with another controller program and pin to pin connection is good.

So I still just can say, that we separeted the error into MACH and sure that the cause of the problem is on the PC side!

On the other hand MACH is working e.g. at me with the same board and with the same settings, so I still do not see any logical reason for the problem. :(

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: mach don't control the spindle switch
« Reply #25 on: March 27, 2008, 05:33:10 PM »
OK didnt see any mention of another programme being used and working, so if all is ruled out then the parallel port needs to be looked at and tested with a scope or a voltmeter.
 Have you forwarded your xml that you have? if you have mach running the same hardware and there is no possibility of wiring being messed up then your xml will work unless there is a port problem or a corrupt Mach.

Hood
Re: mach don't control the spindle switch
« Reply #26 on: March 27, 2008, 07:15:50 PM »
Hi,

Hood, thanks for the good advice!
I have just sent my XML file to Bec, I hope the machine will work with it, because I have just wired up a stepper controller and tested the functions with these settings, so it must work with it, or if not something strange error is there.

I think if it will still not work then Bec should reinstall Mach.
Re: mach don't control the spindle switch
« Reply #27 on: March 28, 2008, 06:47:03 AM »
hey, thanks evrybody.. it's working now.

the cause of all this was the MaxNC seting , it overides evrything and i couldn't realise that cause the table was moving fine, i even had diffrent pins for the X motor that's why i loosed x movement when maxnc was disabled.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: mach don't control the spindle switch
« Reply #28 on: March 28, 2008, 07:58:45 PM »
:) great you are sorted now.

Hood