Hitachi VFD Connection

The VFD alarm signal to controller estop could potentially be nice to if controller “goes rouge”. I don’t know if the controller would even know if it’s own stepper commands weren’t being followed, but the VFD might sense something and send out the alarm.

By the way, I like your idea of requesting Onefinity to give controller ability to shut down if spindle speed is too far out of range. I don’t know if it can do that or not

As a machinist, not an electrician, all of the schematics and explanations flew over my head. That’s kind of the problem, though. This can be a somewhat highly technical environment to wade through even though a lot of what’s being discussed is in the realm of reasonable safety protocols.

I would wager that this would be easy enough to implement since the software is already monitoring spindle speed in real time. I’d implement a function to further monitor that data and pause the job / terminate the spindle with an M5 command in the event that the expected rpms don’t match the feedback rpms within a given range. Whether or not that range can be at the discretion of the operator or should be based on a hard-coded percentage is up to the developer, I suppose. As an example…

internal class spindle_check
{
    private void RPM_Check(int program_rpm, int feedback_rpm, status_rpm)
    {
        if (feedback_rpm <= program_rpm * 0.75) // if actual rpms drop 25% or more below programmed rpms
        {
            // pause the running program
            // send M5 command to terminate spindle
            // update UI with status "Spindle Fault" through status_rpm variable

        }
        else { // do nothing but keep the disco ball spinning and update UI with status "Spindle Okay" }
    }
}

Run that on a timer to scrutinize on a reasonable interval, done and done.

We’re in the same boat with the electronics.
Spindle feedback fault sounds useful in a lot of ways. @OnefinityCNC Any thoughts?

Thanks for the fantastic writeup! Just getting my ducks in a row to move the machine to a spindle and I’m curious if the built-in BRD requires a resistor for a 2.2kw?

I did not add a resister to my setup, and it seems to be working fine.

1 Like

Hey Martin,

The Onefinity has open-loop steppers, which means the controller does not sense whether steps are followed or not. It is a hobbyist machine which means operator usually stands besides the machine full of fascination, with the finger hovering the pause button :slight_smile:. If you have a larger budget and need reliability of unattended operation you can use closed-loop steppers, or servos together with linear encoders on glass scales, which provide feedback to the controller whether the movement was executed correctly or feed back the absolute position of axes respectively. The Onefinity Controller however does not support this.

The Onefinity CNC Controller sees overcurrent and short-circuit of steppers though. And stepper stalling (stall detection is a feature of the Texas Instruments DRV8711 stepper drivers).

The VFD by itself has nothing to do with the steppers of the CNC machine. However should the power needed to hold the spindle speed be exceeded beyond the set current limit (e.g. bit is stucked), the VFD will alarm.

Unlike the trim router, which is a series-wound commutated motor whose speed is dependent of load and with which the frequency of the alternating current has no effect, with a spindle, which is an asynchronuous induction motor, the speed is only dependent from the frequency the VFD produces, and the spindle will hold the speed nearly perfectly no matter what the load is (and if the load drives the current beyond the current limit that was set inside VFD, the VFD will trip and alarm). But if you choose at least a 2.2 kW spindle and you mill only wood, that will rarely happen. However the VFD may trip if you suddenly switch to a lesser speed by a large step and your brake resistor is not able to absorb the current produced by the spindle. A spindle is an induction motor, which immediately turns into being an induction generator if spinning with no power.

After the spindle upgrade, less fascination, a lot more intimidation. Needing full-body safety glasses at this point. :wink:

2 Likes

Hey Martin,

This is right, the Onefinity Controller and the Buildbotics controller do not support this (yet). (It is a feature requested on both).

Yes, see below.

It was not, this is perfectly possible with the Hitachi or Omron VFDs.

Temporarily Overriding ModBus Control on Omron and Hitachi VFDs

For this you have the “Force Operator Mode” (OPE) and the “Force Terminal Mode” (F-TM). While the users of the cheap chinese VFDs have to choose whether they either have manual control of the VFD on the front panel keypad and/or potentiometer, or to leave the control to the CNC controller via ModBus, and have to brachiate through the menus if they want to change this (once for speed control, and once again for RUN/STOP control), users of the Hitachi or Omron VFDs can simply wire a little switch to one of the Intelligent Input Terminals and assign either the OPE or the F-TM function to this input to to be able to use this little switch to temporarily override the assignment of speed and run/stop to ModBus control.

By wiring a little switch to one of the Intelligent Inputs 1-7 and programming this input to OPE or F-TM function, you can switch the selected mode on and off.

  • If you use the “Force Operator Mode” (OPE), enabling the switch will divert control from ModBus to control via the front panel keypad (with Hitachi/Omron, the front keypad is called the “Digital Operator”). This mode allows the use of the keys on the front panel to control spindle run/stop and speed.

    Hitachi WJ200 Front PanelOmron MX2 Front Panel

    Hitachi_WJ200_Keypad

    Omron_MX2_Keypad

  • If you use the “Force Terminal Mode” (F-TM), enabling the switch will divert control from ModBus to the digital and analog inputs to control run/stop and speed. For run/stop, usually you use Intelligent Input 1 (see circuit diagram below) and for speed you use a potentiometer of 1-2 kΩ. This means that for enabling F-TM, you will not have your little switch wired to Intelligent Input 1 (which is already in use by the “Run” switch), but to one of 2 to 7.

Note that if you switch to OPE or F-TM mode while the VFD is in “Run” mode (=when the spindle runs), the VFD will first stop the spindle before it follows the new, manually overridden speed setting. Therefore you shouldn’t do this while the CNC is moving, so while running a g-code program, you should first press “Pause” on the Controller before switching to one of these forced override modes, and resume g-code program only after the spindle reached the new, manually overriden speed.

Note that this, as Alan @Alphonse already reported (thanks to Alan!), also answers the spindle pause problem: With a Hitachi or Omron VFD, during a g-code program, you can press pause on the Onefinity CNC display and control the spindle by switching to OPE or F-TM mode in order to be able stop the spindle, and next morning to switch it back on and resume from pausing the g-code program.


Weblinks

Manufacturer's pagePDF

Hitachi WJ200

Manual

Omron MX2

Manual

2 Likes

Yeah, servos - that could be fun! Not anytime soon.
I probably didn’t phrase it the best, but not thinking of direct sensing as in servos or the VFD somehow monitoring the steppers. More just something that would trip VFD even though the controller keeps blindly sending out stepper commands. You listed a couple scenarios, but you’re right - I have a 2.2kw spindle for mostly wood so I’m sure those scenarios are generally pretty unlikely.

1 Like

You know, I actually saw those forced override paragraphs in the manual, but noticed it couldn’t be used on the fly, so I moved on. However, the spindle pause in itself would be well worth it, and maybe a speed change here and there. Now to check out the switch requirements. If only electronics were always plug and play :slightly_smiling_face:. Thanks again for a useful insight

Hey Martin,

Nevertheless, for safety reasons it is always good to record this and other cases in a risk assessment and to ensure that the right thing happens in all cases that may arise. For example, people could hook their VFD/spindle to an undersized circuit breaker. In this case, if the circuit breaker blows, the controller (on a separate circuit breaker) should know it happened.

In any case, with the information above and the further links you have some suggestions on how you can implement such a security concept.

maybe my text is misleading. You can override the ModBus setting on the fly for spindle speed. You just should press “pause” on the Controller before doing this :slight_smile: and resume the program after the spindle reached the new (manually overriden) speed. I think when I will make the addition of a howto of the detailed settings, I will go over the text again.

Agreed. Good to cover as many bases as possible, and automatically, again, if possible.

No, I think I understood you correctly. By “on the fly” I meant tweaking the speed up and down while the program was running. But, even though it’s not quite as convenient, using pause - switch - change speed on VFD - switch back - unpause could certainly be helpful, and not that inconvenient.
Also, the pause and turn off/on spindle is a big bonus for overnight, something comes up and you have to leave garage, lunch break, etc. Appreciate the conversation! Good things come out of it

This seemed like a useful enough feature that I got around to reading up in the Hitachi manual and selector switch specs. But, so I hopefully don’t fry my first VFD or cause other problems …
Is using Forced Operator Mode as simple as …

  1. wiring a shielded twisted pair cable to P24 terminal and Logic Input 1 Terminal on one side, and a, for example, 2-position 24V normally open selector switch on the other side? Leaving short bar in PLC - L position for “sourcing”, which apparently is default in EU and US, and using the internal 24V power.
  2. Setting parameter C001 to 31 (OPE Operator Control), and leaving C011 at 00 (normally open, active high)

I’m looking specifically at this simple selector switch (GCX3300, two-position maintained, N.O.)


Seems to fit with the VFD input specs

So I’m guessing it wouldn’t matter which wire from VFD goes to which terminal on switch contact because it’s just opening and closing a simple circuit?

I realize this post goes in to quite a bit of detail that is probably very simple for the electronics guys out there, but that’s about my electronics level at this point!
Thanks for any input you have

Hey Martin,

yes, it is.

Here I show you an example wiring if you want to be able to override ModBus control with the “Force Terminal Mode (F-TM)” (or with “Force Operator Mode (OPE)”, in this case you simply omit SW 1 and VR 1 and use any of the Intelligent Inputs for your switch you like).

  1. As you can see, in this example I left untouched the switch on Intelligent Input 1 which serves as “Start/Stop Spindle” switch when this input is programmed this way (C001 to 00). This is SW 1 in the diagram.
  2. To choose a unused Intelligent Input to use it for switching to the “Force Terminal Mode” (or the “Force Operator Mode”), you are free to use Intelligent Inputs 2–6 in this example, but since Intelligent Input 6 has not dual use to expect, I chose this one in this example. This is SW 2 in the diagram.
  3. Finally I showed the wiring for a speed knob for spindle speed. It is called VR 1 (VR = variable resistor, aka potentiometer). It acts as voltage divider here by providing a variable analog voltage setting to pin “O”.

If you program Intelligent Input 6 to “F-TM” and you switch it on, then the states of SW 1 (spindle running or stopped) and VR 1 (spindle override speed) will come into effect.

If however you don’t want to use “Force Terminal Mode (F-TM)” but “Force Operator Mode (OPE)” instead, which will enable to control Run/Stop and Spindle Speed from the VFD’s Front Keypad, you can simply omit SW 1 and VR 1. SW 2 will then switch the “Force Operator Mode” on (if you programmed Intelligent Input 6 to this function).

Note that this all assumes that you have set A001 (“Speed Source Selection”) and A002 (“Run Command Source Selection”) both to 03 (“ModBus (RS485)”), which means, the VFD is controlled by the CNC Controller via the ModBus serial communication (with VFD pins SP and SN connected to pins 13 and 14 on DB-25 I/O port on CNC controller). The switch SW 2, wired to Intelligent Input 6 in this example, will then, if activated, override the speed and run commands received via ModBus from the CNC Controller. For this, the Intelligent Input 6 (setting C006) has to be programmed to either 51 “Force Terminal Mode (F-TM)” or 31 “Force Operator Mode (OPE)”. If you choose “Force Terminal Mode (F-TM)”, you should also have Intelligent Input 1 (setting C001) left to default setting 00 “Forward Run/Stop (FW)” which means it will act as a switch for starting and stopping the spindle.




This is correct.

This is a rather beefy switch. The smallest microswitch available would be sufficient :slight_smile: You just switch a logical signal. But your switch is beautiful, I like it.

Terminal 6 is a good option to leave other terminals for their default or dual purposes.

I’ll start with OPE, but leave the F-TM option as a future possibility.

Yes to both

Overcompensation for lack of understanding? :slightly_smiling_face:
Thanks again for sharing your prodigious knowledge with a beginner. I’ll leave you in peace for a bit!

1 Like

Its only been two years after your post and I’m about to ask you a question about it! :laughing:
First of all like everybody else said , thank you VERY much for you great write up, It helped a ton.

I have two questions if you have a moment to answer (or anybody else), I really appreciate it.

I saw in your picture your power input and from the look of it Im guessing its a 12 AWG wire arent we suppose to use 10 AWG (for the 30 AMP) that the Hitachi draws with the 2.2Kw Spindle? I saw that in the manual. Please let me know if Im missing something.

My second question is about how to make the 6 Pin connector for the signals going from the Hitachi back to the MASSO, Any picture or document you can point me to to know how to do that connection?

In your picture I do see two wires (One red and one white) connected to, what I think is SN and SP. Is that the only two that needs to be connected? how would I connect the other side that is the 6 pin socket that goes to the MASSO unit?

Another guess is using this diagram: VFD/SPINDLE wiring schematic for Elite Masso machines
According to this,
Pin 1 = L (Ground)
Pin 2 = Input 1
Pin 3 = Input 5
Pin 4 = Input 4 & 6
Pin 5 = NOT CONNECTED
Pin 6 = Input 7

Its not super easy to understand the manual :smiley:

I don’t think the VFD pulls 30 amps at 220V from power inputs - 2.2Kw implies 10 amps. That being said, I’m not an electrician and I could very well be using under-sized wire - my circuit is a 20amp 220V circuit though.

I’ve ordered an upgrade to the Masso, but it hasn’t arrived yet - so I’ve not tackled the VFD to Masso connection yet. The original buildbotics-based controller is using RS485 to control operations, the Masso uses 0-10V I believe - so the connection to the VFD and setup will be different. I’ll post an update here when I’ve installed the Masso and gotten things working.

Thank you very much for answering so quickly.
I am almost sure that you are right about the AMP and 30 AMP sounds a lot to me too.
I saw these pieces in the manual that lead me to believe 30AMP (10 AWG) is the way.

Its not even enough space for squeeze a 10 AWG wire in there so I hope you are right.

1 Like

Hey Michael, hey Moosa @moosaes,

Here you mix up input current and output current!

Also according to IEC 60034-1 the power rating on spindles does not mean the electrical power they draw, but the mechanical power they are able to deliver at their shaft (see here for details).

Yes, with a VFD on a single phase supply circuit, the input current is about is more than twice what is the rated output current. I own the Omron MX2 which is identical to your Hitachi WJ200, the manual is practically identical too (Omron MX2 User’s Manual / Hitachi WJ200 User’s Manual).

As you can see on the VFD’s nameplate that Michael shows above, it delivers max. 12 A three-phase output current to a spindle motor, and in order to do this, it draws up to 24 A on a single-phase supply line. In the manual, a 30 A fuse/MCB is recommended. That is because the output current rating applies to three phases that are delivered on three wires simultanely, each rotated by 120°. If you look at mathematics of three-phase electricity, you can calculate how much current that is if you sum up all the three currents at a certain moment in time:

3_phase_AC_waveform.svg
Image: Three-phase electricity: Each wave is shifted by 120°.

A VFD is an AC-to-DC-to-three-phase-AC inverter, which means, first the AC input current from the supply line is rectified to DC power, then it is stored in a large capacitor, and then an array of six IGBTs controlled by a microcontroller switches the three output currents on and off to form the three output current waves on the fly.

That also answers the other question: The table in the Omron MX2/Hitachi WJ200 manual that says you have to use 10 AWG on both input and ouput is obviously wrong for the purpose of simplicity. This table has only one column “Power Lines”, but to be correct, it would need to have two columns for the power lines, one for input power wire and one for output (motor) power wire, at least for the single-phase input models.

– Source: Omron MX2 User’s Manual

Spindle_Cable_3+PE_with_shield
Image: A typical spindle cable for use in a power chain (LAPP ÖLFLEX® CLASSIC FD 810 CY)

You need the 10 AWG cable only on the single-phase input (suited for 24 A), not on the (motor) output. For the VFD output, i.e. the spindle cable, 12 AWG is enough, as the current is spread over three wires (suited for rated VFD output, which is 12 A here). See nameplate of VFD. As you can see here, the nameplate of my Omron MX2 for 2.2 kW motor and single phase input is identical regarding input and output power to Michael’s Hitachi WJ200:

Hitachi_WJ200_Single-phase_200_V_2.2kW_VFD_Nameplate
Image 1: Michael’s Hitachi WJ200 VFD nameplate.
Omron_MX2_Nameplate_1Ph
Image 2: Aiph5u’s Omron MX2 VFD nameplate.

As you can see, the input and output currents on my VFD and on Michaels VFD are identical:

50–60 Hz 200–240 V 1-phase input: 24 A / 22 A,
.1–400 Hz 200–240 V 3-phase output: 12 A / 11 A.

The only difference is that the Omron MX2 can deliver 580 Hz instead of only 400 Hz on Michael’s Hitachi WJ200. So my MX2 can run a spindle like this: ATC-8022-42-HSK25 2.2 kW 42,000 rpm water-cooled spindle at 34,800 rpm (see also[ ➪ How to calculate the rpm of spindles based on frequency)

If you want to calculate what your spindle really draws, see here:

It shows what a 2.2 kW spindle really draws and that the power ratings on cheap chinese spindles are often wrong.

See also the explanations in

to be sure to select the correct spindle cable and its dimensions.

The Masso G3 CNC controller does not support Modbus serial communication. You’ll have to use the analog 0–10 V control for spindle speed and a programmable input terminal for spindle RUN/STOP/REV. Use the search function to find:

1 Like