How do I set My Spindle CW/CCW output to be momentary?

  • SteveCorr
  • SteveCorr's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
24 Sep 2021 00:41 #221474 by SteveCorr
So I have been putting in a ton of time getting this mill working, and with help from this forum I'm, getting really close. Thank you

So here is where I'm getting stuck: my mill is set up with a Fernic-mini drive that I installed shortly before the LinuxCnc conversion, My mill is an old SuperMax, I have a variable speed head with no encoder. The Fernic drive was to enable me to use a 3 phase mill at my house with only single phase. The drive has several input methods, ie: 0-10v, 4-20ma, RS-485 and momentary contacts( start, reverse and stop). I'm using a 7i77 for control, and I have the push buttons which controlled the drive now wired to inputs on the 7i77 instead. How do I make the Spindle CW and Spindle CCW output pins only operate for a short time, like 1/4 -1/2 second? On reading what others have said it looks like it's a probably a ONESHOT command, but I have no idea how to implement that in the HAL file. I have considered just adding a oneshot relay to the control cabinet but that feels like a defeat, and I'd much rather do it in the software if someone wouldn't mind showing me how.
The drive currently lives at 60Hz because I intend to use the variable speed head until I can get and encoder onto the spindle, which may very well be a few years out.
 

Please Log in or Create an account to join the conversation.

More
24 Sep 2021 10:33 #221488 by aleksamc
I don't understand what you really need. Possibly if you want to run your servodrive only in some intrinsic way.
You may try to use hal component timedelay and some logic, for example when timedelay elapse, then turn of drive.
You can use some internal plc (classiclader plc) or external plc (programmable logic controller).

Or if your servodrive works in the way that it accelerates when input 1 true and decelerates, when inlut 2 true. Possibly you can try to use pid-regulator and D-part, when divirgent signal is positive then input 1 true, when negative - input 2 true. But you return back to classicladder plc and you need encoder feedback for this.

Please Log in or Create an account to join the conversation.

More
24 Sep 2021 13:18 #221495 by Aciera
the 'oneshot' component seems to be a solution indeed: linuxcnc.org/docs/html/man/man9/oneshot.9.html

Maybe something along these lines:

loadrt oneshot names=oneshot.cw,oneshot.ccw
addf    oneshot.cw                                          servo-thread
addf    oneshot.ccw                                        servo-thread

setp oneshot.cw.width           0.5
setp oneshot.ccw.width           0.5

net spindle-cw                  <=  spindle.0.forward             => oneshot.cw.in
net spindle-ccw                 <=  spindle.0.reverse            => oneshot.ccw.in
net spindle-cw-pulse         <= oneshot.cw.out                 => your_output_to_vfd_forward
net spindle-ccw-pulse       <= oneshot.ccw.out                => your_output_to_vfd_reverse
 
The following user(s) said Thank You: SteveCorr

Please Log in or Create an account to join the conversation.

More
24 Sep 2021 14:47 #221499 by OT-CNC
I think I have wired a Fuji VFD before to a spinx1 and didn't have to do anything special. Should be similar with the 7i77?
Are you sure you need momentary? 

Please Log in or Create an account to join the conversation.

More
24 Sep 2021 17:29 #221512 by tommylight

Are you sure you need momentary? 

Wondering the same thing since this was posted ...

Please Log in or Create an account to join the conversation.

More
25 Sep 2021 02:04 - 25 Sep 2021 03:03 #221528 by spumco
I may be way off base, but I'm guessing the OP has a set of CW/CCW holding relays buried in the original control.  That would explain the FW/REV/OFF momentary pushbuttons, and why he thinks he needs a momentary output to start the spindle.  That, or the original VFD has a really oddball internal control scheme.

OP - have you got the OEM wiring diagram, or even some photos of the original control cabinet & drive?  If I'm right there's probably a way to sort this out without using the ONESHOT function and possibly get rid of some unnecessary relays.

EDIT - OP... did you mean a Fuji "Frenic" drive?  Not "Fernic"?  If so, what model?  This should be easy to sort out.

EDIT #2 - OP - what FGPA card do you have ahead of the 7i77?  The Fuji Frenic-Mini needs simple switches for FWD/REV - not the sourcing outputs from the 7i77.  Assuming I'm right about your VFD, you could use two small relays driven by 7i77 outputs to signal FWD/REV to the VFD.  And run the alarm output to a 7i77 input as an external E-stop or fault signal.  That still doesn't give you speed control, but it'll get the VFD turning.


 
Attachments:
Last edit: 25 Sep 2021 03:03 by spumco. Reason: Brain Fart Recovery

Please Log in or Create an account to join the conversation.

  • SteveCorr
  • SteveCorr's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
25 Sep 2021 16:33 #221563 by SteveCorr
FRENIC-Mini FRN0012C2S-7U www.wolfautomation.com/vfd-3hp-230v-single-phase-12a/

I wired the drive initially, I only use it set at 60 hz currently as speed control is done with the vari-speed head on the mill. at some point i'll get an encoder on spindle and change the setup to an analog voltage +-10v for speed control, but that will require me to change the vari-speed to a constant speed head. When I installed the drive, which is really only being used as a phase converter with a soft start, I set up the drive as a 3 button input, CW, Stop and CCW
I wired it to this drawing
americas.fujielectric.com/files/MINI%28C...op%20FECA-AN-165.pdf

If I have other options for control, or if I'm doing this wrong I'd love to know. Sorry for not being on yesterday, work took priority as we had customers without power.

I have 6i25 ==> 7i77 setup

Please Log in or Create an account to join the conversation.

More
25 Sep 2021 18:54 #221570 by spumco
You aren't doing it "wrong", there are many ways to control a VFD and if it works - great.  But I'll offer some inexpert advice on the two command schemes.  Hopefully someone else will chime in and add to the discussion.

Scheme #1 - (your current one) appears to be intended for manual push-buttons.  A momentary signal is sent to one of two inputs, and the VFD will start turning one direction and keep turning until a 3rd input is momentarily triggered (stop).  If the other direction/run input is triggered, the VFD wil decel, reverse, then accel to commanded frequency and continue running until the stop is triggered.

I believe this scheme is intended to be used with pushbuttons so in the case of a power outage or other issue, a latching switch isn't left in one run direction or the other - i.e. resulting in an automatic restart, perhaps with unintended consequences.  There may be other parameters which would avoid an auto-restart, but the 3-wire scheme is easy to implement and fairly intuitive for anyone used to industrial equipment.

Scheme #2 - (what I'm suggesting) uses a more "standard" method of control when an outside component (PLC, LinuxCNC, etc.) is used to initiate the start/stop/direction commands.  In this case, the VFD is programmed to run in one direction when an input is triggered and keep running as long as that input is active.  If the input signal is 'lost' (opened), the VFD stops the motor.  Reversing is identical and this scheme only requires two inputs.

In the case of manual switches I would agree that this may be less safe than Scheme #1.  With a manual switch the VFD could be powered down and left in a RUN condition with a latching manual switch.

However, in the case of external computer/PLC control, removal of a signal (intentionally, or due to broken wire) results in the VFD stopping.  In Scheme #1, you have to initiate a STOP signal to stop the VFD (I'm not including dropping the main VFD contactor).  In Scheme #2, the computer/PLC/Mesa board has to maintain an output (closing the VFD input contacts) to keep the motor running.

The 7i77 uses sourcing outputs and the VFD needs dry contacts to trigger the inputs.  An easy way to connect the two (mentioned in previous post) would be to drive two NO SPST relays with two 7i77 ouputs, and the relay contacts would make the connection between the VFD FWD/REV digital inputs and digital input COM.  The relays could be very small 'card' relays as they're only switching milliamps on the VFD inputs and are extremely unlikely to have the contacts weld shut (resulting in no way to command a STOP).

To expand the theme, you could get a small card relay module with 5 individual SPST relays, each connected to an individual VFD digital input (X1, X2, X3, FWD, REV).  At minimum, this would permit one of three different pre-set frequencies (instead of just 60hz).  Or one of them could be programmed as an external fault signal to the VFD, or any of the other functions available (see the manual on possible digital input functions).

NOTE - read the VFD manual to see if there are diode requirements for switching the digital inputs on/off.  Some VFD's/PLC/Whatever don't like voltage spikes on the inputs caused by relays and a flyback diode is required.

So, have a think about the above and see if it makes sense to you.  I asked about the FGPA card as the 7i77 doesn't appear to have analog outputs for furture speed control, but after reading the VFD manual it looks like it can take a PWM signal.  I think - think - that one of the 7i77 outputs can be set up via firmware as a PWM output that may do what you want with no additional hardware/cards needed.

If anyone else reading this has an opinion please join in.

Regards,
Ralph

Please Log in or Create an account to join the conversation.

More
25 Sep 2021 20:04 - 25 Sep 2021 20:31 #221572 by chris@cnc
Okay now I understand the subject too.
At first you were only looking for start / stop pulse with oneshot.
But you would like install correct speed control in future, right?
First, you already have good documented VFD and should be able to work with the manual.
I have this VFD for my band saw. I switch on by  button and setup speed on VFD control panel.
You can do that for beginning as well.
Second, the VFD has logical inputs. With Paramteter you can setup fixed speeds to these inputs. E.g. bit 1 -> 1000rpm;
Bit 2 -> 2000 rpm; Bit 1 + 2 -> 3000rpm.
Third, terminals 11 and 12 on VFD is analog 0-10V input. If you give 5V input, your VFD gives 50% power to motor.
Only I am wondering about this 60Hz. 400Hz is usual and maximum voltage is set with parameter F05. I guess 200V.
With 5V input, VFD would give 200Hz out and  Motor rotates   with 50% speed. The 7i77 has analog outputs and can do that. So you can also program speed in Linuxcnc without encoder.
What kind of spindle motor do you have? 

Regards Chris
Last edit: 25 Sep 2021 20:31 by chris@cnc. Reason: Typo

Please Log in or Create an account to join the conversation.

More
25 Sep 2021 20:24 #221574 by spumco

 Only I am wondering about this 60Hz. 400Hz is usual and maximum voltage is set with parameter F05.
 


It's a Supermax mill - like a Bridgeport.  Has a pretty standard 3p induction motor and likely a nameplate frequency of 60hz (1800rpm).  The speed control as the OP mentioned is a variable pulley system.  You crank a knob/wheel on the side (only when motor is running) to adjust the speed up and down (opens/closes the variable pitch pulleys).

It might have a two-speed motor and/or a back-gear like some Bridgeports, but the OP would have to report back on that one.  These sorts of arrangements can be a little tricky to get under full CNC control - hence the OP's earlier statement about a spindle encoder.

With a direct spindle encoder he could, in theory, attach a stepper motor to the pulley adjustment wheel and have LCNC start the main motor and a gentle PID loop would adjust the pulley ratio until an AT-SPEED signal was met before continuing the program.

 

Please Log in or Create an account to join the conversation.

Time to create page: 0.155 seconds
Powered by Kunena Forum