PTC_ControlsPy Library Python bindings for the Pyramid PTC_Controls32 C++ API, using Boost.Python Author: Christopher J Pendleton Email: cpendleton@ptcusa.com Date: March 30, 2010 -Version 1.0 March 30, 2010 - Added Python support for PTCSystem, PTCBoard, and IC101 classes- 1. Overview The PTC_ControlsPy library was designed to allow Python users to utilize Pyramid's standard PTC_Controls32 C++ API. Currently, the library provides support only for the IC101. More devices will be supported as they are requested. The available functions and datatypes are listed in the included header file PTC_Controls32_Flat.h. All of these functions and data types are demonstrated in the Python example program IC101Test.py. The parameters are identical to those used in PSIDiagnostic, and are explained in detail in the product manual http://ptcusa.com/productpages/Manuals/IC101_UM_091023.pdf. The basic program structure will use the PTCSystem functions to load an XML system configuration file. See the included IC101System.xml file for an example of this. This file is used by IC101Test.py. This configuration file defines various system parameters, hardware names, types, and addresses. The user can then get handles to these named hardware objects through the PTCSystem functions. The user will then be able to access the specific device functionality using these handles. 2. Tested Platforms (it is likely that more configurations will work, but only these have been tested) [WINDOWS] Windows 7 32-bit, Python 2.6.4 Windows Vista 32-bit, Python 2.6.5 Windows XP 32-bit, Python 2.6.5 [LINUX] Fedora 12 32-bit, Python 2.6.2 Fedora 12 64-bit, Python 2.6.2 Ubuntu 9.10 32-bit, Python 2.6.4rc2 openSUSE 10.3 32-bit, Python 2.5.1 openSUSE 11.0 32-bit, Python 2.5.2 openSUSE 11.1 32-bit, Python 2.6 openSUSE 11.1 64-bit, Python 2.6 openSUSE 11.2 32-bit, Python 2.6.2 3. Installation instructions + running example Python program a. Install Python and make sure the python executable is in the system Path. b. Copy all files located in PTC_ControlsPy.zip to a directory on the target computer. c. [Linux only] Run [32bit "cp lib* /lib/"] [64bit "cp lib* /lib64/"] as root to copy all required lib files to the system lib directory. Fedora note: I initially ran into this problem: http://www.appistry.com/community/forums/content/cannot-restore-segment-prot-after-reloc-permission-denied. I disabled enforcement and everything worked as expected. d. [Windows only] If you have never run this installation package on the target computer, run the included PTC_ControlsPySetup.msi installation program. This will install all of the necessary Microsoft C/C++ runtime dependencies. It is only necessary to do this once on the target computer. [To run example Python program] d. Modify IC101System.xml to match your system configuration. Pay attention specifically to the IP address of the A300 and the address of the IC101. e. Run "python IC101Test.py".