diff --git a/README.md b/README.md index 0258662..3637c77 100644 --- a/README.md +++ b/README.md @@ -44,40 +44,4 @@ Docs" are required to build the documentation. ## Example -``` python -#! /usr/bin/python -from smlib import fsmBase, loader - -# FSM definition -class exampleFsm(fsmBase): - def __init__(self, name, *args, **kwargs): - super(exampleFsm, self).__init__(name, **kwargs) - - self.counter = self.connect("testcounter") # connect to PV "testcounter" - self.mirror = self.connect("testmirror") - self.enable = self.connect("testenable") - - self.gotoState('idle') - - # idle state - def idle_eval(self): - if self.enable.rising(): - self.gotoState("mirroring") - - # mirroring state - def mirroring_eval(self): - if self.enable.falling(): - self.gotoState("idle") - elif self.counter.changing(): - readValue = self.counter.val() - self.mirror.put(readValue) - -# Main -if __name__ == '__main__': - # load the fsm - l = loader() - l.load(exampleFsm, "myFirstFsm") - - # start execution - l.start() -``` +![Examples can be found on the examples folder.](examples/example.png "Title")