software interrupt

조회 수: 8 (최근 30일)
MathWorks Support Team
MathWorks Support Team 2018년 6월 22일
답변: MathWorks Support Team 2018년 6월 22일
I am developing a near time system data in the data historian have data feed into a program. It fills up a buffer and when the buffer gets full, I want to be able to know that and act on that and do processing.
Is there a software interrupt or something that will allow me to do this?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2018년 6월 22일
In order to do this, you can use a while loop to continuously fill the buffer and have an if-statement check whether the buffer is full. If it is full, you can run the desired processing in the if statement and then continue filling after the if statement is completed. The while loop can continue to run for however many iterations you would like.
A sample file is attached. Please note this is simplified code just demonstrating the concept described above and does not necessarily account for edge cases nor optimization.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품


릴리스

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by