We are developing a more user-friendly Python variant of the Wonham
tct tool that can help you develop supervisory controllers.
This tool is called sctool and it has been installed at our Linux serack systems.
Like many of the
sctool has been written in Python. This means that the tool should also run at the Windows platform.
Feel free to try it. If you need a Python environment for Windows, you could try ActivePython.
After unpacking the tar.gz file in a temporary directory, open a Command Prompt window and go to that directory (Where file setup.py is located.) Do the following:
python setup.py install. This should build and install svctools
scriptsdirectory of your Python distribution, append the .py extension to the following files: ads2stm, gen-chi, gen-dot, sctool, stm2ads, stm2fsm. This restores the file association with Python. (Linux does not need them, so they are not there)
So, to start up sctool for instance, you would enter
sctool.py in a Command Prompt window (Select Start→Run, entering
cmd as program you want to run gives you a Command Prompt window in which you can start
After that, you are in the SCT command environment.
sctool is done by simply entering its name at the command line:
$ sctool SCT: Supervisory Control Tool, written by H.A. de Vos Copyright (c) 2006, Systems Engineering group, Department of Mechanical Engineering, Eindhoven University of Technology, The Netherlands Type 'help' for a list of available commands SCT$
Note While Herman de Vos implemented most code of sctool, he does not maintain the tool. For bug reports, questions, remarks, enhancement requests, and other questions regarding sctool, always contact firstname.lastname@example.org.
sctool gives you an interactive environment where you can derive a supervisory controller. In the environment, variables exist that contain a Wonham state machine, and you can compute new state machines by entering commands.
sctool has no editor for entering a state machine, so you have to prepare them beforehand. Two of the more popular ways of doing this are
tct, then convert them to the correct format.
Details about this process can be found at creating and editing state machines.
Once you have the necessary files with state machines prepared, you can load them in
SCT$ ma = loadsct "ma.sct" SCT$ mb = loadstm "mb.stm"
These two commands load files
ma.sct (in sctool's own file format) and
mb.stm (in statemachines file format) into the tool, and assigns them to variables
The available variables can be listed by entering
Displaying the contents of a single variable for example
ma is done by entering
SCT$ show ma
Even for small state machines, interpreting the output is already difficult.
To solve this problem,
sctool also provides commands for saving state machines. Once saved, you can use other tools to perform further processing steps (eg generate nice pictures of the state machine, or generate chi code).
Saving is done by the save commands, like
SCT$ savestm ma "ma.stm" SCT$ savesct mb "mb.sct"
which gives you two new files
mb.sct containing the same state machines just loaded, except in the other file format.
The real power in sctool is that it can compute new state machines from old ones. The table below shows the available commands:
| || Compute the meet of machines
| || Compute the sync of machines
| || Compute the trim of machine
| || Add selfloop of controllable events
| || Compute the supervisor for machines
Last but not least, sctool has a few other useful commands. They are listed in the table below:
| || Run a shell command from sctool, in this case “
| || Same as “
| ||Stop sctool|
| || Same as “