Code of Puls Generator
Mostra commenti meno recenti
Is rtw able to create c-code of a Puls generator? I used it in my model to activate an event, which is used in a transition between two stateflow charts. Is this possible? Rtw doesn't create errors, but the programm doesn't work, the two charts should switch on/off a LED to simulate a blinker but they just glow.
1 Commento
bym
il 11 Set 2011
maybe your pulse generator is switching the LED too fast. Try a slower interval to see if it dims or blinks
Risposte (1)
Fangjun Jiang
il 11 Set 2011
0 voti
Go to Simulink library->Model-Wide Utilities, double click 'Block Support Table', search for 'Pulse Generator' block in the documentation, see if there is any notes regarding code generation support for this block. In R2007b, there are two notes that you might need to look into.
In what hardware are you running the generated C code? In my past experience, I avoided all time-related blocks because I don't know how it is going to access the real-time clock in my hardware module.
Categorie
Scopri di più su Code Generation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!