How to solve the Data Type Mismatch error in Active cell balancing
15 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MAHENDRAN A
il 2 Gen 2023
Commentato: Fatma GÜZEL
il 17 Apr 2023
I've developed an Active cell balancing model. The model and scripting file as no error, but while running the simulation, im getting data type error like this
An error ocurred while propagating data type 'Double'. I even attached the model. Can anyone say solution to my data type mismatch error.
0 Commenti
Risposta accettata
Anthony Coadou
il 3 Gen 2023
Hello,
The problem is the size mismatch on port PWM. The block reads:
if SOC2<SOC1
s1=PWM;
s2=0;
elseif SOC1<SOC2
s1=0;
s2=PWM;
where s1 and s2 are alternatively assigned values of size 1 (scalar 0) and 2 (vector PWM). The MATLAB Function block tries to infer its output data types first, but fails to do so because of the type mismatch, and throws this cryptic error.
Hope that helps.
Anthony
3 Commenti
Fatma GÜZEL
il 17 Apr 2023
Hi sir,
Were you able to make any progress on the last subject you wanted to do?
I'm working on the same issue, I'd be glad if you could help.
There is no problem in controlling with PWM, but I still get a double error when I try to control it with PID.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Naming Conventions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!