Pocket

 

[Structured Modeling]

It is possible to build software with visualized information such as sequence, selection, repetition: the control flow of structured programing.
Data Flow Diagram makes possible to build up software structure and timing design all together.

This tutorial simply describes how to make Logic and Data Flow Diagram for structured modeling.

The main centent in this tutorial are as below.

  • Make Logic
  • Make DFD (Data Flow Diagram)

Make Logic

Though new Logic is created as Code Logic expression, it is possible to express Logic by visual item as the following figure.

Logic is generated as function. Because its ID becomes function name, ID must be appropriate name.
It name is used by display name of Model element.

  • Select Logic expression

Click “X” at the top right of code panel and Sequential Logic will be displayed.

Sequential Logic is the Logic expression element that describes serial processing.
Logic expression is changed by right-click menu of element item.

It is possible to describe Logic by many kinds of expression.

        Sequence

Sequential Logic
 

        Selection

If If / Else If / Else / ElseIf Case

        Repetition

While Loop For Loop

        Besides general-purpose Logic, the Logic of State Transition Diagram or the                  Logic of Truth Table is available.

        Especially, State Logic is very effective for control system. It makes                       possible to describe state transition and control processing all together.

        Special-purpose Logic

State Logic Truth Table Logic

         All of these Logic expression elements are used in combination.

         For details, refer to help.

  • Edit Logic expression element

Following figure is the case of “Condtion Logic (T/F)”.

Double-click item to display its edit panel.

In the case of “Condtion Logic (T/F)”, input the processing that its condition is               true and the one of the other case.
Double-click the code panel to be editable.

In the case of the following input:

The code as below is generated.

Click “X” at the top right of code panel and Sequential Logic will be displayed.

As the above image, it is possible to build nested Logic structure.
It is also possible to use Logical Condtion on the condition panel.

Change condtion to Logical Condtion by right-click menu of condition panel.

Exchange “AND” / “OR” by double-click of “AND”.

After closing Condition Logic panel, Sequential Logic panel will be displayed                 again.

This expression element is only a element of Sequential Logic.
In the Sequential Logic, it is possible to make serial processing as below by                   adding item by “Elm” and “Flow”.

Sequential Logic is serial processing expression. The processing of Logic                     elements are executed in order of Flow link.

In above case, the code as below is generated.

The executing order of Logic element with no link with Flow item is uncertain.

Double-click the Logic item to display edit panel.

Click “-” top left of panel to movable edit panel.

It is better for editing more than one elements.

These operations are available in all kinds of Logic expression.
For details, refer to help.

  • Use Nested Logic

Insert other Logic as Nested Logic by right-click menu.

Inserting Module or Data is same as Nested Logic.

Generated code

The generated code from Logic only is only function.
It is necessary to call the function from outside.
For details, refer to help.

Make DFD (Data Flow Diagram)

DFD expresses data flow in software.
It is composed of Process and Data.

Process represents one processing unit in DFD.
The contents of Process is described by Logic.
Note: Process invocation order is not decided in DFD.
Process has only invocation timing.
(Invocation timing of Process is managed by Task.)

There are four kinds of Data as External Data, Inter-Process Data, Event, Process Local Data.
It is able to be changed to group except Event.
(Not supported in Basic Edition.)

Data Store is readable / writable Data from more than one Process.
It is able to be changed to group or array.

DFD is not built by its own. It is built with Feature Requirement.
Feature Requirement is made on Context Diagram.

  1. Display Context Diagram

    Right-click at the “Context Diagram” on the Model Management form and select “Edit” to display Context Diagram form.                                                                                                                                                                                                                                                                                                                             

  2. Make Feature Requirement

    Click “Feature Requirement” to add Feature Requirement.                                                                                                                                                                                      

  3. Make DFD

    Make DFD by right-click menu of Feature Requirement.                                                                                                                                                                                       

  4. Edt DFD

    The following DFD form will be displayed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                          One existing item is default Process.
    Code Logic is assigned to it.DFD will be built by adding item by “Proc” or “Data”.                                                                                                                                                     

  5. Use Data element in Logic

    Double-click Data item to show Data element form.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     Select data type or data value as necessary at this form.

    • Select data type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Available data types are followings.
      • BO unsigned char
      • UC unsigned char
      • U2 unsigned short
      • U4 unsigned long
      • SC signed char
      • S2 signed short
      • S4 signed long
      • FLT float
      • DBL double
      • CH char
      • void void
      • enum enum
    • Value Group                                                                                                                                                                                                                                                                                                                                                                                           Available value of Data is specified by Value Group.
      Specify uninput to direct input for Data value.
      Click “Edit” to display Value Group and modify it if necessary.                                                                                                                                                                               

    Double-click Process item to show Logic form.

    Input / output Data of Process will be displayed at the available data panel and Data element become available in Logic.
    Use Data element in code panel by right-click menu.

    For details of Logic form, refer to “Make Logic” or help.

  6. Assign Logic

    To assign existing Logic, do it after deleting or releasing Logic of Process.                                          Assign, delete, release of Logic is done by right-click menu.                                                                                                                                                                                                                                                                                                                                                                                                     It is possible to re-assign released Logic.

  7. Invocation order of Process

    DFD does not decide Process invocation order.                                                                                             It is decided by Task.
    Display Task form by right-click menu of Process item.

  1. Change Process invocation order by “Up” and “Down”.

Generated code

DFD is not generated as code.
The generated code with building DFD are main function, resident Task function and Logic function.
If Data element is used, the declaration and mapping code will be generated.
Main function and Task function will be generated with calling Logic function in specified order.
For details, refer to help.

This tutorial has simply described how to make Logic and DFD for structured modeling.
For details, refer to other tutorial, user’s guide or help.


That is the tutorial of Argo Embetics.
For details, refer to the help on Argo Embetics.

Available Platform Model are provied from the Argo Solutions web site.
The re-configurable Module and Logic are also provied there. Make use of them with Argo Embetics for various development.

Please send an e-mail to argo-embetics@argo-s.com to connect with us when you have any question about Argo Embetics or our company.

Latest information about Argo Embetics is on:

http://www.argo-s.com/ae_en/