SeaLevel HOWTO

Abstract

This howto is to setup and test the SeaLevel Systems 463E TTL I/O modules. Two modules are used in HCAL DCS and DSS. They differ by the cable only. The double DB96 module controls the Auxiliary PS on/off relays, and the quad 50 conductor flat cable version is used for safety system controls.

Hardware Setup and Testing

First we will test that the hardware is working properly using the program supplied by SL.

Hardware: PC with a free ethernet port , CAT5 cable, SeaLevel box, and power supply (12 - 15 Volts). Connect the ethernet between the PC and SL box. Power it up. You can/should have the manual available.

There is one library that installs in Program Files: "SeaIO" and "SeaLevel System" . If you don't have them use the supplied CD rom or go to ftp://ftp.sealevel.com/pub/SOFTWARE and open folders SEAIO and SeaMAX. Go inside and get the current .exe and install the libs. The .dlls will by default be installed in WINDOWS.

The testing program is MaxSSD.exe. It will find and allow you to assign an ethernet port and the number of the slave device(1). When you get to the window with buttons, remember TTL on (green) is 0 Volts. To activate a channel, turn it off (grey) which should give 5V on the output. The 96 channels are divided into 16 channel "banks".

PVSS Software

The new control software has been adapted to the PVSS system and no longer requires DIM inter communication with a Windows Service. Instead the proprietary SeaMax application suite ( SeaMax.dll ) are encapsulated in a PVSS control extension ( SeaMaxCrtlExt.dll ), which is accessed by a PVSS call-back function.

The control extension functions are called as follows:

  • SL_open - int SM_Open (SM_HANDLE *handle, char *connection) Opens a connection to a Sealevel I/O module.

  • SL_read(int a, int &D1, int &D2, int &D3, int &D4) - int SM_ReadPIO (SM_HANDLE handle, unsigned char *values) Reads the entire I/O space of a Sealevel programmable IO device.

  • SL_write(int chn) - int SM_WritePIO (SM_HANDLE handle, unsigned char *values) Writes the IO space of a programmable I/O Sealevel I/O module.

  • SL_close(int a, int b ) - int SM_Close (SM_HANDLE handle) Closes the SeaMAX handle and releases all allocated memory.

The return value should be zero otherwise see the 463E manual

The error codes can be found here.

OLD DIM Server Software

The software you will need is: DIM, C++ project file , and a MS C++ compiler. I used the free Microsoft compiler, but it should work fine with Visual Studio or .NET.

Make sure DIM installed is installed. If not go to http://dim.web.cern.ch/dim/. Be sure to configure dns.exe following the instructions.

If you are lucky, the project file will build everything. Otherwise you will need to create the project from the sources and libraries.

Sources and headers:


ComplexDimCommand.cpp - DIM command handler ComplexDimCommand.h

SeaLev.cpp - class which encapsulates the hardware functions SeaLev.h

SeaLevelClient.cpp - main client SeaLevelServer.cpp - simple server

stdafx.cpp - junk for pre-complied headers stdafx.h

Libraries and headers:


CSeaMaxW32.lib - C driver libraries for Win 32 bit architecture seaMaxW32.h seario.h

Build server and client.

Running the Server and Client

The server is designed as a DIM command event handler. An event in this case is a change in any of the three values of an integer array. These integers control the operation of the program. The DIM names are: "CMS/HCAL/DCS/SEALEV/PORT[0:2]

The first value (slave) is the device number , either (1,2). This corresponds to the slave device number of SeaLevel boxes that can be chained together. The current code will work for up to two devices.

The second value (channel) turns on(5V) a channel (1->96). A negative value (-1->-96) will turn off the channel(0V).

The third value (mode) controls the actions as follows: 0 - to turn on/off a channel 1 - reinitialize the program , it is automatically initialized at startup. 2 - or any other number will read back the configuration

The program will publish the following values: CMS/HCAL/DCS/SEALEV/BANK0 CMS/HCAL/DCS/SEALEV/BANK1 which correspond to the "states" of the different boxes. The format is a 24 hex characters which are read left-to-right, e.g. BANK0= 0100 0000 0000 0000 0000 0000 means that channel 8 is on.

The values: CMS/HCAL/DCS/SEALEV/ERROR0 CMS/HCAL/DCS/SEALEV/ERROR1 correspond to error codes given in Appendix 1.

The JCOP Framework state machine software should use these values to determine the overall state of the system.

To operate the system:

First run dns.exe

SeaLevelServer.exe 1 sealevel_tcp://169.254.200.140 or whatever tcp name you have

run SeaLevelClient

DCS Links

Wiki Tools:

Search options

Index | Preferences | Recent changes | E-mail notification | Access statistics


-- Richard Galvez - 28 May 2007 , SLL 29 June 2009

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2009-06-29 - StephanLinn
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMS/HCAL/DCS All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback