Home
NNNIC edited this page Apr 13, 2019
·
11 revisions
Welcome to the psgg-c-sample wiki!
- Windows10
- StateGo
- MinGW
- Execute SYN-G-GEN and Create a new state machine.
(1) Select C 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!
- Copy reference files and check if it works.
Copy psgg-c-sample/reference/make.bat to c:\hoge
Copy psgg-c-sample/reference/test.c to c:\hoge
Double-click "make.bat" in c:\hoge then the batch shows "Hello!" as result of compiling and running.
- Create a new state and connect.
Create a new state and input "printf("Hello again!!"); in 'init' cell.
- Create a branch situation.
(1) Create as below.
(2) Open "implement source" and input code below.
static void set_yes_or_no() { srand((unsigned)time(NULL)); int r = rand(); printf("rand = %d\n",r ); m_bYesNo = ((r % 2) == 0); }
(3) make.bat