First Go at Simulation: Help needed with State Machine.

Discussions about systems engineering product SysML functionalities

Moderator: Moderators

First Go at Simulation: Help needed with State Machine.

Postby piccolocanadesevolante@gmail.com » Mon Jun 26, 2017 4:21 am

Hi,

I hope some kind soul will be able to help me, I'm new to Cameo Systems Modeller and I'm struggling a little with it.

I'm trying to verify a requirement via simulation; the requirement is for conformance to the CAN protocol. I've 'refined' the requirement with a simple constraint to start with: 29bit identifier.

I've created a simple state machine, the initial state is 'databus initialise' and the end state is 'databus operation'. My aim is that, the state machine transitions from 'initialise' to 'operation' if the '29bit identifier' constraint is met. I dragged the 'constraint' onto the 'transition' signal on the state machine but when I run the simulation, the 'databus initialise' state is highlighted in red and nothing happens. I'm clearly missing something and doing something very stupid but I can't figure it out at the moment.

Please see the attached screenshot.
You do not have the required permissions to view the files attached to this post.
piccolocanadesevolante@gmail.com
Forum Newbie
Forum Newbie
 
Posts: 10
Posts Rating:0
Joined: Tue Jun 20, 2017 2:33 pm

Re: First Go at Simulation: Help needed with State Machine.

Postby chairat_p » Tue Jun 27, 2017 9:35 pm

Hi
In order to perform transition with a condition, you'll need to apply 'Guard' field of the transition between those two states, e.g. MilCAN=29bit. The red highlighted came from either failed refined requirement or failed constraints. Please see also Cameo Simulation Toolkit 18.5 Documentation > Using guards on transit (https://docs.nomagic.com/display/CST185/Using+guards+on+transitions)
Best Regards,
Chairat
chairat_p
Forum Beginner
Forum Beginner
 
Posts: 31
Posts Rating:3
Joined: Thu Mar 16, 2017 1:35 am

Re: First Go at Simulation: Help needed with State Machine.

Postby piccolocanadesevolante@gmail.com » Sat Jul 29, 2017 6:22 am

Thanks for your help. The transition works as I want it to but I've hit another stumbling block. In my initial statemachine, I have a do activity inside it. Currently, when the activity completes, I have to trigger the transition manually in order to get to the final state. How do I achieve this automatically once the activity is done?
piccolocanadesevolante@gmail.com
Forum Newbie
Forum Newbie
 
Posts: 10
Posts Rating:0
Joined: Tue Jun 20, 2017 2:33 pm


Return to SysML

Who is online

Users browsing this forum: No registered users and 1 guest