Error executing 'duration' operator in stateflow

조회 수: 4 (최근 30일)
Dheemanth D
Dheemanth D 2018년 6월 4일
편집: Amjad Elshenawy 2019년 9월 23일
Hi,
I am trying to use a 'duration' logic operator in stateflow and unable to execute. I keep getting the following error:
The 'duration' class does not support code generation.
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 6월 4일
I speculate that there is confusion between the duration operator of Stateflow and the duration datatype that is associated with datetime handling. I wonder how the code is intended to tell the difference?
Is it possible that you are applying duration to a number instead of to a logical result?

댓글을 달려면 로그인하십시오.

답변 (1개)

Amjad Elshenawy
Amjad Elshenawy 2019년 9월 23일
편집: Amjad Elshenawy 2019년 9월 23일
Hello Dheemanth
I guess you was using the "duration" operator insude a truth table.
If my assumption is correct, then you shall use the duration oprator inside statflow but outside the truth table.
You shall assign the output of the duration operator to a local variable and then pass this local variable to the truth table. The truth table shall then reside inside the statechart.

카테고리

Help CenterFile Exchange에서 Decision Logic에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by