Lab2 Petri nets toolset

 

Industrial Automation - IST MEEC/MEGE

 

J. Gaspar

 

 

 

In this webpage is described an installation of the Petri nets toolset useful for Lab2 of the Industrial Automation course. This is an alternative installation, equal to the installation found in the laboratory, and is based on the same zip files found the webpage of the course. This installation works only in the Windows operating system.

 

 

Detailed steps for the installation:

 

1. Create one folder in your hard drive, suggested place: c:\users2\api\svn

 

2. Install the freeware TortoiseSVN

 

3. Right click on the created folder and do TortoiseSVN Checkout with the following data

URL of repository: svn://svn.isr.ist.utl.pt/dccal/projects/lsdc4_api

Checkout directory: the directory you have created

Having given the URL and checkout directory, you will be asked a username and a password,

user: lsdc4ro

password: to be given in the classes

 

4. Usage within Matlab, in the first time find “login_z_install.m” and run it:

>> login_z_install

and then:

>> login_api; login_api_local('install'); login_api

Please respond correctly your group name and ignore warnings (first "login_api" will complain on invalid / missing folders). You get a list of group names and group members names by pressing return on the prompt asking your group name.

 

 

Testing of the installed software, test 1, the editor:

(outside Matlab)

 

Find folder named “pmedit” .If you followed the suggested installation path just open folder:

C:\users2\api17\tmp\PN_editor_MATLAB_sim_and_Manual\pmedit

 

Start the program “PMEDIT.EXE” and load an example file like:

C:\users2\api17\tmp\PN_editor_MATLAB_sim_and_Manual\pmedit\EXAMPLES\NET.RDP

 

Verify that running the Petri net results always in the same sequence of states.

 

Note: The program pmedit.exe is a 16bits application. Cannot be run in 64bits Windows systems. You can find it running on the virtual machine made available for the course.

 

 

Testing of the installed software, test 2, run within Matlab:

 

For every fresh start of Matlab, you get the toolset operational by logging in:

>> login_api

 

A complete Petri net is provided for understanding the toolset. If you followed the default installation folder:

>> cd lab2_sim_5philosophers\

>> pdinner_tst

 

A folder is already created for developing Lab2. You can see a sequence of pressed keys by running:

>> PN_device_kb_IO

To control the keyboard you need to create a Petri net and save it as file KB_READ.RDP. The folder contains functions that need to be completed, namely PN_s2act.m, PN_tfire.m and PN_s2yout.m . The function kb_tst.m is the main function to run for testing and finally demonstrating the keyboard reading functionalities (Lab2).