Difference between revisions of "VME/VXS Crate control Applications"

From GlueXWiki
Jump to: navigation, search
(Modifications)
(Some documentation)
Line 17: Line 17:
 
Our choice would be SNMP since it will not require us to create any new piece of infrastructure to control crates.
 
Our choice would be SNMP since it will not require us to create any new piece of infrastructure to control crates.
  
=== Some documentation ===
+
=== Some Related Documents ===
  
 
* [[ media:WienerCrateServiceTraining.pdf | A presentation downloaded from the web which can be used as a service manual for Wiener VME crates]].
 
* [[ media:WienerCrateServiceTraining.pdf | A presentation downloaded from the web which can be used as a service manual for Wiener VME crates]].
 
* [[ media:WienerCrateEthernetControl.pdf | A presentation downloaded from the web about Ethernet control of the Wiener VME crates]].
 
* [[ media:WienerCrateEthernetControl.pdf | A presentation downloaded from the web about Ethernet control of the Wiener VME crates]].
 
 
 
  
 
== Software ==
 
== Software ==

Revision as of 13:50, 15 July 2011

Hardware

We will be using Wiener UEP6000/PL500 VME crates and UEP6023/PL500 VXS crates. We need to control and monitor the power supply/fan base of these crates. The variables include:

  • Power supply status
  • Fan tray status
  • Fan speed
  • Temperature sensors
  • Various voltage and current sensors on the crate

These crate have three interface which we could use to communicate remotely:

  • CAN-bus
  • Serial RS-232
  • Ethernet SNMP

Our choice would be SNMP since it will not require us to create any new piece of infrastructure to control crates.

Some Related Documents

Software

Mike Johnson from the JLab accelerator division had EPICS interface for Wiener VME crates using SNMP protocol. They run softIOC on Linux platforms. Apparently they are using RHEL6 currently utilizing the following SNMP packages:

net-snmp-utils-5.5-31.el6.i686
net-snmp-5.5-31.el6.i686
net-snmp-libs-5.5-31.el6.i686

According to Mike they had to upgrade the Linux SNMP support, so it remains to be seen if we can use their software on RHEL5 which we have on our machines now.

RHEL5 distribution does have these packages. To compile on RHEL5 we also needed to install package

net-snmp-devel

For Ubuntu there are the following packages for SNMP:

snmp
libsnmp
libsnmp-base
libsnmp-dev

I first tried the EPICS driver on JLab standard Linux RHEL5 distribution with some SNMP packages from the RHEL5 repository:

net-snmp-5.3.2.2-9.el5_5.1
net-snmp-devel-5.3.2.2-9.el5_5.1
net-snmp-libs-5.3.2.2-9.el5_5.1
net-snmp-utils-5.3.2.2-9.el5_5.1

The first build

Mike Johnson sent us a tar file with the whole structure which contained both the IOC part and the support part. To match to our scheme we had to rearrange the files and directories as well as Makefile.

  • Create two separate directories, one for support one for app: vmeWiener and vmeCrates.
  • Create a separate IOC command file to run vmeCrates executable.
  • Use automatic flag selection for net-snmp instead of setting it by hand in the Makefile
  • I had to modify the drvSnmp.c file to add the current directory ./ to the list where the SNMP driver looks for the MIB files.

I booted IOC with the read database file wienerR.db, and the IOC seems to have connected to the halldvxs1 VME crate in the test stand and returned valid values for some temperatures and power status. There are some problems though that I noticed:

  • Fan temperature (fanAirTemp) is wrong.
  • Fan nominal speed (fanNominalSpeedR) is wrong.
  • Number of fans(fanNumberOfFans) is wrong .

These turned out to be due to a mistake in the DB-file. In SNMP requests one needs to specify the index for the scaler, e.g. WIENER-CRATE-MIB::fanNominalSpeed.0 and not WIENER-CRATE-MIB::fanNominalSpeed. When we added scaler indexes, these problems disappeared.

To be able to use set-commands for the VME crate, I had to use guru community for SNMP requests. For the IOC, this can be set in the IOC command file where the corresponding databases are being loaded.

At the end, all functions of the EPICS driver that I was interested at this point seem to be working propoerly.

Modifications

  • Added current directory to the list of the directories where the driver is lookinf for the MIB-file. In general, it might be a good idea to keep the WIENER-CRATE-MIB.txt file in /usr/share/snmp/mibs/ directory where the Linux command-line SNMP tools look for MIB-files.
  • Modified the DB file to have indexes for all scalar variables in the SNMP requests.
  • Our crates have four outputs, so I added two more (4 and 6) to the existing two in the driver.
  • Removed all the set commands except Power On/Off, Reset and Fan Sped set-point.
  • Created a set of BOY OPI-files for monitoring and control of the VME crates.