Page 1 of 1

Matlab Variables do not Propagate to C-Function Call Block

Posted: Fri Aug 22, 2008 5:38 pm
by malife
Hello Lubin,
I am currently working on 0.98d so maybe you already fixed that in the latest version (which I hope you'll send it to me when you get back from vacations :-) )

But the issue is the following. I have a matlab script that initializes different variables most of it related to sizes and locations of signals. For instance I have a MAX_POSSIBLE variable that determines the maximum amount of bytes I can receive between sample times in the interrupt driven UART. If I configure that value using the variable (instead of just the number) in the C-function call dialog, for instance, for the input size. It will not recognize it; furthermore if I try to compile it says that it can not convert "" to an integer.

Hope this is a simple one to fix. Certainly it is not a show-stopper since I can just put the number manually, but it is convenient that if I change something (like baud rate) all the sizes get reconfigured by reading those variables.

Thanks!

Re: Matlab Variables do not Propagate to C-Function Call Block

Posted: Fri Aug 22, 2008 11:29 pm
by LubinKerhuel
Ok, Will have a look on that.
Thanks for the bug report !
Lubin

Re: Matlab Variables do not Propagate to C-Function Call Block

Posted: Tue Sep 02, 2008 8:03 pm
by LubinKerhuel
Hi Mariano,
It seems to be quite complicated to modify the blockset.

Anyway, there may be a way to do what you wants :
replace : YoutVariable by ['[' num2str(YourVariable) ']'] in the dialog box.
I should work for all blocks.

Lubin