How do I enable the Spindle Load Meter on ALLIN1DC?

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

cncsnw
Community Expert
Posts: 4593
Joined: Wed Mar 24, 2010 5:48 pm

Re: How do I enable the Spindle Load Meter on ALLIN1DC?

Post by cncsnw »

If you already have load meters on your axis displays, then that code is already in the PLC program.
Not true in this case. When using analog torque-mode control (which the All-in-one DC uses), axis load meters are handled directly by CNC11/CNC12 and the MPU. The PLC program is not involved.

The axis load meter code in TB296 would be for an Oak system, running third-party drives in analog velocity mode or in position mode. In that configuration, the only way to get axis load meters is to read analog load values in from the drives.


cncsnw
Community Expert
Posts: 4593
Joined: Wed Mar 24, 2010 5:48 pm

Re: How do I enable the Spindle Load Meter on ALLIN1DC?

Post by cncsnw »

Would I need to find an updated, or different version of PLC as you mention, if so where would I look for the alternate code?
If you don't need the other custom features, you might be better off looking for a current PLC program that does include the spindle load meter.
I was hoping you could clarify your comments so I can understand it a little better. I'm not all that familiar with how the PLC system is set up to interface with the source code we are feeding it.
This is an understandably confusing subject.

The PLC program can, and often must, be tailored to the needs of each particular installation.

In the past, Centroid factory programs were generally designed around a toolroom milling machine: one spindle with forward/reverse and speed control; auto lube system; flood coolant; mist coolant; hard-wired jog panel/pendant; and wired MPG pendant. Anything else probably would require changes or additions.

In recent years there have been periodic attempts to make a universal PLC program containing every possible feature, in every possible configuration, so that an unskilled user could (somehow) specify the features his machine had, and get that universal PLC program to support them. In my opinion, these efforts are misguided. Inevitably, such a PLC program still does not meet all needs, and because it is so large and contains so many unwanted features, it is much harder to modify for a particular application than a bare-bones PLC program would be.

Attached is one of my current "basic" All-in-one DC mill PLC programs, to which I have added support for the CWP-4 wireless pendant. I have not added support for the VCP (I generally work with industrial customers who can afford the hardware jog panel or pendant). You may find the spindle load meter code in this program a little simpler and clearer than what you can get out of TB296. Search for "LoadMeterStage". If your analog spindle load signal is not 10VDC for maximum load, then set Machine Parameter 990 to the analog volts for maximum load.
Attachments
allin1dc-basic-mbl-cwp4.zip
(80.96 KiB) Downloaded 102 times


rustfinger
Posts: 25
Joined: Thu Dec 13, 2018 6:52 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: 411192189
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Puyallup Washington

Re: How do I enable the Spindle Load Meter on ALLIN1DC?

Post by rustfinger »

I'm not sure why the latest 2 replies from cncnw only show up when I go to post my reply...

I was getting ready to respond to the post by Tom (Mon Jul 22, 2019 3:28 pm), Thank you!

However, after reading the latest 2 replies, I had to rethink my response...

cncnw:

The code in your attachment looks much simpler and I will try it today.

Thanks

THE FOLLOWING IS FOR REFERENCE ONLY, I am going to try the simpler code and then post the results. I have a feeling that there was a mismatch between the code I added from TB296 and my PLC program that probably can't be fixed by adjusting the parameters.


Here is a summary of what I tried yesterday, and the results:

I added ALL the code from TB296 and modified the parameters. I got the load meter to show up, but it was not working properly. Here is what happened.

I saw the SPINDLE load meter in the place where the X AXIS Meter was previously. This happened when parameters were set as:
P35 = 6
P57=39,31,23,15,7,3 or 1 (I tried them all)
P313=0

Then...
All AXIS meters read normally, but no Spindle meter when parameters were set at:
P35=6
P57=0*
P313=0

*when P57=1 the X Axis goes away, When P57=2 the Y axis goes away, When P57=4 the Z Axis goes away

Finally...
All AXIS meters disappear and the spindle meter shows up (in the proper place) when parameters were set at:
P35=1
P57=39
P313=0

Now I am going to try to add the simpler code. I attached the report for reference.
Thanks!
Attachments
report_0411192189_2019-07-23_19-22-38.zip
(579.19 KiB) Downloaded 99 times


rustfinger
Posts: 25
Joined: Thu Dec 13, 2018 6:52 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: 411192189
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Puyallup Washington

Re: How do I enable the Spindle Load Meter on ALLIN1DC?

Post by rustfinger »

Greetings,

I had a chance to modify the PLC code today and the spindle load meter is working!!!

I added the 'simpler' version of the code and was able to get the spindle meter to show up and work properly.

I do have one question remaining: In order to read the 'load' on the spindle, which comes from the 0-10V signal from the inverter, which output option will best show the load? I'm using a Hitachi WJ200 series .75 kW inverter. The output options that output voltage to be read are:

1.Output Frequency
2.Output Current
3.Output Voltage
4.Input Power
5.LAD Frequency (does anyone know what this is???)

1 and 5 just peg the meter to 100% so they seem useless, 2,3,4 read about 15-30% on the meter, but vary just a little amount so its hard to see the Load variation. 2 and 3 seem to be the best bet. Any thoughts on what is the best one?


For reference here is what I added to my PLC program to make the spindle meter work. I also attached the Report file and the parameter settings that worked were P35=6, P57=32, P137 not changed, P143 not changed, P313=0.



Here is what I added to the PLC file (this was taken from the PLC file posted by cncnw earlier in this post. Thank You!):

**********************

;ADDED TO INPUT DEFINITIONS:

; Analog input on the AllIn1DC header H9

AnalogInput1 IS INP241; 12 bit ADC. Read on INP241-256

;ADDED TO WORD DEFINITIONS:

SpindleAnalogIn_W IS W48 ; ORIGINALLY THIS WAS W44 IN REFERENCE CODE, W44 WAS USED ALREADY

;ADDED TO FWORD DEFINITIONS:

SpindleLoadScaleFactor_FW IS FW11

;ADDED TO STAGE DEFINITIONS:

LoadMeterStage IS STG240

;ADDED TO LOAD PARAMETERS STAGE:

IF SV_MACHINE_PARAMETER_57 != 0 THEN SET LoadMeterStage

;THIS ENTIRE STAGE WAS ADDED, (RIGHT BEFORE THE MAIN STAGE) IN THE PROGRAM:

;================================================================
LoadMeterStage
;================================================================
IF SV_MACHINE_PARAMETER_57 == 0 THEN RST LoadMeterStage

IF True THEN BTW SpindleAnalogIn_W AnalogInput1 12

;With default 0-10V input range, W value has 0VDC = 0, +9.998VDC = 4095
; BTW zero-fills high bits

; Zero out load meter value if axis is not enabled
IF SV_STOP THEN SpindleAnalogIn_W = 0

;Calculate scale factor needed for each analog input based on parameter setting.
;Parameter values should be DC volts for full-scale load reading.

;Read P990-994. Default = 10VDC
IF True THEN SpindleLoadScaleFactor_FW = 10.0

IF SV_MACHINE_PARAMETER_990 != 0 THEN SpindleLoadScaleFactor_FW = SV_MACHINE_PARAMETER_990

;Normalize values for each axis for 0 to +100 representation of load:
; Note: 0 .. +4095 / 4.096 = 0 .. +999.8
; 0 .. +999.8 / 10.0 volts-per-full-scale = 0% .. +100.0% (rounded)
; If the scaling parameter has a smaller volts-per-full-scale value,
; then the same volts (same analog in) yields a higher load percentage.
; We will trust that CNC11/CNC12 clamps values that exceed 100%, to 100%.
IF True THEN SV_METER_6 = SpindleAnalogIn_W / 4.096 / SpindleLoadScaleFactor_FW

*********************
I hope this reference will be of help to someone who is tackling this same issue in the future.

Thanks to all who contributed to this post!!!


rustfinger
Posts: 25
Joined: Thu Dec 13, 2018 6:52 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: 411192189
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Puyallup Washington

Re: How do I enable the Spindle Load Meter on ALLIN1DC?

Post by rustfinger »

the report...
Attachments
report_0411192189_2019-07-25_16-53-18.zip
(427.06 KiB) Downloaded 84 times


cncsnw
Community Expert
Posts: 4593
Joined: Wed Mar 24, 2010 5:48 pm

Re: How do I enable the Spindle Load Meter on ALLIN1DC?

Post by cncsnw »

2.Output Current
... is what you want driving the analog output from the spindle drive.

You should then see the load meter act like a spindle load meter should: immediate high current on start and acceleration, then settling back to moderate current during steady speed run. If your drive is programmed to actively decelerate (ramp to stop, using a regenerative resistor to dump power) then when you stop the spindle, you should see the current rise and stay moderately high as the spindle decelerates, then abruptly drop to zero when the spindle comes to a stop. If your drive is programmed to coast to a stop, then the meter should drop to zero as soon as you give the spindle-off command. You should also see the meter increase during speed changes while running (e.g. ramping the spindle speed override up and down).


rustfinger
Posts: 25
Joined: Thu Dec 13, 2018 6:52 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: 411192189
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Puyallup Washington

Re: How do I enable the Spindle Load Meter on ALLIN1DC?

Post by rustfinger »

I think you described it exactly. I now have it set so we can watch the output current to see when the spindle is under extra load.

We are using the machine on wood products and we aren't sure if there is a problem with the spindle motor or if we are running into 'hard spots' in the wood. Having the meter will at least let the operator see if there is a rise in current when the motor starts 'bogging down' in the material or if there is a fluctuation or dropout in current at that point. I'm not sure tell us exactly what we are looking for, but I hope it will help tell us something.

At there very least, we have an indicator to see if we are running consistently on a day to day basis and maybe some other information, dull tools etc.
And the machine looks cool 8-) with the meter on the screen. :D :D :D

Thanks Again to All!!!


Post Reply