This commit is contained in:
crinq
2019-05-01 23:13:22 +02:00
parent d39084b93a
commit 81bdaa9d2a
2 changed files with 24 additions and 1 deletions

22
conf/template/rl.txt Normal file
View File

@@ -0,0 +1,22 @@
link pid
link pmsm
conf0.max_ac_cur = 15
load rl
rl0.rt_prio = 6
hv0.en = rl0.en_out
hv0.d_cmd = rl0.ud_cmd
hv0.q_cmd = rl0.uq_cmd
rl0.id_fb = hv0.id_fb
rl0.iq_fb = hv0.iq_fb
rl0.ud_fb = hv0.ud_fb
rl0.uq_fb = hv0.uq_fb
hv0.cmd_mode = 0
hv0.pos = 0
term0.wave0 = rl0.ud_cmd
term0.wave1 = hv0.id_fb
term0.wave2 = rl0.r
term0.wave3 = rl0.ld
term0.gain0 = 5
term0.gain1 = 5
term0.gain2 = 30
term0.gain3 = 3000

View File

@@ -49,7 +49,7 @@ static void nrt_init(void *ctx_ptr, hal_pin_inst_t *pin_ptr) {
PIN(r_test_cur) = 5;
PIN(r_test_time) = 0.5;
PIN(l_test_volt) = 10;
PIN(l_test_time) = 1;
PIN(l_test_time) = 1.5;
PIN(ki) = 10;
}
@@ -127,6 +127,7 @@ static void rt_func(float period, void *ctx_ptr, hal_pin_inst_t *pin_ptr) {
PIN(en_out) = 0.0;
PIN(timer) = 0.0;
PIN(et) = PIN(ld) / PIN(r);
PIN(en) = 0;
}
}