Hello Guest it is October 24, 2019, 01:15:42 AM

Author Topic: M3 / M4 Problem - PROBLEM FOUND!!!  (Read 3284 times)

0 Members and 1 Guest are viewing this topic.

Offline Mattw

*
  •  41 41
    • View Profile
M3 / M4 Problem - PROBLEM FOUND!!!
« on: November 18, 2009, 10:46:10 PM »
First my problem, then some gloat...

I have the spindle control set up with M3 as output #1 and M4 as output #6 (on the spindle tab of ports and pins)

When I call for spindle reverse, M4, output #6 comes on just like it should.
When I call for spindle forward, M3, output #1 AND output #6 both come on.

Luckily, my electricals prevent anything bad from happening with both forward and reverse active.  I suppose I could re-write the code for M3 and M4, but there is probably something else wrong.

Now for the gloat!  My machine is ALIVE!  I have 3 of the 5 axiis up and moving and running the sample roadrunner and scorpion programs.  My power drawbar works (hydraulic pump powered) and my spindle runs... in reverse... very well.

Anyhow, any help or suggestions would be greatly appreciated.

p.s. if you use a solid state relay meant for switching AC, and you try to switch DC with it, very odd things happen.
« Last Edit: November 19, 2009, 09:15:37 PM by Mattw »

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: M3 / M4 Problem (yes, I'm a noob)
« Reply #1 on: November 19, 2009, 07:45:35 AM »
Sounds weird, if you attach your xml maybe the problem can be found.
Hood
Re: M3 / M4 Problem (yes, I'm a noob)
« Reply #2 on: November 19, 2009, 07:57:51 AM »
The SSR with AC will sort of "latch" and will not unlatch untill you cut the AC ... even though the control side goes low.
Are you sure BOTH outputs are ON in MACH ? (check the led's with the SSR's disconnected) ?
Or is M4 "latched" when you call M3 ?

Offline Mattw

*
  •  41 41
    • View Profile
Re: M3 / M4 Problem (yes, I'm a noob)
« Reply #3 on: November 19, 2009, 01:06:04 PM »
Ah, I should not have put that P.S. on there, as the SSR issue is completely separate from my M3/M4 Issue... No SSR's in that loop.

I'll post my XML tonight.
Re: M3 / M4 Problem (yes, I'm a noob)
« Reply #4 on: November 19, 2009, 01:22:45 PM »
No prob.... :)

Offline simpson36

*
  •  1,374 1,374
    • View Profile
Re: M3 / M4 Problem (yes, I'm a noob)
« Reply #5 on: November 19, 2009, 01:57:09 PM »
When I call for spindle reverse, M4, output #6 comes on just like it should.
When I call for spindle forward, M3, output #1 AND output #6 both come on.

Anyhow, any help or suggestions would be greatly appreciated.

Considering the behavior you observe, it seems to me you could simply use output#6 for on/off and output#1 for direction . . . . maybe I'm missing something.

Anyway, what I want to contribute is that I played with this issue a bit and could never get Mach to switch the direction prior to turning the spindle on. This causes the spindle to reverse at speed . . not good. Recently, I gave up on that and simply rewrote the M3, M4 and M5 using separate outputs for on/off and directions and organizing the proper sequence. Very easy and it works beautifully.

Many thanks to Ray and the fellow who indexed the new programmer's guide. This is my first use of it and time saving was enormous.  :-* :-*

Offline Mattw

*
  •  41 41
    • View Profile
Re: M3 / M4 Problem - PROBLEM FOUND!!!
« Reply #6 on: November 19, 2009, 09:54:34 PM »
As we all knew, it is not a bug with Mach, but simple operator headspace.

Here is what happened, if anyone is interested.

I'm using a spindle speed controller card that was "supposed to" take a step and direction signal and produce a 0-10v analog and fire a relay for a direction contact to the VFD.  Well, the inputs for the relays were not compatible with my BOB.  So, I went with separate relays for forward and reverse, but left the OLD direction pin set up in "ports and pins".  Well now you see it coming... that pin conflicted with the output for my reverse relay.

The odd thing was that it all seemed to work well until I tried to change the speed.  That's when the conflicting relay would spring to life and stop the spindle.  The odd thing, i suppose, is that it would stay screwed up until I restarted Mach (sometimes) or reboot the computer (always).

Anyhow, I set that direction to port 0 / pin 0 and all is as good as gold.

Mach kicks butt!  Thanks for listening to me ramble.