Orient component revised

More
19 Jan 2020 17:12 - 25 Nov 2020 01:37 #155163 by alkabal
Hi

I have start to play with orient modul, this is really not easy mostly by a lack of real and good explaination.

forum.linuxcnc.org/38-general-linuxcnc-q...ork-cannot-do-mode-0

This topic was the most usefull for understanding config problem.

IMO the component need some enhancement.

-1 add some logic for auto reset position using index-enable if current spindle position>360 and orient mode asked --- DONE
-2 add orient.timedelay and orient.near for filter output to motion.spindle-is-oriented ---- DONE
-3 add "or2" componnent inside modul for net spindle-velocity-enable to orient.enable-velocity-mode-in and orient.enable-out to hardawar pin ---- DONE
-4 add "mux2" componnent inside modul for net spindle-velocity-output to orient.cmd-velocity-mode-in and orient.cmd-velocity-or-position-out to hardwar pin ---- DONE
-5 add "scale" for output angular cmd value for pyvcp or other stuff ---- DONE output only 0/360
-6 add something mixing speed and position to pid --- NEED IDEA because i can't found the way for this.
-7 trying to add some value for compensating the time needed to stop spindle --- TODO
-8 trying to add a jog facilities --- NEED REVIEW but work with some possible issue
-9 add Auto homing spindle : possible at same time as machine do homing / possible at first M19 request / possible at first Spindle move M3/M4 --- DONE
-10 add Relay management for direction change if needed
-9 add Absolue/relative management for make it work with different spindle type (like reversiong with +-10v or reversing with relay)

Please i like to know what is your opinion ?



For my personnal use i have some question :

-a my encoder is 100ppr quadrature so is 400ppr, imo i need a divisble by 360 number for correct positionning (450/900/1800/3600)*4
-b i think about adding electromagnetic brake but is there very fast and allow to lock instantly when the good position is reached ?
-c did you think i can have accurate result with this change ?


For now the result with original component is not really good with my setup regarding to encoder resolution 1.111111111 degree / count but mostly because my spindle driver kbmg-212D take very long time for start rotation using very low command value. (maybee is possible to do something using some component or better pid tunning for pulse a little boost at start and quickly return to normal)


Br


edit : last revision and help for config forum.linuxcnc.org/10-advanced-configura...ent-revised?start=50
Attachments:
Last edit: 25 Nov 2020 01:37 by alkabal.

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

More
19 Jan 2020 19:43 - 19 Jan 2020 19:57 #155181 by alkabal
Replied by alkabal on topic Orient component
Sorry because i'm come from machinekit, i haven't see the source difference some of this change are already in your tree !

like near and timedelay
Last edit: 19 Jan 2020 19:57 by alkabal.

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

More
20 Jan 2020 02:06 - 20 Jan 2020 02:40 #155220 by alkabal
Replied by alkabal on topic Orient component
I have some trouble understanding the pid for the orient process for VFD.

IMH the pid only need to take the spindle as slow as possible, and component need to stop rotating as best as possible to position asked.
It may be necessary to anticipate the stop rather than waiting for the desired position which will be exceeded with inertia ?

With the suggested config i think :
PID feedback is a angular position scaled from encoder (1/rev)
PID Input is asked degree (360/rev)
PID output is some velocity.
Component try to stop as best as possible (i have some trouble understanding the debounce process)

Br
Last edit: 20 Jan 2020 02:40 by alkabal.

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

More
20 Jan 2020 17:52 #155266 by alkabal
Replied by alkabal on topic Orient component
Post 1 edited and orientv3.comp is attached.

I have do some change for make hal setup more easy, at the same time i have do some change regarding to command value
for pid.command using some low velocity
using pid.feedback-deriv and pid.command-deriv for position

Off course is possible 100% wrong direction, i need some review.

Br

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

More
24 Jan 2020 02:08 - 24 Jan 2020 02:15 #155619 by alkabal
Replied by alkabal on topic Orient component
Hi

I continue to speak alone :laugh:

First post original component with only some new pin for more easy and cleaner setup.

Now i like to have also some review with fully reviewed component, for my test it seem to be more accurate but maybee this is only with my hardawr or only some big mistake from me. I'm 100% sure this is possible to do a lot better but i think my attemps is not fully bad.

I hope some review from more powerfull Linuxcnc user.

Br
Attachments:
Last edit: 24 Jan 2020 02:15 by alkabal.

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

More
24 Jan 2020 20:13 #155674 by tommylight
Replied by tommylight on topic Orient component

I continue to speak alone :laugh:

I am listening !
I used orient once and it was implemented in the Yaskawa spindle drive, so i can not help much.
Thank you.

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

More
25 Jan 2020 14:30 #155724 by alkabal
Replied by alkabal on topic Orient component
Thanks lol

Did you think i better to speak about this over github ?

Br

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

More
25 Jan 2020 19:29 #155748 by tommylight
Replied by tommylight on topic Orient component
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.

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

More
31 Jan 2020 22:09 #156276 by nkp
Replied by nkp on topic Orient component
Do you use shome ?
(spindle home)

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

More
01 Feb 2020 01:58 - 01 Feb 2020 01:59 #156282 by alkabal
Replied by alkabal on topic Orient component
Hi

Not for now but i already have think about that and i does not found a correct way for include this to the component, because IMH the "motion system" need to know what append.

I'm not sure if this can do after machine homing or at first tool change ? (i don't play with orient for ATC)

IMO the best way is something like call a MDI_COMMAND G33 from component when machine is homed like Andy suggest in other forum topic or add some logic to the homing sequence.

Br
Last edit: 01 Feb 2020 01:59 by alkabal.

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

Time to create page: 0.164 seconds
Powered by Kunena Forum