How to solve the Data Type Mismatch error in Active cell balancing
15 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MAHENDRAN A
le 2 Jan 2023
Commenté : Fatma GÜZEL
le 17 Avr 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 commentaires
Réponse acceptée
Anthony Coadou
le 3 Jan 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 commentaires
Fatma GÜZEL
le 17 Avr 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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Naming Conventions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!