Main Content

이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

상태 및 천이 구문

동작 및 조건을 사용하여 차트 작동 방식 표현

상태 간 천이가 발생하는 시점과 동작이 실행되는 시점을 지정하여 Stateflow® 차트의 실행을 제어합니다. 이벤트를 브로드캐스트하여 상태 실행을 동기화합니다. 데이터 값에서 변경을 감지하고 차트 실행 중에 어느 상태가 활성 상태인지 검사합니다.

블록

모두 확장

Chart유한 상태 머신으로 제어 논리 구현
State Transition TableRepresent modal logic in tabular format
Truth TableRepresent logical decision-making behavior with conditions, decisions, and actions

Stateflow 구문

모두 확장

변경 감지

hasChangedDetect change in data since last time step
hasChangedFromDetect change in data from specified value
hasChangedToDetect change in data to specified value
change데이터 값 변경 시 암시적 이벤트 생성

경계 검출

crossingDetect rising or falling edge in data since last time step
fallingDetect falling edge in data since last time step
risingDetect rising edge in data since last time step

메시지 활동

sendBroadcast message or event
receiveExtract message from queue
discardDiscard message
forward메시지 전달하기
isvalidDetermine if message is valid
lengthDetermine length of message queue

상태 활동

in상태 활동 검사
enterGenerate implicit event when state becomes active
exitGenerate implicit event when state becomes inactive

데이터형 변환

boolean숫자형 값을 부울 값으로 변환
ascii2struint8 유형의 배열을 문자열로 변환하기
str2ascii문자열을 uint8 유형의 배열로 변환하기
str2double문자열을 배정밀도 값으로 변환하기
string값을 string형으로 변환
tostring값을 string형으로 변환
typeType of Stateflow data object

문자열 생성 및 결합

blanksCharacter array of spaces
plusConcatenate strings
strcpy문자열 값 할당하기
strcat문자열 결합하기

문자열 데이터 속성

isletterDetermine which characters are letters
isspaceDetermine which characters are spaces
isstringDetermine if input is string
strlen문자열의 길이 결정하기
strlengthDetermine length of string

부분문자열 찾기 및 바꾸기

contains문자열에 부분문자열이 포함되었는지 확인
startsWithDetermine if string starts with substring
endsWithDetermine if string ends with substring
strfind문자열 내에서 부분문자열 찾기
extractAfterExtract substring after position
extractBefore위치 앞의 부분문자열 추출
substr문자열에서 부분문자열 추출하기
replaceFind and replace substrings
replaceBetweenReplace substrings between start and end points
strrepFind and replace substrings
eraseDelete substrings within strings
eraseBetweenDelete substring between start and end points
insertAfterInsert string after substring
insertBeforeInsert string before substring

문자열 데이터 편집하기

lowerConvert string to lowercase
upperConvert a string to uppercase
reverseReverse order of characters in strings
stripRemove leading and trailing characters from string
strtrimRemove leading and trailing white space from string

문자열 데이터 비교하기

matchesDetermine if two strings match
strcmp문자열 비교(대/소문자 구분)
strcmpiCompare strings (case insensitive)
strncmpCompare first N characters of strings (case sensitive)
strncmpiCompare first N characters of strings (case insensitive)

시간 논리

after이벤트 브로드캐스트 또는 지정된 시간 후에 차트 실행
at이벤트 브로드캐스트 또는 지정된 시간에 차트 실행
beforeExecute chart before event broadcast or specified time
everyExecute chart at regular intervals
duration조건이 유효한 시간
elapsed상태가 활성화된 이후의 시간
countNumber of chart executions during which condition is valid
temporalCountNumber of events, chart executions, or time since state became active

도움말 항목