Problems with adding block from target link into a model
16 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi
I’m trying to add a block from the library TargetLink with the command: "add_block('tllib/Constant','mysys/nameofconstant','Position',[]).
But Matlab answers with:"??? Error using ==> add_block There is no block named 'tllib/Constant'.".
But if there already exist a model in the same folder containing a TargetLink block, then Matlab has no problem executing the command.
Do anyone have a idea how to fix this problem or how to make a work around.
//Patrik
0 comentarios
Respuesta aceptada
Arnaud Miege
el 16 de Jun. de 2011
You maybe need to load the library before using add_block:
load_system('tllib');
add_block('tllib/Constant','mysys/nameofconstant','Position',[]);
HTH,
Arnaud
0 comentarios
Más respuestas (2)
Fangjun Jiang
el 16 de Jun. de 2011
Yep, this happens. What you need to do is to make sure that 'tllib' is loaded first. You can use load_system('tllib');
0 comentarios
Ver también
Categorías
Más información sobre Configure and View Diagnostics en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!