Skip to content
NNNIC edited this page Oct 14, 2018 · 8 revisions

Welcome to the psgg-python-sample wiki!

NOTE

The below is using pre-release version.

Environment

  • Windows 10
  • SYN-G-GEN
  • Python

How to make "m0" sample

1. Execute SYN-G-GEN and create a new state machine.

(1) Select Python STARTER KIT.
(2) Set the state machine name to "TestControl".
(3) Set the document folder to "c:\hoge".
(4) Set the source folder to "c:\hoge".
(5) Create!

2. Copy reference files and check if it works.

Copy psgg-c-sample/reference/Test.py to c:\hoge
Open Test.py using IDLE and run then the shell shows as below.

i0

  1. Create a new state and connect.

Create a new state and input "printf("Hello!"); in 'init' cell.

i1 i2

  1. Create a branch situation.

(1) Create as below.

(2) Open "implement source" and input code below.

    def select_yes_or_no(self) :
        i = random.randrange(10)   # Note: import random 
        print(i)
        self.m_bYesNo = i % 2 == 0

(3) run Test.py

b2