Skip to content
NNNIC edited this page Apr 13, 2019 · 11 revisions

Welcome to the psgg-c-sample wiki!

Environment

How to make "m0" sample

  1. 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!

  1. 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.

i0

  1. Create a new state and connect.

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

i1 i2

  1. 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

b2

Clone this wiki locally