Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: superbec on March 26, 2008, 11:18:07 AM

Title: mach don't control the spindle switch
Post by: superbec on March 26, 2008, 11:18:07 AM
u can see the setings atached.

i tried a lpt tester program and the switch works on pin 8 so the problem is with the mach setings.

also tried lots of diffrent setings , i installed a diffrent version of mach.. nothing happens.

 ???

in the "diagnostics" tab the "output 1" is blinking red when i input "m3" command.



Title: Re: mach don't control the spindle switch
Post by: Hood on March 26, 2008, 12:47:53 PM
What have you got in your motor tuning for the spindle?
Have you tested at the pin on the port with a volmeter?
What happens when you M4 in MDI?

Hood
Title: Re: mach don't control the spindle switch
Post by: superbec on March 26, 2008, 01:47:38 PM
1 i have nothing at the motor tuning for spindle, didn't realize i should change something there, i only want to switch the relay on/off

2 i tested with the voltmeter, it get 2.7 volts always m3/m4/m5 changes nothing.

3 nothing is happening.

the relay only switches with the lpt program.

another thing i just found, when running a gcode program (generated with sheetcam) it switches 2-3 times/second.

u told another guy on the forum to use a macro for switching a weldinng machine on/off... this is kind of the same thing..

tx for your patience.
Title: Re: mach don't control the spindle switch
Post by: Overloaded on March 26, 2008, 02:13:53 PM
Looks like you are using Relays and Step/Direction Motor Control.
I don't believe you use Relays with Step/Dir.
RC
Title: Re: mach don't control the spindle switch
Post by: superbec on March 26, 2008, 02:21:51 PM
the guy who made the driver board gave me the setings.. and 5-6 hours of online support .. but we couldn't switch the relay.. :(

 >:(

 i will try and disable the motor control tomorow and see what happens but i'm pretty sure i've done that at some point
Title: Re: mach don't control the spindle switch
Post by: Hood on March 26, 2008, 04:26:33 PM
As RC says you have your relay connected but also you are using step and direction, If you are using step/Dir then it is treated just like an axis, ie you dont need relays.
What kind of spindle motor do you have, is it a servo/stepper?

Hood
Title: Re: mach don't control the spindle switch
Post by: superbec on March 27, 2008, 06:24:28 AM
i'm not using a spindle , i try to control the plasma torch on/off with that relay.

i tried with the motor controll unchecked and the spindle relays on.. nothing happens, tried the other way too.. relays off and motor control on still nothing.

if i leave the lpt tester program in background when runing a gcode in mach , the relay is switching on/off 2 times/sec but nothin with m3,m4 or m5 or the torch on/off button .


i installed a new version of mach.. still nothing.

 
Title: Re: mach don't control the spindle switch
Post by: Hood on March 27, 2008, 08:18:39 AM
Attach your xml file and we can have a look and see if we can figure out the problem.
 Hood
Title: Re: mach don't control the spindle switch
Post by: superbec on March 27, 2008, 09:04:37 AM
i tried with a diffrent cnc program an it controls the switch ... but i like mach3 and allready bought a license

here's the xml
Title: Re: mach don't control the spindle switch
Post by: Overloaded on March 27, 2008, 09:10:04 AM
Your XML says "Demo Version".
Is your lic. file in your Mach3 folder?
May make a difference ? ? ?
RC
Title: Re: mach don't control the spindle switch
Post by: Hood on March 27, 2008, 09:42:32 AM
You have MaxCL mode enabled, try without that.
Hood
Title: Re: mach don't control the spindle switch
Post by: superbec on March 27, 2008, 09:47:07 AM
oh i forgot to copy the license..  anyway it makes no diffrence.

without maxcl my x-y axes don't move. (tried that too)

how do ppl normaly control the plasma ? i couldn't find any post with the same problem.

later edit.. its working without MAX CL ... i mean it switches .. but i lose y axis and x is moving in oposite direction
Title: Re: mach don't control the spindle switch
Post by: superbec on March 27, 2008, 09:56:48 AM
with this setings it's trigering the relay .. but it's useless cause i don't have x-y movement
Title: Re: mach don't control the spindle switch
Post by: Hood on March 27, 2008, 10:00:32 AM
Do you have MaxNC hardware? if not then you dont want to use MacNC. What drives do you use, are they step/dir?
Hood
Title: Re: mach don't control the spindle switch
Post by: superbec on March 27, 2008, 10:32:10 AM
i got the driver board from dubble  @ www.cncdrive.com. and yes it's step/dir ... and stepper motors.

i'm very pleased with the suport and delivery time,  if i change the driver i will go for a servo package..

any ideeas of other setings that will work with maxcl enabled?
Title: Re: mach don't control the spindle switch
Post by: Jeff_Birt on March 27, 2008, 11:05:16 AM
If you are just needing a 'Spindle On' signal from Mach to drive a relay then 'Step and Direction' is entirely the wrong thing to be setting (makes me wonder if the guy you bought you BoB from knows anythign about Mach). Turn off your spindle related stuff in ports and pins and then click on the 'Spindle Setup' tab, look in the top left corner in the section which is coincidently labeled "Relay Control". This is where you set an Mach Output signal that is used for the relay. What is an output signal you ask?

Click on the 'Output Signals' tab, here you will see a list of signals within Mach that you can map to (attach to) a pin on your LPT. If you are not using any of these outputs, just set 'Output #1' to the correct port and pin for your relay and then enable it. Now go back to the 'Spindle Setup' tab and make sure that both CW and CCW (Anti-clockwise for you Brits) are set to Output #1 and that 'Disable Spindle Relays' is NOT checked.
Title: Re: mach don't control the spindle switch
Post by: superbec on March 27, 2008, 12:17:24 PM
@Jeff yes it's working like u said but only with MaxNC disabled .. and my motors don't work without MaxNC enabled..

so i have 2-3 options, use diffrent drivers,use diffrent software or wait for a miracle :D
 
Title: Re: mach don't control the spindle switch
Post by: Hood on March 27, 2008, 01:08:46 PM
ok as an experiment set each motor to port 0 for both direction and step and keeping MaxNC mode active see if your motors still work.
 I dont have time at the moment to look at your hardware specs but let me know which drives and breakout you have and I will look later.
Hood
Title: Re: mach don't control the spindle switch
Post by: Jeff_Birt on March 27, 2008, 02:36:26 PM
You also need to uncheck the step/dir under Spindle motor control. Again, it sounds like the guy your bought this from doesn't really know what he is talking about (as far as Mach goes).
Title: Re: mach don't control the spindle switch
Post by: superbec on March 27, 2008, 02:41:28 PM
i'll do that tomorow first thing when i get to the shop.

i'll ask Dubble to post the driver specs, it's only one board controling 3 axis
Title: Re: mach don't control the spindle switch
Post by: Dubble 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.
Title: Re: mach don't control the spindle switch
Post by: Hood 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
Title: Re: mach don't control the spindle switch
Post by: Dubble 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.

Title: Re: mach don't control the spindle switch
Post by: Hood 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
Title: Re: mach don't control the spindle switch
Post by: Dubble 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. :(

Title: Re: mach don't control the spindle switch
Post by: Hood 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
Title: Re: mach don't control the spindle switch
Post by: Dubble 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.
Title: Re: mach don't control the spindle switch
Post by: superbec 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.

Title: Re: mach don't control the spindle switch
Post by: Hood on March 28, 2008, 07:58:45 PM
:) great you are sorted now.

Hood