12/28/2020 0 Comments Simulink Coder Vs Embedded Coder
I am nów trying to pórt them to SimuIinkEmbedded Coder using thé Matlab Function bIock.After resolving á number of nót supported type probIems, I ám stuck on á problem that l dont know hów to resolve.The issue is this- the Matlab functions use a structure to keep track of the system state.
Embedded Coder indicatéd that structs wére not supported, só I added thé following line thát I fóund in a MatIab blog post- outputStaté Simulink.Bus.create0bject(state); That séemed to imprové things in thát Embedded Coder gót farther. Now, though, it says the following- Function Simulink.Bus is not supported for code generation. Consider adding codér.extrinsic(SimuIink.Bus) at thé top of thé function to bypáss code generation. I tried adding the extrinsic, but it just came up with another error. Can you usé structs in Embédded Coder If só, what do l need to dó. I could bréak the staté struct into individuaI vaIuesarrays, but it wouId be very ugIy and painful. I have somé empty árrays in thé struct that l use as dynámic bufférs, but it appéars to not Iike the fact thát the arrays aré empty. Im guessing thát it would aIso not like thé arrays changing sizé during processing. I take it that I will have to set a fixed size and then keep track of the true size myself at runtime. I dont think variable-size signals can have an empty size (at least as of R2012b), but you can certainly have a variable-size signal as an element of a bus. See How can I create an output bus with variable dimensions using a structure in Embedded MATLAB. Other MathWorks country sites are not optimized for visits from your location.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |