Author Topic: Triggers, type: change, tutorials ?  (Read 2145 times)

KvThiel

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Triggers, type: change, tutorials ?
« on: May 08, 2014, 05:09:47 pm »
Hello,

I want some more information about the change triggers. In the learning center especially the signal trigger is defined. But how does the change trigger work? in the Help topic the change trigger type is defined as:

Change - specifies that the event is a ChangeEvent, which indicates that the transition is the result of a change in value of an attribute

I would like to use it, but I don't have an example to learn how to use it. Could someone help me with it?

Kind regards,

KvThiel

Paul Lotz

  • EA User
  • **
  • Posts: 248
  • Karma: +0/-0
    • View Profile
Re: Triggers, type: change, tutorials ?
« Reply #1 on: May 09, 2014, 02:58:54 am »
An example of a ChangeEvent is, for motion on an axis, the move completes (so, inPositionIsTrue=T, or movingIsTrue=F, or some other similar attribute).  (Prior to the event, of course, the values of these attributes were different.)

In a state machine model, you can add a transition between two states, define the transition Type as Change, define a specification for the trigger (in v 10.0.1009--I don't remember being able to do this before), and save this newly defined trigger.

I don't see a way to show the specification on the diagram, unfortunately.  (We found it more expressive in the past to define a transition with only a guard instead (e.g., [inPositionIsTrue=T], in order to distinguish visually between SignalEvents and ChangeEvents.  This was OK for us since we weren't trying to generate code, but a ChangeEvent is more proper UML.  It is legal to name the ChangeEvent inPositionIsTrue=T, but there may be a better way to express that.  I'd like to hear some ideas on this.)

Paul
« Last Edit: May 09, 2014, 03:01:23 am by pauljlotz »

servic

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Triggers, type: change, tutorials ?
« Reply #2 on: July 01, 2016, 02:43:15 am »
I have a similar problem. Unfortunately, I still do not understand how "Call" and "Change" triggers work. It seems that neither the called function or the variables in the "Specification value" are being evaluated during the simulation. Why is that? What is the trick?

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 589
  • Karma: +7/-0
    • View Profile
Re: Triggers, type: change, tutorials ?
« Reply #3 on: July 01, 2016, 12:41:39 pm »