Transition Action and Condition Action in Stateflow












0















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



enter image description here



enter image description here










share|improve this question

























  • See uk.mathworks.com/help/stateflow/ug/transition-action-types.html

    – am304
    Nov 16 '18 at 9:08
















0















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



enter image description here



enter image description here










share|improve this question

























  • See uk.mathworks.com/help/stateflow/ug/transition-action-types.html

    – am304
    Nov 16 '18 at 9:08














0












0








0


0






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



enter image description here



enter image description here










share|improve this question
















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



enter image description here



enter image description here







matlab charts simulink statechart stateflow






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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



















  • 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












1 Answer
1






active

oldest

votes


















1














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 for State 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 like e1[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 for State 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.






share|improve this answer


























  • Thanks Phil for you answer... i understood the concept

    – beastboy
    Nov 27 '18 at 11:37











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
});


}
});














draft saved

draft discarded


















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









1














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 for State 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 like e1[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 for State 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.






share|improve this answer


























  • Thanks Phil for you answer... i understood the concept

    – beastboy
    Nov 27 '18 at 11:37
















1














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 for State 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 like e1[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 for State 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.






share|improve this answer


























  • Thanks Phil for you answer... i understood the concept

    – beastboy
    Nov 27 '18 at 11:37














1












1








1







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 for State 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 like e1[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 for State 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.






share|improve this answer















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 for State 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 like e1[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 for State 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.







share|improve this answer














share|improve this answer



share|improve this answer








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



















  • 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


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







這個網誌中的熱門文章

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud

Zucchini