From: Patrick on 6 Aug 2010 14:28 In Stateflow, is there a way to output to MATLAB the current state of the state machine? That is, without having to manually create a variable that somehow maps to the states and have it output a different value "manually" in each state. Thanks!
From: checker i on 6 Aug 2010 15:59 "Patrick " <pomalle(a)sandia.gov> wrote in message <i3hk7m$6ol$1(a)fred.mathworks.com>... > In Stateflow, is there a way to output to MATLAB the current state of the state machine? That is, without having to manually create a variable that somehow maps to the states and have it output a different value "manually" in each state. Thanks! As far as I know, we can only get the current state information in stateflow debugging mode. In non-debugging mode, I think you should create a varaible manually and assign different value in each state.
From: Patrick on 6 Aug 2010 18:00 "checker i" <checker.im(a)gmail.com> wrote in message <i3hpi8$ifs$1(a)fred.mathworks.com>... > "Patrick " <pomalle(a)sandia.gov> wrote in message <i3hk7m$6ol$1(a)fred.mathworks.com>... > > In Stateflow, is there a way to output to MATLAB the current state of the state machine? That is, without having to manually create a variable that somehow maps to the states and have it output a different value "manually" in each state. Thanks! > > As far as I know, we can only get the current state information in stateflow debugging mode. > In non-debugging mode, I think you should create a varaible manually and assign different value in each state. Thanks! I was afraid that was the answer. I made an enumerated type to handle it so its not so bad. Wouldn't like it if I had a large state machine, though.
From: checker i on 9 Aug 2010 09:40 "Patrick " <pomalle(a)sandia.gov> wrote in message <i3i0lo$l24$1(a)fred.mathworks.com>... > "checker i" <checker.im(a)gmail.com> wrote in message <i3hpi8$ifs$1(a)fred.mathworks.com>... > > "Patrick " <pomalle(a)sandia.gov> wrote in message <i3hk7m$6ol$1(a)fred.mathworks.com>... > > > In Stateflow, is there a way to output to MATLAB the current state of the state machine? That is, without having to manually create a variable that somehow maps to the states and have it output a different value "manually" in each state. Thanks! > > > > As far as I know, we can only get the current state information in stateflow debugging mode. > > In non-debugging mode, I think you should create a varaible manually and assign different value in each state. > > Thanks! I was afraid that was the answer. I made an enumerated type to handle it so its not so bad. Wouldn't like it if I had a large state machine, though. I have not used stateflow testpoints before. I was just going over these and thought they could help you with the state information http://www.mathworks.com/access/helpdesk/help/toolbox/stateflow/ug/f5-1024739.html
|
Pages: 1 Prev: USB HID interfacing Next: Running matlab from xterm from a cronjob? (Matlab-xterm-cronjob); |