# ISG Example # Two processes: master and slave # boot process, master and slave need to establish communication, to load data and to initialise the system process Master has 1 instances with distribution all on cpu1 defaults: channel bus consume 5 cycles send binary data 128 bytes record responsetime end states: in state processInit: on message poweron: send message processInit to Slave instance 1 received in anystate expect reply RequIdent within 5secs received in state register enter state register end on exception: keep samestate calling stub function excDoInit end end in state register: on message RequIdent: reset timeout RequIdent create timer moveToInitPos with constant period 100 msecs ... 2 secs received in state init enter state init end on timeout RequIdent: send message processInit to Slave instance 1 received in anystate expect reply RequIdent within 5secs received in state register keep samestate end on exception: keep samestate calling stub function excRegister end end in state init: on timer moveToInitPos: send message SendData to Slave instance 1 received in anystate enter state waitForExec end on exception: keep samestate calling stub function excInit end end in state waitForExec: on message execute: create timer startExec with constant period 1secs...2secs received in state Execution enter state Execution end on exception: keep samestate calling stub function excWaitForExec end end in state Execution: on timer startExec: send message terminate to process Slave instance 1 received in anystate enter state waitForCleanUp end on exception: keep samestate calling stub function excExecution end end in state waitForCleanUp: on message cleanUp: send message SendData to Slave instance 1 received in anystate enter state waitForExec end on exception: keep samestate calling stub function excWaitingForCleanUp end end end process Slave has 1 instances with distribution all on cpu2 defaults: channel bus consume 5 cycles send binary data 128 bytes record responsetime end states: in anystate: on message processInit: send message RequIdent to process Master instance 1 received in state register keep samestate end on message SendData: send message execute to process Master instance 1 received in state waitForExec keep samestate end on message terminate: send message cleanUp to process Master instance 1 received in state waitForCleanUp keep samestate end end in state ctrlState: on exception: keep samestate calling stub function excctrlStateHandler end end end