Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: pete1961 on October 10, 2021, 08:57:37 PM
-
I just finished installing a Spidle today.
Earlier today while simply testing this morning it seemed to fine.
Now it won't turn on.
I have touched nothing and the log file below has me baffled as to what is going on....
It is a Hitachi VFD/G540/ESS Smoothstepper.
Anyone have an idea why I'm getting this error???
2021-10-10 19:50:28.728 - >>> ESS PID - RPM: 0.0 PWM: 100.0000% Error Now: 1.0000
2021-10-10 19:50:31.835 - >>> ESS PID - RPM: 0.0 PWM: 100.0000% Error Now: 1.0000
2021-10-10 19:50:32.713 - API: mcCntlMdiExecute(inst = 0, commands = 's24000') (Mach4GUI)
2021-10-10 19:50:32.813 - Attempt transition from "Idle" on event "MDI Start" controller.cpp:2187
2021-10-10 19:50:32.813 - S_IDLE_on_exit
2021-10-10 19:50:32.814 - ACTION_start_mdi
2021-10-10 19:50:32.814 - S_MDI_RUNNING_on_entry
2021-10-10 19:50:32.815 - S_MDI_RUNNING2_on_entry
2021-10-10 19:50:32.816 - Signal id 1114, (Gcode Running), changed from LOW to HIGH.
2021-10-10 19:50:32.828 -
2021-10-10 19:50:32.828 - >>> ESS: PWM Mode - 'Spindle Motor Dir' set to Forward.
2021-10-10 19:50:32.828 - >>> ESS: Setting spindle to 24000.0 RPM or 100.0%. Range 0 PWM Base Freq = 400
2021-10-10 19:50:32.828 - >>> ESS: Spindle PID Activated. Kp = 0.0000 Ki = 0.0000 Kd = 0.0000
2021-10-10 19:50:32.929 - Attempt transition from "MDI Running" on event "Stop" gcodeexec.cpp:1232
2021-10-10 19:50:32.929 - S_MDI_RUNNING2_on_exit
2021-10-10 19:50:32.929 - Signal id 1114, (Gcode Running), changed from HIGH to LOW.
2021-10-10 19:50:32.929 - S_MDI_RUNNING_on_exit
2021-10-10 19:50:32.929 - ACTION_stop
2021-10-10 19:50:32.954 - S_IDLE_on_entry
2021-10-10 19:50:34.948 - >>> ESS PID - RPM: 0.0 PWM: 100.0000% Error Now: 1.0000
2021-10-10 19:50:38.056 - >>> ESS PID - RPM: 0.0 PWM: 100.0000% Error Now: 1.0000
2021-10-10 19:50:41.160 - >>> ESS PID - RPM: 0.0 PWM: 100.0000% Error Now: 1.0000
2021-10-10 19:50:44.271 - >>> ESS PID - RPM: 0.0 PWM: 100.0000% Error Now: 1.0000
2021-10-10 19:50:47.377 - >>> ESS PID - RPM: 0.0 PWM: 100.0000% Error Now: 1.0000
2021-10-10 19:50:50.484 - >>> ESS PID - RPM: 0.0 PWM: 100.0000% Error Now: 1.0000
-
Hi,
looking at the log suggests you are using the ESS PID? Why? Do you need it?
In the first instance I would try just open loop, when you can get that to reliably operate THEN have a go at PID.
This is from your log:
2021-10-10 19:50:32.828 - >>> ESS: Spindle PID Activated. Kp = 0.0000 Ki = 0.0000 Kd = 0.0000
If you have Kp, Ki and Kd all set to zero its no bloody wonder the PID loop won't work!
Craig
-
I did turn off the PID Loop, I agree after reading further I have no use for it.
Spindle still won't run.
Here is current log.
2021-10-11 19:22:45.839 - API: mcCntlMdiExecute(inst = 0, commands = 'm3 s20000
') (unknown caller)
2021-10-11 19:22:45.940 - Attempt transition from "Idle" on event "MDI Start" controller.cpp:2364
2021-10-11 19:22:45.940 - S_IDLE_on_exit
2021-10-11 19:22:45.940 - Signal id 1172, (Machine Idle), changed from HIGH to LOW.
2021-10-11 19:22:45.940 - ACTION_start_mdi
2021-10-11 19:22:45.941 - SoftSync()! Clearing planner.
2021-10-11 19:22:45.962 - S_MDI_RUNNING_on_entry
2021-10-11 19:22:45.962 - SoftSync()! Clearing planner. stateinterface.cpp:1351
2021-10-11 19:22:45.962 - S_MDI_RUNNING2_on_entry
2021-10-11 19:22:45.962 - Signal id 1114, (Gcode Running), changed from LOW to HIGH.
2021-10-11 19:22:45.963 -
2021-10-11 19:22:45.963 - -----===== Mach4 build 4.2.0.4612, ESS build 277 =====-----
2021-10-11 19:22:45.963 -
2021-10-11 19:22:45.963 - !!!!W9_HC/VERSION Register HANDLE FAILURE !!!!!!
2021-10-11 19:22:45.977 -
2021-10-11 19:22:45.977 - >>> ESS: PWM Mode - 'Spindle Motor Dir' set to Forward.
2021-10-11 19:22:45.977 - >>> ESS: Setting spindle to 20000.0 RPM or 83.3%. Range 0 PWM Base Freq = 400
2021-10-11 19:22:45.977 - >>> ESS: Spindle PID is not enabled.
2021-10-11 19:22:45.978 - Signal id 1142, (Spindle Fwd), changed from HIGH to LOW.
2021-10-11 19:22:45.978 -
2021-10-11 19:22:45.978 - >>> ESS: PWM Mode - 'Spindle Motor Dir' set to Forward.
2021-10-11 19:22:45.978 - >>> ESS: Setting spindle to 20000.0 RPM or 83.3%. Range 0 PWM Base Freq = 400
2021-10-11 19:22:45.978 - >>> ESS: Spindle PID is not enabled.
2021-10-11 19:22:45.978 - Signal id 1142, (Spindle Fwd), changed from LOW to HIGH.
2021-10-11 19:22:45.979 - Waiting 0.000000 seconds for spindle at speed... spindle.cpp:300
2021-10-11 19:22:45.979 - Done. spindle.cpp:305
2021-10-11 19:22:46.081 - Attempt transition from "MDI Running" on event "Stop" gcodeexec.cpp:1359
2021-10-11 19:22:46.081 - S_MDI_RUNNING2_on_exit
2021-10-11 19:22:46.081 - Signal id 1114, (Gcode Running), changed from HIGH to LOW.
2021-10-11 19:22:46.081 - S_MDI_RUNNING_on_exit
2021-10-11 19:22:46.081 - ACTION_stop
2021-10-11 19:22:46.104 - API: mcMotionSetStill(inst = 0, motor = 0) (Called by ESS)
2021-10-11 19:22:46.104 - SetStill(): Motor 0 last position reported = 0.0000 controller.cpp:1400
2021-10-11 19:22:46.104 - All motors marked as still.
2021-10-11 19:22:46.139 - S_IDLE_on_entry
2021-10-11 19:22:46.140 - >>>--- ESS: Reporting Stopped: Motor 0 0.000000 #B
2021-10-11 19:22:46.140 - API: mcMotionSetStill(inst = 0, motor = 1) (Called by ESS)
2021-10-11 19:22:46.140 - SetStill(): Motor 1 last position reported = 0.0000 controller.cpp:1400
2021-10-11 19:22:46.140 - All motors marked as still.
2021-10-11 19:22:46.140 - >>>--- ESS: Reporting Stopped: Motor 1 0.000000 #B
2021-10-11 19:22:46.140 - API: mcMotionSetStill(inst = 0, motor = 2) (Called by ESS)
2021-10-11 19:22:46.140 - SetStill(): Motor 2 last position reported = 0.0000 controller.cpp:1400
2021-10-11 19:22:46.140 - All motors marked as still.
2021-10-11 19:22:46.145 - Signal id 1172, (Machine Idle), changed from LOW to HIGH.
2021-10-11 19:22:46.145 - >>>--- ESS: Reporting Stopped: Motor 2 0.000000 #B
2021-10-11 19:22:46.145 - API: mcMotionSetStill(inst = 0, motor = 3) (Called by ESS)
2021-10-11 19:22:46.145 - SetStill(): Motor 3 last position reported = 0.0000 controller.cpp:1400
2021-10-11 19:22:46.146 - All motors marked as still.
2021-10-11 19:22:46.146 - >>>--- ESS: Reporting Stopped: Motor 3 0.000000 #B
2021-10-11 19:22:46.146 - API: mcMotionSetStill(inst = 0, motor = 4) (Called by ESS)
2021-10-11 19:22:46.146 - SetStill(): Motor 4 last position reported = 0.0000 controller.cpp:1400
2021-10-11 19:22:46.146 - All motors marked as still.
2021-10-11 19:22:46.146 - >>>--- ESS: Reporting Stopped: Motor 4 0.000000 #B
2021-10-11 19:22:46.146 - API: mcMotionSetStill(inst = 0, motor = 5) (Called by ESS)
2021-10-11 19:22:46.146 - SetStill(): Motor 5 last position reported = 0.0000 controller.cpp:1400
2021-10-11 19:22:46.146 - All motors marked as still.
2021-10-11 19:22:46.146 - >>>--- ESS: Reporting Stopped: Motor 5 0.000000 #B
-
Hi,
how and with what signals are you turning on the spindle? Have you tested the output pin of the BoB to make sure its changing state?
How about the PWM? Is it establish a vary DC voltage at the output of the BoB?
Craig
-
I'm using a G540 to control the spindle.
So you are stating I should check that the G540 is outputting a PWM signal and turning the spindle on & off. How do you check? With a multimeter?
Should the "Spindle On" output be used in the ports and pins configuration on the ESS or just the Spindle PWM?
Currently I have the Spindle PWM and Spindle On assigned to output pins. Both Active High as noted with a Red "X".
-
Hi,
So you are stating I should check that the G540 is outputting a PWM signal and turning the spindle on & off. How do you check? With a multimeter?
Yes.
Should the "Spindle On" output be used in the ports and pins configuration on the ESS or just the Spindle PWM?
Both. Most spindles require an ON/OFF signal in addition to the 0-10V PWM. I assume you have programmed your VFD to accept voltage
PWM as primary control source?
Should the "Spindle On" output be used in the ports and pins configuration on the ESS or just the Spindle PWM?
On the G540 the SpindleOn input and PWM input are on specific pins. Have you assigned the ESS port and pin the match the G540 input?
Craig
-
Another thing I just discovered and maybe why I thought it worked correctly yesterday...
If I start the spindle from my VFD front panel "Run" button and then go to Mach4 I can then take control of operation of the spindle RPM and turn the spindle on and off as much as I would like!
Very strange so I think it is a simple setting I don't understand in Mach4 to get the spindle to start on say an M3 S24000 MDI Command.
-
you have to change the settings in the vfd to accept computer inputs , they may call it something else. but if you can turn it on and off the panel on the vfd then you have it set to that panel not to be controlled thru Mach check your vfd manual. there is usually an input you need to change
-
How is it that? Once it is running I can then control it in Mach4?
So it doesn't seem like I need to change any setting in the VFD.
I have it set to be controlled by Analog Voltage 0-10VDC input.
It is a Hitachi WJ200-022SF if it matters.
I've seen where some people use a relay to turn the VFD spindle on and off is the necessary in my case as well? But also thought I read somewhere this is not necessary for a G540.
-
Hi,
most VFDs have an on/off input, usually from the factory from the touch panel on the VFD. Likewise the primary frequency source is from the touch panel.
Its necessary therefore to change the internal VFD settings such that the analog voltage input is the primary frequency source and the digital input
be the primary on/off signal.
Craig
-
https://www.hitachi.us/supportingdocs/forbus/inverters/Support/WJ200_Instruction_NT325X.pdf
here is the manual I found on line and its not the easiest to follow but it does say how to set where it will be controlled from also its going to matter how you have it wired to your bob. some people run it right off the panel like you said you do but then why use a g540. another note if you use an mb3 with a warp9 Ess you eliminate the g540 as it has it built in. but again the wiring makes a difference. you should also have a multi meter to check your voltages so your 0-10 is set correctly or your rpms wont be. I have fuling and delta inverters/vfd on my machines so of course they are not the same but the operation is similar
-
page 3-13 of the manual shows the code setting for terminal, keyboard mobus .
sorry I miss spoke about your g540 it sounds like that is working if you change this signal to the "01" you should be good
-
I believe that is where the problem is at this point.
I have control of the VFD via Mach 4 once the Run button is pressed on the VFD.
I'm just not able to command it to Run/Stop from Mach 4.
I have a Hitachi WJ200 so I need to figure out which parameter on the VFD to change to enable remote Run/Stop Command.
-
A002 to 01, right next to A001 which you must have already changed to get terminal control of speed/frequency. If it's set to 01 already then you have a Mach setup/wiring issue. But, really, is MUST be set to 02 to have control panel control of on/off!!
I think!!
-
A002 to 01, right next to A001 which you must have already changed to get terminal control of speed/frequency. If it's set to 01 already then you have a Mach setup/wiring issue. But, really, is MUST be set to 02 to have control panel control of on/off!!
I think!!
It is very close to working correctly. Most likely parameters and not wiring. Since once I press the run button on the VFD I'm able to start & stop it and change the speed all from the mach 4 screen. So it just isn't getting a signal to initiate the run command when I'm trying to start the VFD initially from Mach 4.
What about A005? This one I'm not totally sure of what it is supposed to be set at.
-
Is an external relay required to turn the spindle on & off? Still stumped on why no On & Off from Mach4 but can control Spindle speed from Mach4 once VFD Run button pressed.
-
Hi,
Mach4 has signals which are active or not but does not control the VFD. Its the motion controller and particularly the BoB that actually interacts with the VFD.
A set of relay contacts is quite useful for controlling a VFD. The contacts are galvanaically isolated from the BoB and they are polarity insensitive.
Most BoBs have a transistor output and so the VFD 0V and BoB 0V must be commoned together. Also the collector, aka the BoB output, can go down to
VCESat, say 0.1 to 0.5V above ground. It maybe that the VFD input requires a 0V input or VERY close to it and a saturated collector-emitter
junction is just not quite low enough.
Craig
-
Is it possible to use the G540 Pin 7 VFD Ground to turn on the spindle.
It seems like I read somewhere that it is possible to use this method?
Does this seem correct?
-
Hi,
yes it is possible but you have to tie the 0V VFD to the 0V of the G540, ie the VFD CANNOT be galvanaically isolated from the BoB.
Most operators want, and spend considerable effort to ensure, that the VFD is isolated from the BoB.
Craig
-
Craig
Thanks for your expert assistance.
I will use a relay as I can certainly understand why one would want to totally isolate the spindle so there is no spurious unsafe start of the spindle.
-
I now have added a relay and can turn the spindle on/off from Mach4. Since doing this it seems Mach4 now has no feedback as to what the spindle RPM is.
This causes the pause on start not to work in the spindle setup screen and also trying to check the box that says wait till spindle is at 90% does not work either.
Do I need to add a wire to monitor the spindle speed that the Hitachi VFD is commanding so it can be read in Mach4 or am I missing something else?
-
Hi,
Since doing this it seems Mach4 now has no feedback as to what the spindle RPM is.
How is Mach supposed to know how fast the spindle is going? It knows that its been commanded to go to 15000 rpm say, so it produces
PWM to suit, but it has no idea whether the speed has been reached or exceeded.
Any setting like the '90% of target speed' that relies on some measurement of speed is going to fail UNLESS you provide that measurement.
If you really want to know what the spindle rpm is then you'll have to supply an encoder or a index signal on the spindle, the ESS will detect
this signal and feed the information back to Mach. Then Mach would have an exact speed measurement to display. The ESS can also accept the feedback
and vary the PWM a little under a PID loop.
Do you really need it?. For years and years we used manual mills and lathes and they never had spindle speed displays and yet we still did plenty
of good work on them, so why the insistance on knowing exact spindle rpm now?
There is another possibility which may allow you to pause until the spindle is up to speed. There is an input signal in Mach....ISIG_SPINDLE_AT_SPEED.
Note this is a signal defined in Mach....it does not do anything UNTIL you hook it to some external signal source, its just a convenient definition at the moment.
Most VFDs can be programmed such that one of their digital outputs goes high when the spindle is at its commanded speed. Now you can program the drive,
hook the digital output to an input on your BoB/ESS combo, and then logically attach the pin to ISIG_SPINDLE_AT_SPEED. Then you can use that signal
to program Mach.
Quite frankly it seems like a lot of messing around just to save a second or two on the spin-up time of the spindle. My spindle winds up to about 18000rpm
in three seconds and gets to 24000rpm in 4-5secs, so I program:
m3
g4 p3
and that gives me a fixed time delay which is good enough for me. I have lots more important things to do on my machine and even more important things
I need to do WITH my machine than worrying about this.
Craig
-
Makes perfect sense.
Did you add the pause in your post processor or can it be set in Mach4?
-
Hi,
the code is in the Gcode file, so postprocessor. It could conceivably be programmed as part of the m3/m4 spindle macros.
Craig
-
Okay Thanks Again!!!!!
I will add it to my post processor.