RYA1 State Chart Simulator (YAKINDU)


Outline

YAKINDU Statechart Tools (itemis) offer an integrated modeling environment for the specification and development of reactive, event-driven systems based on the concept of state machines. The State Chart production simulates YAKINDU state chart models and generates a signal with the resulting state and variable information.

Platforms:
32/64bit 32/64bit 32/64bit
Requirements:
  • YAKINDU state charts (com.yakindu.sct.generator.image.feature). Will be installed automatically if not available.
Known limitations:
  • Simulation may be time consuming depending of the model. To avoid system timeout, the timeout parameter may be set.
  • Domain base need to be set to 1ms due to YAKINDU simulation engine limitations.
Status:
  • Beta
Input signals:
  • 0..N inputs supported.
  • Primitve signals (Integer, Float, String, Event/Enumeration, Logic): Will be mapped to writable variables and events with equal names. The signal value is used as variable value of event parameter.
  • Primitve signals (usually String or Event/Enumeration) with "event" content descriptor : Will be feeded as input events. The signal value is used as event name; no parameter.
  • Struct or array signals (Integer, Float, String, Boolean and Enumeration members): Will be mapped to writable variables and events with equal names. The member value is used as variable value of event parameter.
  • Struct or array signals with "event" content descriptor : 1st member with "evttype" content descriptor will be used as event name, 1st member  with "evtparam" content descriptor will be used as event parameter.
Output signal:
  • String: State information.
  • Event(Enumeration): State information.
  • Struct: All variables that are not assigned to input signals plus state information.
Parameters:
  • Process type: Process type of the resulting signal. In case of continuous process type, the model will be simulated with the given rate. In case of discrete process type, the model is triggered with every change of the input signals.
  • Signal type: Signal type of the resulting signal.
  • Signal descriptor: Signal descriptor of the resulting signal.
  • Domain base: Domain base of the resulting signal. Please set to 1 ms (limitation).
  • Domain range: Domain range of the resulting signal.
  • Chart: Select the state chart defined in the preferences.
  • Timeout[ms]: Increase the value in case of timeout events.
  • script: Implement functions to be called from simulation.
Tutorials:


Input Signal Configuration

The production accepts 0..N input signals.

In case of primitive signals (integer, float, text, enumeration), the signals are bound to (writeable) variables or events of the state chart model with the same name. In case of signals with an event content descriptor, the signals are used as event inputs with multiple events. Struct signals can be used to combine variables and events.



Output Signal Configuration

  • Process type: Process type of the resulting signal. In case of continuous process type, the model will be simulated with the given rate. In case of discrete process type, the model is triggered with every change of the input signals.
  • Signal type: Signal type of the resulting signal.
  • Signal descriptor: Signal descriptor of the resulting signal.
  • Domain base: Domain base of the resulting signal.
  • Domain range: Domain range of the resulting signal.

The process type (discrete or continuous) defines how the model is simulated:

  • Discrete: The model is simulated when input sample changes are made or at timed positions within the start/end range.
  • Continuous: The model is simulated at fixed positions defined by the start, end and rate fields

The signal type may be:

  • Struct: The output signals contain the state information plus all internal variables;
  • Event (enumeration) or Text: The output signals contain the state information only.


Production Configuration

  • Chart: Select the state chart defined in the preferences.
  • Timeout[ms]: Increase the value in case of timeout events.

Select the chart from the combo box. Simulation may be time consuming depending of the model. To avoid system timeout, the timeout parameter may be set.



Scripting

Your state machine may refer to external functions. You may implement them in the scripting field (JAvaScript).

The script is executed before entering the simulation engine. Function will be called while simulation.

	var i = 0.0;
	
	function get_sensor_measurement() {
	    i = i + 1;
	    console.println("Measure"); 
	    return i+4
	    ;
	}
	
	function square(val) {
	    return val * val;
	}
	
	function root(val) {
	    return Math.sqrt(val);
	}
	
	function calc_array_sum(comp, size) {
	    var sum = 0;
	    var slots = comp.getSlots();
	    for (var i = 0; i < slots.size(); i++) {
	        slot = slots.get(i);
	        sum = sum + slot.getValue();
	        console.print(i);
	    }
	    return sum;
	}

toem

technical software and tooling

Company

Contact Us

This email address is being protected from spambots. You need JavaScript enabled to view it.