Orient component revised

More
6 years 9 months ago #156288 by nkp
Replied by nkp on topic Orient component
this hal file is still being edited, inaccuracies may be present

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

More
6 years 9 months ago #156290 by nkp
Replied by nkp on topic Orient component
INI:
Code:
[SPINDLE] PGAIN_V = 0 IGAIN_V = 0 DGAIN_V = 0 FF0_V = 1 FF1_V = 0 PGAIN_P = 150 IGAIN_P = 1 DGAIN_P = 0 FF0_P = 0 FF1_P = 1

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

More
6 years 8 months ago - 6 years 8 months ago #156412 by alkabal
Replied by alkabal on topic Orient component
Hi

Regarding to your component i have try to add something similar.

Attached is the revision with the spindle home after machine homing included.

HAL patrs need to add a or2 component for pid enable.
Code:
##################################################################### # Spindle orient mode ##################################################################### loadrt orientv4 names=orient.orient-spindle loadrt pid names=pid.orient-spindle loadrt or2 names=or2.orient-spindle-pid-ena addf orient.orient-spindle servo-thread addf pid.orient-spindle.do-pid-calcs servo-thread addf or2.orient-spindle-pid-ena servo-thread # setup Orient Spindle PID setp pid.orient-spindle.Pgain [ORIENT]P setp pid.orient-spindle.Igain [ORIENT]I setp pid.orient-spindle.Dgain [ORIENT]D setp pid.orient-spindle.FF0 [ORIENT]FF0 setp pid.orient-spindle.FF1 [ORIENT]FF1 setp pid.orient-spindle.FF2 [ORIENT]FF2 setp pid.orient-spindle.bias [ORIENT]BIAS setp pid.orient-spindle.deadband [ORIENT]DEADBAND setp pid.orient-spindle.maxerror [ORIENT]MAX_ERROR setp pid.orient-spindle.maxerrorI [ORIENT]MAX_ERROR_I setp pid.orient-spindle.maxoutput [ORIENT]MAX_OUTPUT setp orient.orient-spindle.vel-speed [ORIENT]VEL_SPEED setp orient.orient-spindle.tolerance [ORIENT]AT_ANGLE_TOL # Set asked mode from M19 P0/1/2 net spindle-orient-mode <= motion.spindle-orient-mode net spindle-orient-mode => orient.orient-spindle.mode # pid output mux with regular spindle modul net DAC-ctrl-out-orient <= pid.orient-spindle.output net DAC-ctrl-out-orient => orient.orient-spindle.cmd-orient net DAC-ctrl-out-velocity => orient.orient-spindle.cmd-velocity net DAC-computed-ctrl-out <= orient.orient-spindle.cmd-out net DAC-computed-ctrl-out => hpg.pwmgen.00.out.00.value # enable out for controler from regular spindle or orient mode net spindle-enable => orient.orient-spindle.ena-velocity net spindle-orient-enable-out <= orient.orient-spindle.ena-out net spindle-orient-enable-out => fur.do-6 # enable output for VFD muxed with regular spindle modul # encoder connections index + feedback net spindle-index-enable => pid.orient-spindle.index-enable # need investigation net spindle-pos => orient.orient-spindle.position net spindle-pos-deg <= orient.orient-spindle.scaled-angle-out # Spindle orient control signals net spindle-orient-enable <= motion.spindle-orient net spindle-orient-enable => orient.orient-spindle.enable net spindle-orient-enable => or2.orient-spindle-pid-ena.in0 net spindle-orient-home-enable <= orient.orient-spindle.homing net spindle-orient-home-enable => or2.orient-spindle-pid-ena.in1 net spindle-orient-or2home-ena <= or2.orient-spindle-pid-ena.out net spindle-orient-or2home-ena => pid.orient-spindle.enable net spindle-index-enable <=> orient.orient-spindle.index-enable net machinehomed <= axis.0.homed net machinehomed => orient.orient-spindle.machine-is-homed # Is oriented near signal + link position asked to component net spindle-orient-degree-cmd <= motion.spindle-orient-angle net spindle-orient-degree-cmd => orient.orient-spindle.angle net spindle-is-oriented <= orient.orient-spindle.is-oriented net spindle-is-oriented => motion.spindle-is-oriented ## Command to pid from component by velocity and velocity feedback net spindle-orient-vel <= orient.orient-spindle.command net spindle-orient-vel => pid.orient-spindle.command net spindle-vel-fb-rps => pid.orient-spindle.feedback

In my opinion this is not the cleanest way for homing the spindle because motion or halui do no know what append.
I think is better to think about adding this feature in motion and or halui.

Edit : homing does not work correctly
Last edit: 6 years 8 months ago by alkabal.

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

More
6 years 8 months ago #157063 by andypugh
Replied by andypugh on topic Orient component

tommylight wrote: You can speak here, that is OK, but you might have to wait till Andy gets to read this as he is the original programmer of the orient component.


Actually, it was Michael Haberler: linuxcnc.org/docs/2.7/html/man/man9/orient.9.html

Part of the reason for adding the multi-spindle changes (actually the main reason) is that I wanted to add spindles to the homing sequence.
But I simply have not done that yet.

If anyone fancies it, I imagine sections in the INI
[SPINDLE_0]
HOME_SEQUENCE 4
HOME_VELOCITY 10
And then the system sets spindle index-enable, rotates at the given speed, then stops the spindle when the index resets.
The following user(s) said Thank You: tommylight

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

More
6 years 8 months ago #157074 by bbsr_5a
Replied by bbsr_5a on topic Orient component
hi can i use this component also for a Racktoolchanger with steppers
or is it fixed on 360 deg Rotation axis only

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

More
6 years 8 months ago #157075 by andypugh
Replied by andypugh on topic Orient component

bbsr_5a wrote: hi can i use this component also for a Racktoolchanger with steppers
or is it fixed on 360 deg Rotation axis only


I am not sure what question you are asking, but you want to orient a spindle for a rack toolchanger then "orient" would be appropriate.

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

Time to create page: 0.258 seconds
Powered by Kunena Forum