Source Controller software Ianos Schmidt The University of Iowa
System HF+ HE+ HO+1,+2 HB+ HO0 HO –1,-2 HE- HF- Services: Air drivers Electric drivers 0 2 3 3 0 0? 2 3? 2 3? 0 0? 3 3 0 2 Total 10 16 Crate of controller boards HB- 0 0? Air supply pressure switches RS-485 links DIM Server DIM Client(s) Crate of controller boards Local control laptop RS-232 directly to individual boards. Power supplies 5V,18V,24V
Software diagram DIM Server Config. info Tube maps Source code Run Control DIM clients Controller boards DIM clients RS-485 Local disk
Database ? Controller code and settings in flash memory Local tools for configuration, testing, and compiling code Control PC Laptop RS-232 Tools for testing, configuration and programming of controllers.+ Controller source code. DIM client
Each controller board contains a Philips 89C51RB2 microcontroller. The code for these is written in the native “8051 compatible” assembly language.
The Assembly code is complied using ASM51, and the controllers are programmed using either WINISP or Flash Magic programming tools. All of these tools are free, and operate under Windows.
The programming interface is non-proprietary and fully documented allowing the option to implement a custom programmer on any platform in the future if necessary.
This code provides all functionality to operate the Purdue wire source drivers, and to provide a standard interface, regardless of driver type, via RS-232 or RS-485 to the DIM server.
Information that describes the specific hardware and related behaviors is stored in a block of flash memory which is transferred to RAM at boot up. These values can be modified and resaved, or default values can be restored via the serial interface. Generally speaking these parameters will only need to be changed if the driver hardware or control electronics are changed.
The DIM server communicates with the controller boards via RS-485, and produces a set of DIM services and commands specific to each controller board. There is one additional information service that consists of the status words from each of the drivers.
Each controller is uniquely identified by its address and associated with information stored in either a file or a local database. This data set consists of the following information for each driver:
Driver type (Electric Driver, Air Driver, Monitor, None).
Default tube map.
State (locked, Enabled,…)
Board addresses are determined by the slot numbers in the crates. Each slot also holds the connector from a specific source driver control cable, thus the controller address is associated with specific driver locations on the experiment.
Tube maps from files or a database will be used to provide specific information about the tubes that are connected to the drivers. Which map to use can be specified from a DIM client, otherwise the default specified in the configuration data will be used.
Each entry is associated with the index number from the related driver.
A tube map contains the following information:
First and last tube number
Optional default settings for the driver (parameter overrides)
Tube name (ie. “HE+1, sector 2, slice 1, layer 5”)
Tube status (skip, ok, warn, test)
Start of detector/area of interest
(Optional settings such as motor voltage/speed for extend/retract, in/out of detector)
A Visual source controller client is under development using Borland tools. This provides an easy to use graphical interface that allows use all the available DIM services and commands. Ultimately this will be implemented in PVSS.
Run control contains a client for merging the source controller data with DAQ data. Run control also provides sequence files to automate the sending of DIM commands.
The run control DIM interface will have to be updated to use tube map and configuration information.
Controller test program for sending raw serial commands to a controller card. This is to be used while the laptop is directly connected to the RS-232 connector on the front of a controller card.
When connected in this way the controller is automatically dropped from the RS-485 buss allowing maintenance and testing of individual cards while the other cards are in operation, or for testing cards individually outside of the crate.
Tool for setting controller parameters and saving them to flash memory. Although this will rarely need to be done it is tedious to do using the raw serial commands.
DID (Dim display) Tool part of the DIM package for testing DIM servers.