Transition Action and Condition Action in Stateflow
In the below two state charts , the first one has an action to perform when it moves from StateA to StateD , ie. /{z=5};
and the second one has to perform the action {z=5};
I understand that this is a Transition Action , but i am unable to understand what is the different between the two transition
matlab charts simulink statechart stateflow
add a comment |
In the below two state charts , the first one has an action to perform when it moves from StateA to StateD , ie. /{z=5};
and the second one has to perform the action {z=5};
I understand that this is a Transition Action , but i am unable to understand what is the different between the two transition
matlab charts simulink statechart stateflow
See uk.mathworks.com/help/stateflow/ug/transition-action-types.html
– am304
Nov 16 '18 at 9:08
add a comment |
In the below two state charts , the first one has an action to perform when it moves from StateA to StateD , ie. /{z=5};
and the second one has to perform the action {z=5};
I understand that this is a Transition Action , but i am unable to understand what is the different between the two transition
matlab charts simulink statechart stateflow
In the below two state charts , the first one has an action to perform when it moves from StateA to StateD , ie. /{z=5};
and the second one has to perform the action {z=5};
I understand that this is a Transition Action , but i am unable to understand what is the different between the two transition
matlab charts simulink statechart stateflow
matlab charts simulink statechart stateflow
edited Nov 17 '18 at 0:35
Phil Goddard
8,8871823
8,8871823
asked Nov 16 '18 at 8:14
beastboybeastboy
68128
68128
See uk.mathworks.com/help/stateflow/ug/transition-action-types.html
– am304
Nov 16 '18 at 9:08
add a comment |
See uk.mathworks.com/help/stateflow/ug/transition-action-types.html
– am304
Nov 16 '18 at 9:08
See uk.mathworks.com/help/stateflow/ug/transition-action-types.html
– am304
Nov 16 '18 at 9:08
See uk.mathworks.com/help/stateflow/ug/transition-action-types.html
– am304
Nov 16 '18 at 9:08
add a comment |
1 Answer
1
active
oldest
votes
See the link given by @am304 for specific information, but in brief,
in your first image you have a
Transition Action
, which executes when the transition occurs (and after any state exit actions - if you had any forState A
),in your second image you have a
Condition Action
, which executes when any condition associated with the transition is determined to be true. You do not have any explicit conditions (i.e. nothing likee1[cond1]{z = 5}
) so the condition is considered to be true when any event occurs. This will execute even if the transition is not made (i.e. it is only dependent on the condition.) This means that it would occur before any state exit action (if you had any forState A
.)
Given the above, in your specific case (i.e. no exit actions for State A
and no conditions on the transition), the two will give the same result.
Thanks Phil for you answer... i understood the concept
– beastboy
Nov 27 '18 at 11:37
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53333849%2ftransition-action-and-condition-action-in-stateflow%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
See the link given by @am304 for specific information, but in brief,
in your first image you have a
Transition Action
, which executes when the transition occurs (and after any state exit actions - if you had any forState A
),in your second image you have a
Condition Action
, which executes when any condition associated with the transition is determined to be true. You do not have any explicit conditions (i.e. nothing likee1[cond1]{z = 5}
) so the condition is considered to be true when any event occurs. This will execute even if the transition is not made (i.e. it is only dependent on the condition.) This means that it would occur before any state exit action (if you had any forState A
.)
Given the above, in your specific case (i.e. no exit actions for State A
and no conditions on the transition), the two will give the same result.
Thanks Phil for you answer... i understood the concept
– beastboy
Nov 27 '18 at 11:37
add a comment |
See the link given by @am304 for specific information, but in brief,
in your first image you have a
Transition Action
, which executes when the transition occurs (and after any state exit actions - if you had any forState A
),in your second image you have a
Condition Action
, which executes when any condition associated with the transition is determined to be true. You do not have any explicit conditions (i.e. nothing likee1[cond1]{z = 5}
) so the condition is considered to be true when any event occurs. This will execute even if the transition is not made (i.e. it is only dependent on the condition.) This means that it would occur before any state exit action (if you had any forState A
.)
Given the above, in your specific case (i.e. no exit actions for State A
and no conditions on the transition), the two will give the same result.
Thanks Phil for you answer... i understood the concept
– beastboy
Nov 27 '18 at 11:37
add a comment |
See the link given by @am304 for specific information, but in brief,
in your first image you have a
Transition Action
, which executes when the transition occurs (and after any state exit actions - if you had any forState A
),in your second image you have a
Condition Action
, which executes when any condition associated with the transition is determined to be true. You do not have any explicit conditions (i.e. nothing likee1[cond1]{z = 5}
) so the condition is considered to be true when any event occurs. This will execute even if the transition is not made (i.e. it is only dependent on the condition.) This means that it would occur before any state exit action (if you had any forState A
.)
Given the above, in your specific case (i.e. no exit actions for State A
and no conditions on the transition), the two will give the same result.
See the link given by @am304 for specific information, but in brief,
in your first image you have a
Transition Action
, which executes when the transition occurs (and after any state exit actions - if you had any forState A
),in your second image you have a
Condition Action
, which executes when any condition associated with the transition is determined to be true. You do not have any explicit conditions (i.e. nothing likee1[cond1]{z = 5}
) so the condition is considered to be true when any event occurs. This will execute even if the transition is not made (i.e. it is only dependent on the condition.) This means that it would occur before any state exit action (if you had any forState A
.)
Given the above, in your specific case (i.e. no exit actions for State A
and no conditions on the transition), the two will give the same result.
edited Nov 17 '18 at 14:52
answered Nov 17 '18 at 0:45
Phil GoddardPhil Goddard
8,8871823
8,8871823
Thanks Phil for you answer... i understood the concept
– beastboy
Nov 27 '18 at 11:37
add a comment |
Thanks Phil for you answer... i understood the concept
– beastboy
Nov 27 '18 at 11:37
Thanks Phil for you answer... i understood the concept
– beastboy
Nov 27 '18 at 11:37
Thanks Phil for you answer... i understood the concept
– beastboy
Nov 27 '18 at 11:37
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53333849%2ftransition-action-and-condition-action-in-stateflow%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
See uk.mathworks.com/help/stateflow/ug/transition-action-types.html
– am304
Nov 16 '18 at 9:08