8i20

More
01 Mar 2022 19:08 #236123 by dkraft
8i20 was created by dkraft
I'm trying to get my 7i95 (already have serial FW to support sserials) to drive the 8i20 but am struggling with the driver flow -
Can't find any examples  - Don't need stepgen or PWM. Where can I find a setup for the 8i20 ?

Thanks.
 

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

More
01 Mar 2022 19:26 #236124 by PCW
Replied by PCW on topic 8i20
Here is the basic setup for one joint.

This assumes quadrature incremental encoder feedback so needs to do a "Thump"
magnetic alignment to get the initial angle. (man bldc)

Note that you need to get at least three things right for this to work:
Poles, encoder count direction/scaling and initial offset
(dependent on UVW connections)

#bldc setup

loadrt bldc cfg=q (quadrature mode)

setp bldc.0.initvalue .5 (1/2 full scale current during alignment)
setp bldc.0.scale -4000 (-4000 counts per turn)
setp bldc.0.poles 4

# position command signals

net emcmot.00.pos-cmd joint.0.motor-pos-cmd => pid.0.command
net motor.00.command pid.0.output => bldc.0.value
net motor.00.current bldc.0.out => hm2_[HOSTMOT2](BOARD).0.8i20.0.0.current


# commutation angle signals
net motor.00.rawcounts hm2_[HOSTMOT2](BOARD).0.encoder.00.rawcounts => bldc.0.rawcounts
#net motor.00.index-enable hm2_[HOSTMOT2](BOARD).0.encoder.00.index-enable => bldc.0.index-enable
net motor.00.angle bldc.0.rotor-angle => hm2_[HOSTMOT2](BOARD).0.8i20.0.0.angle
The following user(s) said Thank You: dkraft

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

More
01 Mar 2022 22:11 #236134 by dkraft
Replied by dkraft on topic 8i20
I get
parameter or pin 'bldc.0.initvalue' not found

and I don't see it in the show param -
42 float RW 0 bldc.0.drive-offset
42 s32 RW 0 bldc.0.encoder-offset
42 s32 RO 2 bldc.0.in-type
42 s32 RO 0 bldc.0.out-type
42 s32 RW 8 bldc.0.poles
42 s32 RW 8192 bldc.0.scale
42 s32 RW 44960 bldc.0.tmax
42 bit RO FALSE bldc.0.tmax-increased

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

More
01 Mar 2022 22:19 #236135 by PCW
Replied by PCW on topic 8i20
Its a pin: (LinuxCNC 2.8.2)

Component Pins:
Owner Type Dir Value Name
42 float OUT 0 bldc.0.A-value
42 float OUT 0 bldc.0.B-value
42 float OUT 0 bldc.0.C-value
42 bit IN FALSE bldc.0.init
42 bit OUT FALSE bldc.0.init-done
42 float IN 0.2 bldc.0.initvalue <<<<<<<<<<<<<<<<<<<<<<<<<<
42 float IN 90 bldc.0.lead-angle
42 float OUT 0 bldc.0.out
42 float OUT 0 bldc.0.out-abs
42 bit OUT FALSE bldc.0.out-dir
42 float OUT 0 bldc.0.phase-angle
42 s32 IN 0 bldc.0.rawcounts
42 bit IN FALSE bldc.0.rev
42 float OUT 0 bldc.0.rotor-angle
42 s32 OUT 0 bldc.0.time
42 float IN 0 bldc.0.value

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

More
01 Mar 2022 22:29 #236138 by dkraft
Replied by dkraft on topic 8i20
LinuxCNC 2.9 - doesn't seem to be there.

42 float OUT -0.1096591 bldc.0.A-value
42 float OUT 0.0875005 bldc.0.B-value
42 float OUT 0.02215855 bldc.0.C-value
42 float IN 45 bldc.0.lead-angle
42 float OUT -0.1159668 bldc.0.out ==> motor.00.current
42 float OUT 0.1159668 bldc.0.out-abs
42 bit OUT TRUE bldc.0.out-dir
42 float OUT 0.4472656 bldc.0.phase-angle ==> x-meas-angle
42 s32 IN 2924 bldc.0.rawcounts <== motor.00.rawcounts
42 bit IN FALSE bldc.0.rev
42 float OUT 0.5722656 bldc.0.rotor-angle ==> motor.00.angle
42 s32 OUT 3700 bldc.0.time
42 float IN -0.1159668 bldc.0.value <== motor.00.command

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

More
01 Mar 2022 22:30 #236139 by PCW
Replied by PCW on topic 8i20
Did you load bldc with cfg=q ?

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

More
01 Mar 2022 23:05 #236140 by dkraft
Replied by dkraft on topic 8i20
sheez - so picky! (that was it.)

Here's the reason I'm after that -

Every time I init, the drive faults no matter how low I set the current-maxlim
If I Disconnect two leads to the motor, of course it doesn't.
How can I troubleshoot this? am I understanding the current limits?
Thanks!

36 float RW 1 hm2_7i95.0.8i20.0.0.angle-maxlim
36 float RW 0 hm2_7i95.0.8i20.0.0.angle-minlim
36 float RW 1 hm2_7i95.0.8i20.0.0.angle-scalemax
36 float RW 655.35 hm2_7i95.0.8i20.0.0.bus-voltage-scalemax
36 float RW 65535 hm2_7i95.0.8i20.0.0.card-temp-scalemax
36 float RW 1.5 hm2_7i95.0.8i20.0.0.current-maxlim
36 float RW -1.5 hm2_7i95.0.8i20.0.0.current-minlim
36 float RW 7.5 hm2_7i95.0.8i20.0.0.current-scalemax
36 u32 RW 0x000088B8 hm2_7i95.0.8i20.0.0.nvbrakeoffv
36 u32 RW 0x00009088 hm2_7i95.0.8i20.0.0.nvbrakeonv
36 u32 RW 0x00009664 hm2_7i95.0.8i20.0.0.nvbusoverv
36 u32 RW 0x00001194 hm2_7i95.0.8i20.0.0.nvbusundervmax
36 u32 RW 0x00000DAC hm2_7i95.0.8i20.0.0.nvbusundervmin
36 u32 RW 0x00000000 hm2_7i95.0.8i20.0.0.nvkdihi
36 u32 RW 0x00007D00 hm2_7i95.0.8i20.0.0.nvkdil
36 u32 RW 0x0000C350 hm2_7i95.0.8i20.0.0.nvkdilo
36 u32 RW 0x00000032 hm2_7i95.0.8i20.0.0.nvkdp
36 u32 RW 0x00000000 hm2_7i95.0.8i20.0.0.nvkqihi
36 u32 RW 0x00007D00 hm2_7i95.0.8i20.0.0.nvkqil
36 u32 RW 0x0000C350 hm2_7i95.0.8i20.0.0.nvkqilo
36 u32 RW 0x00000032 hm2_7i95.0.8i20.0.0.nvkqp
36 u32 RW 0x000002EE hm2_7i95.0.8i20.0.0.nvmaxcurrent
36 u32 RW 0x00000009 hm2_7i95.0.8i20.0.0.nvrembaudrate
36 u32 RO 0x0000008B hm2_7i95.0.8i20.0.0.swrevision
36 u32 RO 0x0A00010B hm2_7i95.0.8i20.0.0.unitnumber

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

More
01 Mar 2022 23:14 #236141 by PCW
Replied by PCW on topic 8i20
What actual fault are you getting?

It looks like there are no communications because the bus voltage
and temperature are wrong/crazy

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

More
01 Mar 2022 23:27 #236143 by dkraft
Replied by dkraft on topic 8i20
Its the hm2_7i95.0.8i20.0.0.fault.overcurrent
I'm able to see 0 serial faults.
It still reports position and realtime pin on show hal configuration.

It recovers upon linuxcnc restart.
It "tings" the motor when it happens.

I'm able to put a 1ohm 100watt resistor on one leg (which quickly gets hot!) but it sings - indicating some kind of AC modulation.

Open voltage on the motor leg power is nominally within range of input voltage (77 volts)

exchanged 8i20 modules does same thing.

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

More
01 Mar 2022 23:28 #236144 by dkraft
Replied by dkraft on topic 8i20
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_eth board_ip="10.10.10.10"
loadrt pid names=pid.x,pid.y,pid.z,pid.s
loadrt bldc cfg=q,q,q

addf [HMOT](CARD0).0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.x.do-pid-calcs servo-thread
addf pid.y.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf pid.s.do-pid-calcs servo-thread
addf bldc.0 servo-thread
addf bldc.1 servo-thread
addf bldc.2 servo-thread
addf [HMOT](CARD0).0.write servo-thread

# external output signals

# external input signals

#*******************
# AXIS X JOINT 0
#*******************
setp [HMOT](CARD0).0.8i20.0.0.current-maxlim 0.020
setp [HMOT](CARD0).0.8i20.0.0.current-minlim -0.020

newsig emcmot.0.enable bit
sets emcmot.0.enable FALSE
net emcmot.0.enable => [HMOT](CARD0).0.8i20.0.0.fault.no-enable-not
net emcmot.0.enable <= pid.x.enable

# -- BLDC setup --
setp bldc.0.initvalue 0.2
setp bldc.0.drive-offset 0
setp bldc.0.rev 0
setp bldc.0.lead-angle 45
#setp bldc.0.encoder-offset 0
setp bldc.0.poles 8
setp bldc.0.scale -8192

setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true

#net x-pos-rawcounts bldc.0.rawcounts
#net x-bldc-current bldc.0.out
net x-meas-angle bldc.0.phase-angle
#net x-output bldc.0.value
net x-index-enable <=> pid.x.index-enable
#net x-enable => pid.x.enable
#net x-pos-cmd => pid.x.command
net x-pos-fb => pid.x.feedback
#net x-output <= pid.x.output

# position command signals

net emcmot.00.pos-cmd joint.0.motor-pos-cmd => pid.x.command
net motor.00.command pid.x.output => bldc.0.value
net motor.00.current bldc.0.out => [HMOT](CARD0).0.8i20.0.0.current


# commutation angle signals
net motor.00.rawcounts [HMOT](CARD0).0.encoder.00.rawcounts => bldc.0.rawcounts
#net motor.00.index-enable [HMOT](CARD0).0.encoder.00.index-enable => bldc.0.index-enable
net motor.00.angle bldc.0.rotor-angle => [HMOT](CARD0).0.8i20.0.0.angle

# ---Encoder feedback signals/setup---

setp [HMOT](CARD0).0.encoder.00.counter-mode 0
setp [HMOT](CARD0).0.encoder.00.filter 1
setp [HMOT](CARD0).0.encoder.00.index-invert 0
setp [HMOT](CARD0).0.encoder.00.index-mask 0
setp [HMOT](CARD0).0.encoder.00.index-mask-invert 0
setp [HMOT](CARD0).0.encoder.00.scale [JOINT_0]ENCODER_SCALE

net x-pos-fb <= [HMOT](CARD0).0.encoder.00.position
net x-vel-fb <= [HMOT](CARD0).0.encoder.00.velocity
net x-pos-fb => joint.0.motor-pos-fb

#net x-pos-rawcounts <= [HMOT](CARD0).0.encoder.00.rawcounts



# ---setup home / limit switch signals---

net x-home-sw => joint.0.home-sw-in
net x-neg-limit => joint.0.neg-lim-sw-in
net x-pos-limit => joint.0.pos-lim-sw-in

#*******************

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

Moderators: PCWjmelson
Time to create page: 0.349 seconds
Powered by Kunena Forum