Here are some instructions to get started with PML and SVE:
a) get and install python (2.5.1 or newer)
b) get and install pyro (3.7 or new)
install not only the pyro modules but also the "executables" (scripts but they go to the bin directory) such as pryo-ns etc
c) Check the name server. Start on one computer and then run pyro-xncs on another. Do they connect?
d) If they don't you might have problems with the firewall settings and the udp broadcast used by the locator. Set the shell variable PYRO_NS_HOSTNAME to the name of the computer running the name server.
e) Check out you software from svn. You need the COM and SVE repositories. COM includes PML, SISPI (some utility classes) and LV (pml - sml scripts to interact with labview). SVE includes the SVE engine and the client code.
f) You can browse the repository via the web interface (https://des.mps.ohio-state.edu)
g) You need to make sure that python can find the sispi modules. I do this using the shell variable PYTHONPATH and have it point to the directory where I checked out the code. Our code is arranged in package so you import for example PML.core.
h) In PML/test you find the test applications.
device_server_tk.py is a server application that implements a PML device and shows how this can be done. It also has a simple Tkinter GUI.
To interact with this device start device_client_tk.py. This also comes with a GUI that allows you to set and readback some values, execute some commands etc.
These examples also show some of our utility classes such as ArgParser and the logger (you will notice a bunch of log files appearing in your directory. The examples turn off the file logger but the files are still created - nothing rm *.log can't fix.
i) There are some comments in the text. With a bit of effort it should be possible to figure out what's going on. Remember that in some aspects (mostly parameter passing) we are constrained by our desire to be SML compatible.
j) There are other /test directories (in SVE and SISPI) if you want to explore. These programs are less polished and everything of course can change without warning as we add features and fix bugs. Remember, if you want to use shared variables you have to start the SVE (python main.py in the SVE/SVE directory)
k) Please report bugs (there will be some) and suggestions to me. To avoid confusion I would like to ask you not to commit anything back to those svn repositories.
l) Most of the stuff (we are still working on the labview connection) works on Linux, Windows and Mac OS
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment