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

From GlueXWiki
Jump to: navigation, search
(Software)
Line 44: Line 44:
 
: libsnmp-dev
 
: libsnmp-dev
  
== The first built ==  
+
=== 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.  
 
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.  
Line 58: Line 58:
 
* Number of fans(fanNumberOfFans) 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. <i>WIENER-CRATE-MIB::fanNominalSpeed.0</i> and not <i>WIENER-CRATE-MIB::fanNominalSpeed</i>. When we added scaler indexes, these problems disappeared.
+
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. <i>WIENER-CRATE-MIB::fanNominalSpeed.0</i> and not <i>WIENER-CRATE-MIB::fanNominalSpeed</i>. When we added scaler indexes, these problems disappeared.
 +
 
 +
To be able to use set commands I had to use <b>guru</b> community for SNMP requests. For the IOC, this can be set in the IOC command file where the corresponding databases are being loaded.
 +
 
 +
=== 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 <i>WIENER-CRATE-MIB.txt</i> file in <i>/usr/share/snmp/mibs/</i> 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.
 +
* Removed all the set commands except Power On/Off, Reset and Fan Sped setpoint.
 +
* Created a set of BOY OPI-files for monitoring and control of the VME crates.

Revision as of 10:06, 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 documentation



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

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 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.

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.
  • Removed all the set commands except Power On/Off, Reset and Fan Sped setpoint.
  • Created a set of BOY OPI-files for monitoring and control of the VME crates.