Hello Guest it is March 28, 2024, 09:53:59 PM

Author Topic: controlling VFD with mach  (Read 5132 times)

0 Members and 1 Guest are viewing this topic.

controlling VFD with mach
« on: December 08, 2007, 11:26:17 AM »
Hi I am doing a retrofit of an older enco 13x40 lathe . I am using the c11 board from cnc4pc and would like to control a teco fm100 vfd . I understand attachment of the analog out put to the terminals in the vfd . In the vfd there is a common terminal and a forward and reverse terminal . Grounding either the FWD or REV term to the comm detirmines the direction the of rotation for the spindle motor.

 On the cnc4pc board there are a pair of relays with both NO and NC contacts. One relay is controlled by pin 1 on input and the other is controlled by pin 16. I have the comm wired to both relays and the the FWD on the NO of one relay and the REV on the NO of the

How do I go about configuring mach3 to send a signal to pin 1 when an M03 command is given and pin 16 when M04
apologies for the newb question , just trying to finish up my instal and am new to mach

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: controlling VFD with mach
« Reply #1 on: December 08, 2007, 01:00:58 PM »
I would just use one relay but use both   the NO and NC outputs from it, then all you need to do is set the state of the  pin to go forward or reverse. This would also add a safety feature as it would be impossible for both forward and reverse to be active at the same time, which could happen with the two seperate relays being used.

Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: controlling VFD with mach
« Reply #2 on: December 08, 2007, 01:07:49 PM »
Meant to say that if you opened your M3 macro from the Editer in Mach (Operator menu then VB Script Editor) you then would put
ActivateSignal(OutPut*)

The * would be the output you were using

Then the same would be done in the M4 macro except this time Use
DeActivateSignal(OutPut*)

Hood

Re: controlling VFD with mach
« Reply #3 on: December 08, 2007, 01:44:01 PM »
thank you  :)
moved rev to the NO side of the same relay
Re: controlling VFD with mach
« Reply #4 on: December 08, 2007, 02:02:11 PM »
I attached my rev term in the vfd to the NC term on the and have attached the forward to the NO term on the relay. This seems it will normaly cause my spindle to turn counterclockwise when the relay is not energised and will cause the motor to run clockwise when relay is energized.

When I open the m3 macro with VB editor  it reads "   DoSpinCW()  "   
The m4 macro reads  " DoSpinCCW() "
My relay is on pin 16
If I understand correctly I need to add  "ActivateSignal(OutPut16)"  to my m3 macro to send the relay a signal thru pin 16 , energizing the relay and allowing the spindle motor turn in a clockwise direction  and add "DeActivateSignal(OutPut*)" to my m4 macro .

Do I add these commands in place of the "DoSpin" or just place them in addition to

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: controlling VFD with mach
« Reply #5 on: December 08, 2007, 02:03:10 PM »
OK so you will need to change the M3 and M4 VB around, ie M3 is DeActivate and M4 is Activate.

Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: controlling VFD with mach
« Reply #6 on: December 08, 2007, 02:26:31 PM »
sorry never noticed your next post, you must have posted as I was writing mine.
Anyway you replace the DoSpin with the DeActivate, Activate etc

Hood
Re: controlling VFD with mach
« Reply #7 on: December 12, 2007, 09:36:40 AM »
Well I wired my vfd forward and reverse pins to the same relay , one on NO the other on NC . My Vfd doesnt have a seperate input to turn the spindle motor on so when its plugged in in the configuration above it starts in the direction thats attached to the nc pin on the relay. I am using this same VFD on my deskcnc setup and I have two relays, one that pulls the fwd to grnd for fwd and the other that pulls the rev term to ground for reverse. When either of these term(fwd or reverse) is pulled to the common pin that starts the rotation in that direction. Its been running fine for a couple of years and dont mind wiring this one the same , I have two relays on board that are not being used, one at pin 1 , the other at pin 14.

Currently I have the common term in the VFD wired to the relay at pin 14 and the fwd term of the vfd wired to NO side the same relay. The rev pin and common are tied to the relay at pin 1
in the vb editor I opened the m3 file and changed the "DoSpin()" command with "ActivateSignal(OutPut14) "
I changed the m4 file to read "ActivateSignal(OutPut1) "
I changed the m5 file to read  "DeActivateSignal(OutPut14)" "DeActivateSignal(OutPut1)"


I can now click the spindle button on the screen and it turns the spindle on and off  , when I type m3 s3000 in the MDI line with the spindle motor off nothing is happening , same with m4 , m5 will not turn the spindle off when its running .
I am sure I am overlooking something simple, thanks for any help

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: controlling VFD with mach
« Reply #8 on: December 12, 2007, 01:51:38 PM »
OK, if you are using two relays then you can leave the M3, M4 and M5 the way they were previously  eg M3  was DoSpinCW()
Then go to Ports and Pins then Spindle Setup and make sure you have the Outputs for CW and CCW entered in the boxes and also that you have the Disable Spindle relays box unchecked.

Hood
Re: controlling VFD with mach
« Reply #9 on: December 13, 2007, 12:21:32 AM »
thank you