Biesse Rover 346 Retrofit

More
11 Feb 2017 05:37 #87800 by bevins
Replied by bevins on topic Biesse Rover 346 Retrofit
Thanks Todd, Thats what I needed,

I will work on that.

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

More
11 Feb 2017 06:56 - 11 Feb 2017 07:02 #87802 by bevins
Replied by bevins on topic Biesse Rover 346 Retrofit
Still cant get a handle on it.

I am using motion.spindle-speed-out sending 0-10 to the spindle inverter.

But this says the analog in is an out pin....
BS_346.hal:224: Signal 'spindle-speed-DAC' can not add OUT pin 'hm2_5i25.0.7i77.0.0.analogin0', it already has OUT pin 'scale.0.out'


INI file:
#********************
# Spindle
#********************
[SPINDLE_9]

OUTPUT_SCALE = 24000
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 24000



I am at a loss.
Warning: Spoiler!
Attachments:
Last edit: 11 Feb 2017 07:02 by bevins.

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

More
11 Feb 2017 14:32 #87820 by Todd Zuercher
The scaling of RPM to 10v for the spindle speed command out is done in the mesa hardware. That is set by the SPINDLE_9]OUTPUT_SCALE value from your ini file.

The scale for your analog input spindle speed feed back may or may not be the same. (The actual numbers may be quite different.)

Here is an idea of what I think you need to try.
(no guarantees there are no mistakes in this.)
#*******************
#  SPINDLE S
#*******************

# --- Generator signals/setup---

setp   hm2_5i25.0.7i77.0.1.analogout5-scalemax  [SPINDLE_9]OUTPUT_SCALE
setp   hm2_5i25.0.7i77.0.1.analogout5-minlim    [SPINDLE_9]OUTPUT_MIN_LIMIT
setp   hm2_5i25.0.7i77.0.1.analogout5-maxlim    [SPINDLE_9]OUTPUT_MAX_LIMIT

net spindle-on-1 <= motion.spindle-on => hm2_5i25.0.7i77.0.1.spinena 
net spindle-vel-cmd-rpm  <= motion.spindle-speed-out => hm2_5i25.0.7i77.0.1.analogout5 


#********************************
# === Analog input scaling  ===
#********************************

loadrt scale count=1   #I would suggest moving this line to the top of the hal file with the other loadrt commands
addf scale.0 servo-thread   #I would suggest moving these lines to the top of the hal file with the other addf commands
setp scale.0.gain 0.002  #You may have to experiment with this value to get scale.0.out to sort of match motion.spindle-speed-out.
                                    #It may or may not be approximately the same as or the inverse of [SPINDLE_9]OUTPUT_SCALE
net spindle-speed-DAC <= hm2_5i25.0.7i77.0.0.analogin0 => scale.0.in
net spindle-feedback <= scale.0.out 

loadrt near count=1  #I would suggest moving this line to the top of the hal file with the other loadrt commands
addf near.0 servo-thread  #I would suggest moving these lines to the top of the hal file with the other addf commands
setp near.0.scale 1.01  #You may have to play with this number to fine tune it.
net spindle-vel-cmd-rpm  => near.0.in1
net spindle-feedback => near.0.in2
net spindle-at-speed  <= near.0.out

#%%%%%%%%%%%%%%%%%%%%%%%%%%%
#  END Analog Input Scaling 
#%%%%%%%%%%%%%%%%%%%%%%%%%%%




#net spindle-vel-cmd-rpm     => 

# ---setup spindle control signals---

net spindle-vel-cmd-rps        <=  motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs    <=  motion.spindle-speed-out-rps-abs
#net spindle-vel-cmd-rpm        <=  motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs    <=  motion.spindle-speed-out-abs
#net spindle-enable             <=  motion.spindle-on hm2_5i25.0.7i77.0.1.spinena
net spindle-cw                 <=  motion.spindle-forward
net spindle-ccw                <=  motion.spindle-reverse
net spindle-brake              <=  motion.spindle-brake
net spindle-revs               =>  motion.spindle-revs
net spindle-at-speed           =>  motion.spindle-at-speed
net spindle-vel-fb-rps         =>  motion.spindle-speed-in
net spindle-index-enable      <=>  motion.spindle-index-enable

# ---Setup spindle at speed signals---

#sets spindle-at-speed true

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

More
11 Feb 2017 18:14 - 11 Feb 2017 18:17 #87831 by bevins
Replied by bevins on topic Biesse Rover 346 Retrofit
I think I have it setup properly, but spindle-at-speed never goes true, so the program doesnt continue.
It is really close.......

Tried tweaking the near scale up and down but nothing yet.
Both analogout and analog in are the same so it should set spindle-at-speed true I would think.

Warning: Spoiler!




Attachments:
Last edit: 11 Feb 2017 18:17 by bevins.

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

More
11 Feb 2017 19:25 #87835 by bevins
Replied by bevins on topic Biesse Rover 346 Retrofit
Looks like I'm using analogout5 after it has been scaled and and checking against
analogin0 before it has been scaled so it will never be the same.


Attachments:

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

More
12 Feb 2017 02:26 - 12 Feb 2017 03:16 #87852 by bevins
Replied by bevins on topic Biesse Rover 346 Retrofit
The spindle output 0-10 is being scaled by the board but it is going from rpm (gcode) to analogout 0-10.
I need analog in so it has to be reverse scaling so:

The scaling the other way is 10/24000 should be the gain. Thats going from rpm to analogout 0-10
so my calculations are it should be the other way around for 0-10 to rpm which should be something like:

10 X 24000 = the gain

Does this logic make sense?

/EDIT Apparantly not. Doesnt work. I am all out of ideas.
Last edit: 12 Feb 2017 03:16 by bevins.

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

More
12 Feb 2017 04:41 - 12 Feb 2017 04:44 #87857 by Todd Zuercher
What you need to do is scale the analogin to match your RPM. That is what the scale component we added is for. Use the setp scale.0.gain to set that and from the images you posted from the pins watched it should be about 2400 (not 0.102)

setp scale.0.gain 2400

You'll probably want to make the near scale closer to 1 but I have never used a near comp.
Last edit: 12 Feb 2017 04:44 by Todd Zuercher.
The following user(s) said Thank You: bevins

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

More
12 Feb 2017 13:29 #87868 by bevins
Replied by bevins on topic Biesse Rover 346 Retrofit
The spindle-at-speed saga is finished. It is working somewhat.

It is not linear so the farther away you get from the max the more the difference is. There is a tradeoff. I cannot get 1000 RPM because I would have to set the near scale to 3.5 but then if I request 24000 it will be spindle at speed at like 6000 RPM. I can live with this for now. Will never have the spindle at 1000 rpm. Wood routers are not ideal at 1000 rpm.

Thank you Todd for your help with this. I learned alot and it will be a long time before I forget this one. Helps with all the other comps....

So the machine is up and running. Theoretically I could be cutting some wood now. Have to work out the spindle selects, and start thinking about the tool changer, and of course the control panel.

on with the show.........

NEXT!!!

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

More
12 Feb 2017 20:23 #87885 by Todd Zuercher
Perhaps you need to set this pin "near.0.difference" to something.other than the default of 0. and keep "near.0.scale" closer to 1.
setp near.0.difference 500
You might also need to fine tune "scale.0.gain" and "scale.0.offset" a little better..
The following user(s) said Thank You: bevins

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

More
13 Feb 2017 23:43 #87931 by bevins
Replied by bevins on topic Biesse Rover 346 Retrofit
Everything working great so far. Doing some logic with ClassicLadder.

I have a 12 foot table. I need to know when the cnc goes past 6 foot and again when it comes back across the 6 foot mark.

Is there a way to do this or does code have to be written?

Can someone give me a hint?

Thanks,

bob

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

Time to create page: 0.156 seconds
Powered by Kunena Forum