Тёмный

How to design an increasing and decreasing toggle counter in Simulink - MATLAB R2019a? 

Programmer World
Подписаться 13 тыс.
Просмотров 18 тыс.
50% 1

This video shows the steps to design a increasing and decreasing counter which toggles after reaching a certain threshold value in Simulink MATLAB - R2019a.
In this video basically it toggles to decreasing counter after reaching to the MAX value and reverts to increasing counter once it reaches to MIN value. In this video, MAX values is assumed to be 5 and MIN value is assumed to be 0. The key concept in designing this counter is to ensure that between the MIN and MAX value the counter retains its flow (i.e. basically the slope of counter is retained). So, if a counter is increasing it will continue with increasing part unless it reaches to MAX value. Similarly, if a counter is decreasing it will continue the decreasing order until it reaches the MIN value. To get the increasing or decreasing information a derivative block is used in the model which gives the slope of the model.
In this video pure Simulink blocks are used to implement the concept and no other features of MATLAB like Stateflow or MATLAB code has been used.
More details on this video can be found at the below link as well:
programmerworl...
Some of the other counter videos created by me on RU-vid can be found in the below links:
How to design variable step increasing and decreasing counter in Simulink?
• How to design variable...
How to design a Decreasing Counter and reset counter in Simulink?
• How to design a Decrea...
How to design counter in App Designer using MATLAB function and global variables and Simulink Model?
• How to design counter ...
We will be glad to hear from you regarding any query, suggestions or appreciations at: programmerworld1990@gmail.com

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 13   
@joseluisromeroarias6490
@joseluisromeroarias6490 5 лет назад
Thank you so much Sir, that helps me a lot!
@PurviShrivastava-m3h
@PurviShrivastava-m3h 5 месяцев назад
I hope you are understanding too what you are explaining ..
@amrahmed-vb4he
@amrahmed-vb4he 4 года назад
thank you so much
@isamkaraman9810
@isamkaraman9810 6 месяцев назад
How can i implement the same concepts but except of reaching a threshold ..it switches from increasing to decreasing based on a push button ?
@ProgrammerWorld
@ProgrammerWorld 6 месяцев назад
Assuming the PUSH button action will be from an App's GUI (designed in App designer). Then in that case, just set a base workspace variable value in the callback method of the Push button. In Simulink, use IF ACTION SUBSYSTEM block based on this variable's value to switch/ toggle between the increasing and decreasing counter. Hope it helps. Cheers Programmer World programmerworld.co/ --
@ElafEbdah
@ElafEbdah 6 месяцев назад
@@ProgrammerWorld can you further explain how to implement the if action subsystem ?
@ProgrammerWorld
@ProgrammerWorld 6 месяцев назад
@ElafEbdah Will try to make a tutorial on this soon.
@muruganc8098
@muruganc8098 Месяц назад
I couldn't stairs output which you have shown. instead of that i got slope output.
@siddhubidwe4239
@siddhubidwe4239 7 месяцев назад
How to design same without using derivative block
@ProgrammerWorld
@ProgrammerWorld 6 месяцев назад
Simulink models simply translates a mathematical equation into block diagrams. Now, for a counter, the mathematical equation is >> Y(t) = Y(t-1) + 1; %Basically increasing the value by 1 in each time step 't'. So, to get Y(t-1), we will need delay block. The only other option would be to use CLOCK or Signal Editor (Signal Builder in previous versions) blocks. However, in these blocks the signal for the entire duration would need to be manually orchestrated and hence, not recommended.
@nikhilgupta1228
@nikhilgupta1228 2 года назад
Not working
@ProgrammerWorld
@ProgrammerWorld 2 года назад
Could you please elaborate the error or issue you are observing? Cheers Programmer World programmerworld.co -
Далее
1 Subscriber = 1 Penny
00:17
Просмотров 50 млн
How to get skins for FREE? #standoff #skins #coins
00:34
Effectively Parameterize Your Simulink Models
13:03
Просмотров 10 тыс.
StateFlow Basics
29:09
Просмотров 50 тыс.