Code of Puls Generator
Ältere Kommentare anzeigen
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 Kommentar
bym
am 11 Sep. 2011
maybe your pulse generator is switching the LED too fast. Try a slower interval to see if it dims or blinks
Antworten (1)
Fangjun Jiang
am 11 Sep. 2011
0 Stimmen
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.
Kategorien
Mehr zu Code Generation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!