Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: N4NV on January 31, 2009, 12:04:49 AM

Title: DigiSpeed-SD and CW CCW control
Post by: N4NV on January 31, 2009, 12:04:49 AM
I am installing a Homann DigiSpeed-SD speed control for my lathe VFD.  I have the speed part running great.  I have not been able to get the CW and CCW relays working right though.  I am a little stumped.  In the Mach motor outputs screen, you can set the step and direction pins.  But in the Spindle set up screen, you can set the CW and CCW outputs through outputs 1-6.  Why would you set the direction pin in the motor outputs screen if you are setting the CW and CCW outputs in the Spindle set up screen?  I am using pin 14 for the step pulse.  I need to use pins 8 and 9 for direction.  Can someone give me a clue as to how to set up Mach for the CW and CCW directions?

Thanks

Vince
Title: Re: DigiSpeed-SD and CW CCW control
Post by: Peter Homann on January 31, 2009, 01:31:35 AM
Hi Vince,

The CW and CCW outputs on the spindle tab are enable signals for the spindle when it turns on. On some VFDs you have a separate input to enable  the spindle for CW direction and another for CCW direction. You cannot use the spindle  dir line to do this.

What I usually do in your case is use the spindle dir line to control one relay on the DC-06 for spindle direction control.

The other relay on the DC-06 is controlled by the CW and CCW outputs on the spindle tab. Set the output number for the CQW and CCW control to the same output number. Then use pin for this output to control the 2nd relay on the DC-06. This 2nd relay now becomes an enable relay for the spindle  as it turns on when a spindle command CW or CCW is issued.


I hope this is clear.

Cheers,


Peter.
Title: Re: DigiSpeed-SD and CW CCW control
Post by: jimpinder on January 31, 2009, 05:18:40 AM
Vince -

As Peter said - that depends on your own particular motor control system. The Digispeed provide a voltage signal (usually 0 - 10v) to control the speed, as you seem to have sorted out.

The direction depends on what your own VFD demands.

Mine is an Omron and (as well as the voltage input for the speed) it reqiures two sets of wires connecting to give CW or CCW rotation. You can connect none, or either pair, but not both. Both is an error and will stop the Omron.

The standard instruction for CW rotation in GCode is M3, for CCW is M4 and off is M5. The M3 and M4 signal, as you say uses two output pins from Mach. I have used pins 8 and 9 to drive two 5v relays. (I actually made up a board with four relays, all driven by a Darlington array, so I could do the coolant as well) Darlington arrays are cheap (less than £1 for an eight unit array) and they run directly from your computer output. They are rated at 1/2 amp for each output, so plenty of meat there.

The advantage of using relays is that it means that your VFD is completely electrically isolated from you computer and other electronics, and as Peter says in his blurb with the Digispeed, sometimes the voltages are not to be trusted.

On the Mach screens, you need to untick the "disable spindle relays box" on the Config/Ports and Pins/Spindle Output page and assign M3 and M4 to outputs (usually 1 and 2.) On the Config/Ports and Pins/Outputs page, you then need to assign Outpus 1 and 2 to pin numbers, and enable them. Peter seems to have coped with this in the Digispeed, so you will have to read the blurb to see if they are active low or not.

I personally have used the PWM output from the Mach to control the Digispeed. My Digispeed could be altered to suit either. This comes out of Mach 3 on a pin specified on the "Step" output of the spindle motor drive. (The Dir" pin is ignored).

So - in a word, there is no simple way - it depends on what your VFD requires. Have a look at that first, and work your way back from there.












Title: Re: DigiSpeed-SD and CW CCW control
Post by: N4NV on January 31, 2009, 11:03:57 AM
My VFD is a GE AF-300.  As far as I can tell from the documents, it does not have a separate enable input.  There is a COM, FWD and REV input terminals as well as two terminals for the 0 to 10V input for speed.  If nothing is connected between COM and either FWD or REV it will not run. 

Peter, what you wrote is not clear at all.  I don't understand how the CW and CCW settings on the spindle tab can control the same output.  If I am using pin 8 and 9 for my direction (I am using pin 14 for the step), then I would set up the motor output for 14 and 8 (step and dir), then set pin 9 as output 1 in the ports and pins/output tab, and in the spindle setup and have both the CW and CCW settings control output 1?

Thanks

Vince
Title: Re: DigiSpeed-SD and CW CCW control
Post by: HimyKabibble on January 31, 2009, 11:14:52 AM
My VFD is a GE AF-300.  As far as I can tell from the documents, it does not have a separate enable input.  There is a COM, FWD and REV input terminals as well as two terminals for the 0 to 10V input for speed.  If nothing is connected between COM and either FWD or REV it will not run. 

Peter, what you wrote is not clear at all.  I don't understand how the CW and CCW settings on the spindle tab can control the same output.  If I am using pin 8 and 9 for my direction (I am using pin 14 for the step), then I would set up the motor output for 14 and 8 (step and dir), then set pin 9 as output 1 in the ports and pins/output tab, and in the spindle setup and have both the CW and CCW settings control output 1?

Thanks

Vince

You need to setup one relay to connect COM to FWD, to be activated on M3/Spindle CW.  The other relay needs to be setup to connect COM to REV, to be activated on M4/Spindle CCW.  To do this, define two pins, each connected to one of the OUTPUT #n outputs, then go to Config->Portat & Pins->Spindle Setup, and put those two OUTPUT #n numbers in the two boxes under Relay Control.

Regards,
Ray L.
Title: Re: DigiSpeed-SD and CW CCW control
Post by: N4NV on January 31, 2009, 11:17:11 AM
Peter, I wired it as you suggested.  When I enter an M3, both relays energize, M4 turns off relay 1, and M5 turns them both off.  I think I can get it to work as long as I don't enter and M4 after an M3, I would have to enter an M5 first.  I will give it a try and let you know.

Vince
Title: Re: DigiSpeed-SD and CW CCW control
Post by: N4NV on January 31, 2009, 12:35:49 PM
OK, I got it working properly.  In motor outputs under ports and pins I set up the spindle motor as step pin 14, direction pin 0.  Under output signals I entered output 1 as pin 8 and output 2 as pin 9.  In the spindle setup tab I entered CW as output 1 and CCW as output 2.  I wired pin 8 to relay 1 and pin 9 to relay 2 on the DigiSpeed board.  Now an M3 command will turn the spindle CW and an M4 with turn it CCW, M5 will stop the spindle.  I can enter an M4 command while the spindle is turning CW and it will stop and reverse direction without a hiccup.  Same with an M3 while M4 is running. 

An interesting item: When I first power up my lathe, both relays on the DigiSpeed board energize.  That means that my VFD is getting both a FWD and REV signal.  When the computer comes up and Mach is running, the PMDX-122 board enable the output signals and both relays on the DigiSpeed de-energize.  The VFD does not seem to mind the mixed direction signals as long as no speed is commanded at the same time.

Thanks for everyone's help.

Vince
Title: Re: DigiSpeed-SD and CW CCW control
Post by: HimyKabibble on January 31, 2009, 03:09:17 PM
OK, I got it working properly.  In motor outputs under ports and pins I set up the spindle motor as step pin 14, direction pin 0.  Under output signals I entered output 1 as pin 8 and output 2 as pin 9.  In the spindle setup tab I entered CW as output 1 and CCW as output 2.  I wired pin 8 to relay 1 and pin 9 to relay 2 on the DigiSpeed board.  Now an M3 command will turn the spindle CW and an M4 with turn it CCW, M5 will stop the spindle.  I can enter an M4 command while the spindle is turning CW and it will stop and reverse direction without a hiccup.  Same with an M3 while M4 is running. 

An interesting item: When I first power up my lathe, both relays on the DigiSpeed board energize.  That means that my VFD is getting both a FWD and REV signal.  When the computer comes up and Mach is running, the PMDX-122 board enable the output signals and both relays on the DigiSpeed de-energize.  The VFD does not seem to mind the mixed direction signals as long as no speed is commanded at the same time.

Thanks for everyone's help.

Vince

You really should fix that power-up problem.  Someday, if one of those relays fails, your lathe will power-up with the spindle running, which could be dangerous.  Using the Mach charge pump should solve that problem.

Regards,
Ray L.
Title: Re: DigiSpeed-SD and CW CCW control
Post by: Hood on January 31, 2009, 03:26:37 PM
Yes think if I remember pin 17 is dedicated to the Chargepump on the PMDX122.
Hood
Title: Re: DigiSpeed-SD and CW CCW control
Post by: N4NV on January 31, 2009, 04:31:45 PM

You really should fix that power-up problem.  Someday, if one of those relays fails, your lathe will power-up with the spindle running, which could be dangerous.  Using the Mach charge pump should solve that problem.

Regards,
Ray L.

I have an EPO circuit that prevents anything from running regardless of what the computer, BOB, DigiSpeed etc wants to do.  I shut down and start up with the EPO tripped.

Vince
Title: Re: DigiSpeed-SD and CW CCW control
Post by: Peter Homann on February 01, 2009, 05:09:57 AM


An interesting item: When I first power up my lathe, both relays on the DigiSpeed board energize.  That means that my VFD is getting both a FWD and REV signal.  When the computer comes up and Mach is running, the PMDX-122 board enable the output signals and both relays on the DigiSpeed de-energize.  The VFD does not seem to mind the mixed direction signals as long as no speed is commanded at the same time.

Thanks for everyone's help.

Vince


Vince,

I'm not intimately familiar with the breakout board you are using but the DC-06 DigiSpeed-SD has a  feature that may help.

There is a jumper (JP1)  EDGE to select whether you want to use active hi or active lo inputs. My guess is that you should change the position of JP1 along with swapping  the active signal state in the Mach3 setup.


When the breakout board is powered up without Mach3 running it is setting the output lines to the DigiSpeed-SD to the level that turns on the relays. When Mach3 turns on it then swaps the state of the output lines turning off the Relays.

So, Change JP1, and swap the active state of the Spindle Step output and the 2 outputs for the spindle CW and CCW outputs and you may find that fixes the problem.

Cheers,


Peter.
Title: Re: DigiSpeed-SD and CW CCW control
Post by: jimpinder on February 01, 2009, 02:45:31 PM
The reason is that as you power up, pins 8 and 9 are normally off.(There is no power connected)  In this position, this is ON (the pins on a PC are normally high in use (i.e. high is off). Therefore, if you connect the power to your relays before the computer is fired up this will happen.

The safest way (if you read your Mach blurb) is to turn on the PC and let it run up, select Mach 3, and when this is on the screen, then turn on your machine and accessories.

I must admit this is easier to preach then practice, although my VFD, an Omron, flashes an alert if both CW and CCW pins are on simultaneously.
Title: Re: DigiSpeed-SD and CW CCW control
Post by: N4NV on February 01, 2009, 03:20:58 PM

The safest way (if you read your Mach blurb) is to turn on the PC and let it run up, select Mach 3, and when this is on the screen, then turn on your machine and accessories.


Which is what I do will all my machines.

Vince
Title: Re: DigiSpeed-SD and CW CCW control
Post by: N4NV on February 01, 2009, 09:52:23 PM

So, Change JP1, and swap the active state of the Spindle Step output and the 2 outputs for the spindle CW and CCW outputs and you may find that fixes the problem.
Cheers,
Peter.

Peter, that worked.  It may have been necessary because I have a PMDX-122 board set up for Gecko drives with the common set at 5V.  Changing JP1 and inverting my relay output signals enables the DigiSpeed to power up with the relays off.

Thanks again.

Vince
Title: Re: DigiSpeed-SD and CW CCW control
Post by: Peter Homann on February 01, 2009, 10:01:11 PM

So, Change JP1, and swap the active state of the Spindle Step output and the 2 outputs for the spindle CW and CCW outputs and you may find that fixes the problem.
Cheers,
Peter.

Peter, that worked.  It may have been necessary because I have a PMDX-122 board set up for Gecko drives with the common set at 5V.  Changing JP1 and inverting my relay output signals enables the DigiSpeed to power up with the relays off.

Thanks again.

Vince


Hi Vince,

I'm glad it worked for you.

The reason that the jumper is there is to solve exactly the problem that you have experienced. It allows you to configure the DC-06 DigiSpeed inputs to match the breakout board outputs' polarity.

Cheers,

Peter.

Title: Re: DigiSpeed-SD and CW CCW control
Post by: Peter Homann on February 01, 2009, 10:31:58 PM


Peter, that worked.  It may have been necessary because I have a PMDX-122 board set up for Gecko drives with the common set at 5V.  Changing JP1 and inverting my relay output signals enables the DigiSpeed to power up with the relays off.

Thanks again.

Vince

Hi Vince you should also change the sense of the spindle step output as well. I guess it is not absolutely necessary as the step line is fed to a monostable.

Cheers,

Peter.