Orient component revised

More
25 Nov 2020 13:00 #190256 by Serg452
Replied by Serg452 on topic Orient component revised
Yes. Omron MX2, input 1 FWD, input 2 REV
Schema in attachment
Attachments:

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

More
25 Nov 2020 13:30 #190258 by alkabal
Replied by alkabal on topic Orient component revised
thanks, so i understand this drive does not have any "simple enable" + dir input
But use 2 different enable for each direction

imo this definitely need to add a couple of pin and logic inside component.

Can you attach you hal config for spindle ? i like to see how you manage this

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

More
25 Nov 2020 18:20 #190279 by Serg452
Replied by Serg452 on topic Orient component revised
#############################
# --- SPINDLE ---
#############################

# --- Вращение шпинделя CW ---
net spindle-manual-cw <= to_pci.1.pinsRS.pin-29-in
net spindle-manual-cw => halui.spindle.0.forward
net spindle-cw-is-on => abs.1.is-positive to_pci.1.pins.pin-09-out
# --- Обдув двигателя ---
net spindle-is-on => halui.spindle.0.is-on or2.2.in1 to_pci.1.pins.pin-05-out

# --- Вращение шпинделя CCW ---
net spindle-manual-ccw <= to_pci.1.pinsRS.pin-27-in
net spindle-manual-ccw => halui.spindle.0.reverse
net spindle-ccw-is-on abs.1.is-negative => to_pci.1.pins.pin-11-out

# --- Вращение шпинделя STOP ---
net spindle-manual-stop <= to_pci.1.pinsRS.pin-28-in
net spindle-manual-stop => halui.spindle.0.stop

net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
net spindle-enable <= spindle.0.on
net spindle-cw <= spindle.0.forward
net spindle-ccw <= spindle.0.reverse
net spindle-brake <= spindle.0.brake


#
SPINDLE FEEDBACK
setp to_pci.1.feedback.enc_scale2 [SPINDLE]ENCODER_SCALE
net spindle-position to_pci.1.feedback.encoder2 => spindle.0.revs
net spindle-velocity to_pci.1.feedback.enc_vel2 => spindle.0.speed-in
net spindle-index-enable to_pci.1.feedback.index_en2 <=> spindle.0.index-enable
sets spindle-index-enable 1

#
SPINDLE CONTROL
setp to_pci.1.PWM.out_scale2 [SPINDLE]OUTPUT_SCALE
setp scale.2.gain 0.00542 #0.00542 точно на 500об
net spindle-speed-scale spindle.0.speed-out => scale.2.in
net spindle-speed-DAC scale.2.out => mux2.0.in0
net mux2-out mux2.0.out abs.1.in
net spindle-abs-pwm abs.1.out => to_pci.1.PWM.dcontrol2

#
SPINDLE-AT-SPEED
setp near.0.scale 1.08
net spindle-vel-cmd-rps => near.0.in1
net spindle-velocity => near.0.in2 #энкодер
net spindle-at-speed <= near.0.out => spindle.0.at-speed

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

More
25 Nov 2020 19:40 #190282 by alkabal
Replied by alkabal on topic Orient component revised
# --- Вращение шпинделя CW ---
net spindle-cw-is-on => abs.1.is-positive to_pci.1.pins.pin-09-out
# --- Обдув двигателя ---
net spindle-is-on => halui.spindle.0.is-on to_pci.1.pins.pin-05-out
# --- Вращение шпинделя CCW ---
net spindle-ccw-is-on => abs.1.is-negative to_pci.1.pins.pin-11-out

SPINDLE CONTROL
net spindle-abs-pwm abs.1.out => to_pci.1.PWM.dcontrol2


this is the control that need to be edited for include orient in your config

but you also need to check other red entry from my setup exemple

I have start to adapt component for use with double signal control for direction

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

More
25 Nov 2020 23:11 #190299 by alkabal
Replied by alkabal on topic Orient component revised
updated version with discussed change done here : forum.linuxcnc.org/10-advanced-configura...ised?start=50#190236

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

More
26 Nov 2020 19:25 #190353 by Serg452
Replied by Serg452 on topic Orient component revised
Install the component. When searching for a home, must the drive turn on to set the index mark? It does not turn on for me, and does not respond to M19. If the spindle is turned by hand or with the M3 code, the orientation is activated. Perhaps I was wrong in the configuration ...

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

More
26 Nov 2020 22:30 #190378 by alkabal
Replied by alkabal on topic Orient component revised
Please attach your config it's better for checking.

I thinks some link was possibly wrong

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

More
26 Nov 2020 23:30 #190382 by Serg452
Replied by Serg452 on topic Orient component revised
and message when searching (attachment)
Attachments:

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

More
27 Nov 2020 01:07 - 27 Nov 2020 02:20 #190387 by alkabal
Replied by alkabal on topic Orient component revised
Hi you can you try with this edited version ?

I does not really understand your spindle pid /scale but you need in the range value for orient pid (i suggest setup your spindle pwm/scale/pid with rpm value i think this is more easy to follow)
[ORIENT]
MAX_OUTPUT =
VEL_SPEED =

And for sure you need to tune orient pid ! (for start you need to found the minimum speed allowed by spindle drive with a pid with only FF0 to 1, all other to 0 )


good luck !

Ps : i'm unsure about this because you write cmd, the component need velocity feedback from encoder not velocity cmd from motion
IMO you need this "net spindle-velocity to_pci.1.feedback.enc_vel2 => spindle.0.speed-in" but i think this is RPS RELATIVE so you need to convert as RPM ABSOLUE

net spindle-vel-cmd-rpm-abs => pid.orient-spindle.feedback # ABSOLUE IF USE WITH RELAY FOR DIRECTION or if DRIVE NEED INPUT = PID always positive
net spindle-vel-cmd-rpm-abs => orient.orient-spindle.vel-feedback # ABSOLUE IF USE WITH RELAY FOR DIRECTION or if DRIVE NEED INPUT = PID always positive
Attachments:
Last edit: 27 Nov 2020 02:20 by alkabal.

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

More
27 Nov 2020 01:19 #190388 by alkabal
Replied by alkabal on topic Orient component revised
about forum.linuxcnc.org/media/kunena/attachme..._20201126_201742.jpg

I don't really know but the orient message use MDI so i suspect some of your button control change the program status and does not allow to use MDI command at this moment, i think nothing other from orient use MDI.

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

Time to create page: 0.099 seconds
Powered by Kunena Forum