trying to get 8i20 moving
- M4MazakUser
- Offline
- Elite Member
Less
More
- Posts: 173
- Thank you received: 5
18 Nov 2022 02:50 #257000
by M4MazakUser
trying to get 8i20 moving was created by M4MazakUser
anyone got a mi to look thru my config not getting movement yet!
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
18 Nov 2022 13:14 #257031
by andypugh
Replied by andypugh on topic trying to get 8i20 moving
I think for bldc "iq" mode you need to set the bldc.N.init pin high to start the alignment sequence and start commutation. Maybe connect to the amp-enable pins?
Also, a minor point, but you should move all the other addf statements to above the hm2_write function for best performance.
Also, a minor point, but you should move all the other addf statements to above the hm2_write function for best performance.
Please Log in or Create an account to join the conversation.
- M4MazakUser
- Offline
- Elite Member
Less
More
- Posts: 173
- Thank you received: 5
18 Nov 2022 19:51 #257058
by M4MazakUser
Replied by M4MazakUser on topic trying to get 8i20 moving
Thanks, it's been 12years since my last config.
Please Log in or Create an account to join the conversation.
- M4MazakUser
- Offline
- Elite Member
Less
More
- Posts: 173
- Thank you received: 5
19 Nov 2022 05:04 #257093
by M4MazakUser
Replied by M4MazakUser on topic trying to get 8i20 moving
So below code seems to get the z motor reference done, but I'm scratching round like a chook trying to find anything to connect bldc.init-done that will let the motor do the iq move without throwing a joint axis error. It was suggested to connect it to estop, but this would mean id need to transfer estop to classicladder. (Probably)
Is it feasible to assign a big value to following error and assign it smaller with classicladder once init-done is set?
I'm open to any suggestions.
########
# Z [1] Axis
# ################
# axis enable chain
newsig emcmot.01.enable bit
sets emcmot.01.enable FALSE
net emcmot.01.enable => pid.1.enable
net enabble-1 joint.1.amp-enable-out => hm2_5i22.0.7i72.0.1.output-12
# net emcmot.01.enable <= joint.1.amp-enable-out
# bldc stuff
#pos command stuff
net emcmot.01.pos-cmd joint.1.motor-pos-cmd => pid.1.command
net motor.01.command pid.1.output => bldc.1.value
net motor.01.current bldc.1.out => hm2_5i22.0.8i20.0.5.current
net motor.01.pos-fb hm2_[HOSTMOT2](BOARD).0.encoder.01.position => pid.1.feedback
net motor.01.pos-fb => joint.1.motor-pos-fb #push copy back to Axis GUI
# commutation angle signals
net motor.01.rawcounts hm2_[HOSTMOT2](BOARD).0.encoder.01.rawcounts => bldc.1.rawcounts
net motor.01.index-enable hm2_[HOSTMOT2](BOARD).0.encoder.01.index-enable => bldc.1.index-enable
net motor.01.angle bldc.1.rotor-angle => hm2_5i22.0.8i20.0.5.angle
# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-mask 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-mask-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.scale [JOINT_1]INPUT_SCALE
# set PID loop gains from inifile
setp pid.1.Pgain [JOINT_1]P
setp pid.1.Igain [JOINT_1]I
setp pid.1.Dgain [JOINT_1]D
setp pid.1.bias [JOINT_1]BIAS
setp pid.1.FF0 [JOINT_1]FF0
setp pid.1.FF1 [JOINT_1]FF1
setp pid.1.FF2 [JOINT_1]FF2
setp pid.1.deadband [JOINT_1]DEADBAND
setp pid.1.maxoutput [JOINT_1]MAX_OUTPUT
Is it feasible to assign a big value to following error and assign it smaller with classicladder once init-done is set?
I'm open to any suggestions.
########
# Z [1] Axis
# ################
# axis enable chain
newsig emcmot.01.enable bit
sets emcmot.01.enable FALSE
net emcmot.01.enable => pid.1.enable
net enabble-1 joint.1.amp-enable-out => hm2_5i22.0.7i72.0.1.output-12
# net emcmot.01.enable <= joint.1.amp-enable-out
# bldc stuff
#pos command stuff
net emcmot.01.pos-cmd joint.1.motor-pos-cmd => pid.1.command
net motor.01.command pid.1.output => bldc.1.value
net motor.01.current bldc.1.out => hm2_5i22.0.8i20.0.5.current
net motor.01.pos-fb hm2_[HOSTMOT2](BOARD).0.encoder.01.position => pid.1.feedback
net motor.01.pos-fb => joint.1.motor-pos-fb #push copy back to Axis GUI
# commutation angle signals
net motor.01.rawcounts hm2_[HOSTMOT2](BOARD).0.encoder.01.rawcounts => bldc.1.rawcounts
net motor.01.index-enable hm2_[HOSTMOT2](BOARD).0.encoder.01.index-enable => bldc.1.index-enable
net motor.01.angle bldc.1.rotor-angle => hm2_5i22.0.8i20.0.5.angle
# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-mask 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.index-mask-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.scale [JOINT_1]INPUT_SCALE
# set PID loop gains from inifile
setp pid.1.Pgain [JOINT_1]P
setp pid.1.Igain [JOINT_1]I
setp pid.1.Dgain [JOINT_1]D
setp pid.1.bias [JOINT_1]BIAS
setp pid.1.FF0 [JOINT_1]FF0
setp pid.1.FF1 [JOINT_1]FF1
setp pid.1.FF2 [JOINT_1]FF2
setp pid.1.deadband [JOINT_1]DEADBAND
setp pid.1.maxoutput [JOINT_1]MAX_OUTPUT
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
21 Nov 2022 14:21 #257219
by andypugh
Replied by andypugh on topic trying to get 8i20 moving
Maybe the answer is to disconnect the axis position feedback until init-done is set?
I would suggest using a mux for this, switched by init-done, so that it passes position-cmd to position-fb when init-done = 0 and actual position feedback when init-done is true.
Hopefully(?) motor-pos-cmd = 0 and the final position = 0 when the switch occurs.
I would suggest using a mux for this, switched by init-done, so that it passes position-cmd to position-fb when init-done = 0 and actual position feedback when init-done is true.
Hopefully(?) motor-pos-cmd = 0 and the final position = 0 when the switch occurs.
Please Log in or Create an account to join the conversation.
- M4MazakUser
- Offline
- Elite Member
Less
More
- Posts: 173
- Thank you received: 5
22 Nov 2022 09:28 #257311
by M4MazakUser
Replied by M4MazakUser on topic trying to get 8i20 moving
I connected the minferror/maxferror to classicladder when init-done is 0, ferror is 6mm, it can become less when its 1.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
22 Nov 2022 09:43 #257313
by andypugh
Replied by andypugh on topic trying to get 8i20 moving
If you are loading CL _just_ to do this then the mux HAL component might be less overhead. If CL is doing other things too then this is probably a reasonable solution.
Please Log in or Create an account to join the conversation.
- M4MazakUser
- Offline
- Elite Member
Less
More
- Posts: 173
- Thank you received: 5
23 Nov 2022 11:22 #257450
by M4MazakUser
Replied by M4MazakUser on topic trying to get 8i20 moving
Yeah I'm using cl for turret and a few other things.
Please Log in or Create an account to join the conversation.
Time to create page: 0.112 seconds